Skip to content

v0.11.0

Latest
Compare
Choose a tag to compare
@tzolov tzolov released this 31 Jul 01:43
· 3 commits to main since this release

MCP Java SDK Release Notes

🚀 Major Features

New Transport Options

  • WebMVC and HttpServlet Support (#432) - Added stateless server transports for Spring WebMVC and servlet-based applications with comprehensive integration tests
  • Spring WebMVC Streamable Transport (#425) - Non-reactive MCP server support with HTTP/SSE transport, session management, and graceful shutdown
  • Streamable HTTP Transport (#420, #290, #292) - Complete HTTP transport abstractions with WebFlux, HttpServlet, and WebClient implementations
  • Enhanced WebClient Support - More resilient client transport with dynamic session allocation and improved failure handling

Connection Management

  • MCP-Compliant Keep-Alive (#430) - Configurable periodic session pings with KeepAliveScheduler utility (disabled by default)
  • HTTP Request Customization (#388) - New customizer APIs for adding OAuth2 tokens, API keys, and other request modifications

🔧 Protocol & Standards

MCP Protocol Compliance

  • Protocol Version Headers (#404) - Added required MCP-Protocol-Version headers (2025-06-18 for streamable HTTP, 2024-11-05 for SSE)
  • JSON-RPC Method Filtering (#417) - Gracefully handle unknown methods with configurable ignorable method lists
  • Enhanced Error Handling (#423, #413, #391) - Better compatibility with non-compliant servers, improved SSE event handling, and detailed error reporting

🛠️ API Improvements

Tool System Enhancements

  • Builder Pattern for Tools (#375) - New CallToolRequest handlers replace arguments-only handlers with full request context
  • Structured Output Support (#357) - Server-side validation with JsonSchemaValidator and extended schema support
  • Duplicate Tool Validation - Automatic validation during server building and runtime registration

Schema & Type Updates

  • Progress Token Support (#352) - Meta parameter support for long-running operations with extended Request interface
  • Metadata Fields (#368) - Added _meta field across MCP schema classes and title fields (#372) for better UX
  • Resource Enhancements (#331) - Added optional size property and improved resource update notifications (#264)

Client & Server Features

  • Pagination Support (#336, #306) - Automatic pagination for listRoots and other list operations
  • Ping Functionality (#347) - Added ping methods to server exchanges across all transport types
  • Client Initialization (#424) - Exposed client initialization result with better access to state
  • Immediate Execution Option (#371) - Disable blocking code offloading for ThreadLocal propagation scenarios

🐛 Key Bug Fixes

  • Fixed timeout issues (#350) in server response handling
  • Resolved duplicate requests (#333) from concurrent message sending
  • Corrected CallToolRequest deserialization (#355) in async servers
  • Fixed content annotations modeling (#242) to match specification
  • Improved sampling stop reason handling (#327) for arbitrary values
  • Return immutable lists (#345) from list methods for better safety
  • Added AutoCloseable interface (#397) for try-with-resources support

🔄 Breaking Changes

  1. Request Interface Extension (#352) - Added PaginatedRequest and ReadResourceRequest to sealed interface (update switch statements)
  2. Implementation Title Field (#343) - Added required title parameter to McpSchema.Implementation

📦 Migration Guide

Deprecated (Still Supported)

  • Arguments-only tool handlers → Use CallToolRequest handlers
  • Old transport constructors → Use builder patterns
  • Some McpClientSession constructors → Use Context-aware versions

Recommended Updates

  • Adopt builder patterns for transport providers and tool specifications
  • Update exception handling for specific exception types
  • Implement new CallToolRequest handlers for better tool context

What's Changed

  • 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
  • refactor(server): Fix StdioServerTransportProvider initialization flow by @tzolov in #74
  • fix(tests): Failed to start process with command npx on Windows by @codeboyzhou in #85
  • fix: add support to set server instructions by @codezjx in #99
  • feat(mcp): Custom context paths in HTTP Servlet SSE server transport by @tzolov in #112
  • refactor: change notification params type from Map<String,Object> to Object by @tzolov in #137
  • fix: Add null check for session in WebFluxSseServerTransportProvider by @tzolov in #138
  • add access to server instructions by @jamesward in #148
  • feat(completion): fix the schema about CompleteResult by @DamonBao in #173
  • Fix method not found error msg for server by @CrazyHZM in #171
  • fix typo in WebFluxSseIntegrationTests by @jitokim in #142
  • feat(schema): add support for JSON Schema $defs and definitions by @arcaputo3 in #146
  • Fix javadoc errors by @xiaowangzhixiao in #149
  • fix: propagate reactor context up till transport by @FH-30 in #154
  • feat: Add URI template support for MCP resources by @tzolov in #208
  • add isInitialized method to McpSyncClient by @jitokim in #181
  • Remove temporary delegate impl from McpAsyncServer by @chemicL in #228
  • Fix stdio tests - proper server-everything argument by @chemicL in #237
  • Fix flaky WebFluxSse integration test by @chemicL in #238
  • Add Contributing Guidelines and Code of Conduct by @chemicL in #236
  • WebClient Streamable HTTP support by @chemicL in #292
  • Fix Streamable HTTP WebClient GET SSE handling by @chemicL in #318
  • docs: update loggingNotification javadoc to specify single client by @LucaButBoring in #329
  • feat: Propagate Context to eager connect via McpClientSession by @chemicL in #339
  • typo fix by @epaga in #340
  • refactor: return immutable lists from list methods by @tzolov in #345
  • Add option for immediate execution in McpSyncServer by @Kehrlann in #371
  • fix: improve error handling in HttpClientSseClientTransport and add test by @tzolov in #391
  • refactor: Replace Map<String, Object> with CallToolRequest in StructuredOutputCallToolHandler by @tzolov in #408
  • Streamable HTTP Server abstractions and WebFlux transport provider by @chemicL in #420
  • feat: Add Spring WebMVC streamable server transport provider by @tzolov in #425
  • HttpServlet Streamable HTTP server implementation by @ZachGerman in #290
  • HttpRequest.Builder customizer for Client transports by @Kehrlann in #388
  • feat: implement MCP-compliant keep-alive functionality for server transports by @tzolov in #430
  • Expose the client initialization result by @ilayaperumalg in #424
  • feat: implement MCP protocol version header support by @tzolov in #404
  • feat: add WebMVC and HttpServlet stateless server transports by @tzolov in #432

New Contributors

Full Changelog: v0.6.0...v0.11.0