Releases: modelcontextprotocol/java-sdk
Releases · modelcontextprotocol/java-sdk
v0.8.1
v0.8.0
MCP Java SDK Release Notes
Breaking Changes ⚠️
Follow the 0.8.0 Migration Guide for the new API changes.
Features & Enhancements
Architecture Improvements
- Introduced session-based architecture for MCP server to better handle multiple concurrent client connections (#31)
- Added McpServerTransportProvider interface to manage client connections
- Introduced exchange objects (McpAsyncServerExchange, McpSyncServerExchange) for client interaction
- Updated handler signatures to include exchange parameter
- Renamed various interfaces and classes for better alignment with MCP specification
- Added migration guide (migration-0.8.0.md) for transitioning to the new architecture
API Improvements
- Added builder pattern for CreateMessageRequest, improving usability and readability when creating message requests (#60)
- Relaxed MCP Schema JSON deserialization constraints by adding
@JsonIgnoreProperties(ignoreUnknown = true)
to all record classes, improving compatibility with third-party implementations (#37)
Client Enhancements
- Improved initialization state handling in McpAsyncClient with proper state tracking using AtomicBoolean and Sinks (#39)
- Added OSGi metadata generation support using bnd-maven-plugin to enable proper OSGi bundle creation (#10)
Build & Deployment
- Enabled automatic publishing to Maven Central when releases are performed (#63)
Bug Fixes
Protocol Compliance
- Fixed CreateMessageRequest includeContext enum values to match MCP specification (changed from snake_case to camelCase) (#44)
- Converted StopReason enum values from snake_case to camelCase for consistency (#58)
Connection & Session Management
- Fixed issue where SSE connection would terminate after 30 seconds (DEFAULT) (#21)
- Removed closed sessions from list in WebMvcSseServerTransport to prevent errors when broadcasting to outdated sessions (#19)
- Fixed issue where resources and prompts could not be added after server start (#18)
Testing & Reliability
- Improved client test reliability and execution time using VirtualTimeScheduler (#52)
- Fixed duplicated connection to testcontainer MCP server in client tests (#54)
- Synced async client tests between mcp and mcp-test modules (#55)
Refactoring & Code Quality
Client Improvements
- Improved MCP client timeout handling with configurable initialization timeout separate from request timeout (#51)
- Enhanced validation and removed server-side notification methods from client (#14)
- Removed redundant type field from Content implementations (#27)
Documentation Updates
- Added Spring AI MCP documentation section with links to client/server starters (#12)
- Updated README with Maven wrapper commands and test prerequisites (#23)
- Fixed build status badge in README (#50)
- Fixed various typos throughout the codebase (#22)
- Made closeLatch a final field (#32)
Contributors
- Christian Tzolov (@tzolov)
- Dariusz Jędrzejczyk (@chemicL)
- Jermaine Hua (@CrazyHZM)
- Piotr Roterski (@roterski)
- Dennis Kawurek (@denniskawurek)
- Mariano Gonzalez (@marianogonzalez)
- zeko zhang (@zekozhang)
- konczdev (@konczdev)
- He-Pin(kerr) (@He-Pin)
What's Changed Log
- Refactor package structure and dependencies by @tzolov in #1
- Change license from Apache to MIT by @tzolov in #3
- Remove redundand code by @tzolov in #5
- Reorder StdioServerTransport shutdown procedure to avoid errors by @chemicL in #7
- Change the top domain from org to io by @tzolov in #8
- Convert asciidoc/antora docs to mintlify by @markpollack in #6
- docs: add Spring AI MCP documentation and improve README clarity by @tzolov in #12
- Fix issue, SSE connection will terminate after 30 seconds (DEFAULT). by @zekozhang in #21
- Remove closed sessions from list in WebMvcSseServerTransport by @denniskawurek in #19
- Fix some typos by @CrazyHZM in #22
- Resources and prompts cannot be added after server start by @marianogonzalez in #18
- Add OSGi Metadata Generation by @konczdev in #10
- refactor(client): improve validation and remove server methods by @tzolov in #14
- Update README with Maven wrapper commands and test prerequisites by @tzolov in #23
- refactor(mcp): remove redundant type field from Content implementations by @tzolov in #27
- feat(mcp): relax MCP Schema JSON deserialization constraints by @tzolov in #37
- feat(client): Improve initialization state handling in McpAsyncClient by @tzolov in #39
- chore: Make closeLatch a final. by @He-Pin in #32
- Add CI GitHub Action and rename snapshot publish workflow by @chemicL in #49
- Update README.md by @tzolov in #50
- refactor: improve MCP client timeout handling and reactive testing by @tzolov in #51
- Improve client test reliability and execution time by @chemicL in #52
- Follow-up fix client tests reliability by @chemicL in #54
- Sync async client tests between mcp and mcp-test module by @chemicL in #55
- refactor(McpSchema): convert StopReason enum values to camelCase by @tzolov in #58
- feat(mcp): Add builder for CreateMessageRequest by @tzolov in #60
- (pom) Enable automatic publishing to Maven Central by @tzolov in #63
Full Changelog: v0.6.0...v0.8.0