Repository navigation
Releases: modelcontextprotocol/java-sdk
Release list
v2.2.0-M1
Highlights
-
Modern stateless server for MCP 2026-07-28: #1170 by @chemicL
The first step toward the stateless Streamable HTTP paradigm. It is a new server in
io.modelcontextprotocol.modern, independent of the legacyMcpSchema, and it passes all 37 required 2026-07-28 conformance scenarios.- No sessions: each request is handled on its own, which suits horizontally scaled deployments.
- One server, sync or async: many concepts were simplified and allow the transport to choose whether to offload blocking code or not, freeing the user to use either a synchronous or asynchronous paradigm to implement features.
- Your own catalogs: tools, resources and prompts come from repositories you implement, so per-tenant, filtered and paginated catalogs are straightforward.
- Stream only when it pays: handlers return plain JSON or SSE, user code decides.
- Not yet supported: a modern client, tasks and SEP-2243 custom headers.
Dependencies
Full Changelog: v2.1.0...v2.2.0-M1
v2.1.0
Highlights
- Tool list filtering #1108 by @Kehrlann
- HTTP client transport rework:
HttpClient-based transports are nowPublisher-based, and request customizers compose on the builders.
Enhancements
- extensions attribute on
ClientCapabilitiesandServerCapabilities(SEP-2133). #1064 by @YousefHaggy ServerHttpHeaderValidatorreplacesServerTransportSecurityValidator. #982 by @neerajbhatt- Streamable HTTP server session sweeping and keep-alive. #1130 by @Kehrlann
- Remove the 2024-11-05 protocol from Streamable HTTP. #1126 by @Kehrlann
- Reject non-application/json POST requests. #1164 by @Kehrlann
Bug fixes
- Stream leak when resuming with LAST_EVENT_ID. #1127 by @Kehrlann
- STDIO
sendMessageis now thread-safe. #935 by @nquinquenel - Malformed request bodies return 400 INVALID_REQUEST with Jackson 3. #1168 by @Kehrlann
- listXyz() methods return re-subscribable
Monos. #1175 by @kamisheng - NPE when changing features on a server with derived capabilities. #1178 by @itzjb
- NPE in
addRoot/removeRootwhen rootslistChangedis unset. #1179 by @Kehrlann - Automatic-Module-Name no longer contains hyphens. #1135 by @Kehrlann
- Log instead of aggregating exceptions in
JSONRPCErrorResponse. #1182 by @Kehrlann
New contributors
@slachiewicz, @YousefHaggy, @kamisheng, @itzjb, @neerajbhatt and @nquinquenel
Full Changelog: v2.0.1...v2.1.0
v1.1.5
What's Changed
- Fix error behavior on unregistered handlers in stateless server handler by @Kehrlann in #1109
- Remove aggregate exception from JSONRPCErrorResponse, log instead by @Kehrlann in #1183
- Streamable HTTP: Add session sweeping and close hanging streams by @Kehrlann in #1185
Full Changelog: v1.1.4...v1.1.5
v0.18.5
What's Changed
- Fix error behavior on unregistered handlers in stateless server handler by @olsavmic in #1104
- Reject non application/json POST requests by @Kehrlann in #1169
- Remove aggregate exception from JSONRPCErrorResponse, log instead by @Kehrlann in #1184
- Introduce session sweeping by @Kehrlann in #1187
New Contributors
Full Changelog: v0.18.4...v0.18.5
v2.0.1
What's Changed
- Upgrade conformance suite to 0.1.16, Spring AI conformance to 2.0.0 GA by @Kehrlann in #1032
- Return empty completion when no handler matches a valid ref by @jstar0 in #996
- Close response after sending error in McpStreamableServerSession#responseStream by @Kehrlann in #1041
- Fix error behavior on unregistered handlers in stateless server handler by @maff in #800
- Remove invalid WARN message for missing notification handler in stateless servers by @bperhaps in #835
- Fix SSE event classification to follow spec for missing event field by @iaJingda in #913
- fix: stop pagination on empty cursors by @nanookclaw in #954
- fix McpTransportContext.create() mutability issue and add tests by @iuliiasobolevska in #1076
- Bound HTTP server and client reads by @Kehrlann in #1102
- Bound STDIO server and client reads by @Kehrlann in #1103
Depedency updates
- Bump json-schema-validator to 2.0.4 / 3.0.6, jackson to 2.21.1 / 3.1.4 by @joaodinissf in #1058
New Contributors
- @jstar0 made their first contribution in #996
- @ammbra made their first contribution in #1044
- @maff made their first contribution in #800
- @bperhaps made their first contribution in #835
- @iaJingda made their first contribution in #913
- @nanookclaw made their first contribution in #954
- @iuliiasobolevska made their first contribution in #1076
Full Changelog: v2.0.0...v2.0.1
v1.1.4
v0.18.4
v2.0.0
MCP Java SDK 2.0.0 🎉
We're thrilled to announce the General Availability of the MCP Java SDK 2.0.0 — the first major release since 1.x and the culmination of three milestones (M1, M2, M3) and a release candidate (RC1). It tracks the latest 2025-11-25 MCP specification and lays the groundwork for everything that comes next. Huge thanks to everyone who contributed, tested the milestones, and filed feedback along the way! ❤️
Upgrading from 1.x? See the v2 migration guide and the updated documentation (#1024) for a step-by-step walkthrough of the breaking changes below.
Highlights
- A new JSON compatibility foundation for consistent forward/backward wire compatibility as the protocol evolves.
- Spec-accurate schema with enforced required fields and lenient wire deserialization.
- End-to-end validation of tool inputs and embedded JSON Schema documents (2020-12).
- Richer elicitation: client-side schema defaults, URL elicitation, and form-based elicitation schemas.
- Icons & metadata support (SEP-973) across the API.
- Streamable HTTP first: SSE transports are now deprecated in favor of Streamable HTTP.
- Cleaner, quieter logging with unified configuration and saner default levels.
⚠️ Breaking Changes
- feat!: consistent JSON forward/backward compatibility — the 2.0 foundation by @chemicL in #927
- feat!: enforce required MCP spec fields in McpSchema; lenient wire deserialization by @chemicL in #928
- feat!: add tool input arguments validation (#697) by @ashakirin in #873
- fix: Remove
JsonSchemaand use aMapforinputSchemato support JSON Schema dialects by @bilaloumehdi in #749
✨ New Features
- feat: validate embedded JSON Schema documents against the 2020-12 meta-schema (SEP-1613) by @chemicL in #949
- feat: Add SEP-973 icons and metadata support by @sainathreddyb in #912
- feat: client-side application of elicitation schema defaults (SEP-1034) by @chemicL in #976
- Add URL elicitation support (SEP-1036) by @Kehrlann in #993
- Add schemas for form-based elicitation by @Kehrlann in #1020
- feat: add support for
metaparameter in client paginated list queries by @smohite04 in #906 - Add 2025-11-25 spec version to all transports by @chemicL in #1025
🔌 Transports & Networking
- Deprecate SSE transports (in favor of Streamable HTTP) by @Kehrlann in #950
- Client transports: remove deprecated methods from builder by @Kehrlann in #899
- Server transports: remove deprecated methods from builder by @Kehrlann
- HttpClientStreamableHttpTransport: handle HTTP 405 by @Kehrlann
- Validate message endpoint in SSE client transport by @Kehrlann in #943
- DefaultSseMessageEndpointValidator allows same-origin message endpoints by @Kehrlann in #946
- Deprecate
Builder.customizeRequest()in favor ofhttpRequestCustomizer()by @gyeo009 in #791 - Expose request URI in
McpHttpClientAuthorizationErrorHandlerby @Kehrlann in #980 - Fix UTF-8 encoding for non-ASCII tool names in HTTP client transports by @rameshreddy-adutla in #850
🪵 Logging
🐛 Fixes & Polish
- fix: avoid dropped errors when transport is closed or uninitialized by @chemicL in #995
- fix: Return empty prompt completion result when prompt has no arguments by @chemicL in #934
- Revert removed builders for
ResourceandResourceTemplateby @chemicL in #947 - Clarify tool validation error messages by @tzolov in #1023
- Return void from
McpStatelessSyncServer#closeGracefullyinstead ofMonoby @tzolov in #1019 - fix: add missing
Export-Packageto mcp-json-jackson2 and mcp-json-jackson3 by @joaodinissf in #911
📚 Docs & Conformance
- Update documentation and migration notes for v2 by @chemicL in #1024
- conformance-tests: upgrade to MCP-security 0.1.11, implement CIMD by @Kehrlann in #975
- conformance: update to mcp-security 0.1.5, pass scope-step-up by @Kehrlann in #895
- docs: document best practice for handling argument errors in MCP tools by @radeshgovind-2005 in #891
- fix: proper URL links from README.md to 'Java Dependencies', 'Java MCP Client', 'Java MCP Server' pages by @sleepytomcat in #874
New Contributors
- @sleepytomcat made their first contribution in #874
- @radeshgovind-2005 made their first contribution in #891
- @gyeo009 made their first contribution in #791
- @rameshreddy-adutla made their first contribution in #850
- @smohite04 made their first contribution in #906
- @bilaloumehdi made their first contribution in #749
- @sainathreddyb made their first contribution in #912
- @joaodinissf made their first contribution in #911
Full Changelog: v1.1.0...v2.0.0
v0.18.3
v2.0.0-RC1
What's Changed
- feat: client-side application of elicitation schema defaults (SEP-1034) by @chemicL in #976
- Expose request URI in McpHttpClientAuthorizationErrorHandler by @Kehrlann in #980
- Unify logging config by @chemicL in #984
- Reduce logging levels by @chemicL in #985
- fix: add missing Export-Package to mcp-json-jackson2 and mcp-json-jackson3 by @joaodinissf in #911
- Add URL elicitation support (SEP-1036) by @Kehrlann in #993
- fix: avoid dropped errors when transport is closed or uninitialized by @chemicL in #995
New Contributors
- @joaodinissf made their first contribution in #911
Full Changelog: v2.0.0-M3...v2.0.0-RC1