Skip to content

Releases: modelcontextprotocol/java-sdk

v2.0.0-M3

21 May 23:09

Choose a tag to compare

v2.0.0-M3 Pre-release
Pre-release

What's Changed

  • Validate message endpoint in SSE client transport by @Kehrlann in #943
  • DefaultSseMessageEndpointValidator allows same-origin message endpoints by @Kehrlann in #946
  • Revert removed builders for Resource and ResourceTemplate by @chemicL in #947
  • feat: validate embedded JSON Schema documents against 2020-12 meta-schema (SEP-1613) by @chemicL in #949
  • Deprecate SSE transports by @Kehrlann in #950
  • feat: Add SEP-973 icons and metadata support by @sainathreddyb in #912
  • conformance-tests: upgrade to MCP-security 0.1.11, implement CIMD by @Kehrlann in #975

New Contributors

Full Changelog: v2.0.0-M2...v2.0.0-M3

v1.1.3

21 May 23:09

Choose a tag to compare

What's changed

  • Validate message endpoint in SSE client transport by @Kehrlann in #943 (backport)
  • DefaultSseMessageEndpointValidator allows same-origin message endpoints by @Kehrlann in #946 (backport)

Full Changelog: v1.1.2...v1.1.3

v1.0.2

21 May 23:08

Choose a tag to compare

What's changed

  • Validate message endpoint in SSE client transport by @Kehrlann in #943 (backport)
  • DefaultSseMessageEndpointValidator allows same-origin message endpoints by @Kehrlann in #946 (backport)

Full Changelog: v1.0.1...v1.0.2

v0.18.2

06 May 16:50

Choose a tag to compare

What's Changed

  • Validate message endpoint in SSE client transport by @Kehrlann in #945

Full Changelog: v0.18.1...v0.18.2

v2.0.0-M2

13 May 14:50

Choose a tag to compare

v2.0.0-M2 Pre-release
Pre-release

What's Changed

  • fix: Return empty prompt completion result when prompt has no arguments by @chemicL in #934

Full Changelog: v2.0.0-M1...v2.0.0-M2

v1.1.2

25 Apr 09:16

Choose a tag to compare

What's Changed

  • HttpClientStreamableHttpTransport: handle HTTP 405 by @Kehrlann in #900

Full Changelog: v1.1.1...v1.1.2

v2.0.0-M1

13 May 14:49

Choose a tag to compare

v2.0.0-M1 Pre-release
Pre-release

MCP Java SDK 2.0.0-M1

The 2.0.0-M1 release introduces foundational changes for the 2.x line, focusing on flexibility, spec compliance, and robust validation. The primary themes driving this major release include:

1. Breaking API Changes in McpSchema for Forward/Backward Compatibility

The 1.x line was constrained by sealed interfaces, which made it impossible to add permitted subtypes without breaking exhaustive pattern-match switch expressions in caller code. In v2.0.0, these constraints are lifted:

  • Removal of Sealed Interfaces: Sealed interfaces have been removed from JSONRPCMessage, Request, Result, Notification, ResourceContents, CompleteReference, and Content. This allows domain types to absorb new fields and subtypes without breaking existing clients or servers.
  • Lenient Deserialization: All domain records now tolerate unknown JSON fields, ensuring that a client built against an older SDK version won't fail when a newer server sends unrecognized fields.
  • Dialect Support: JsonSchema was removed and replaced with a Map for inputSchema to properly support various JSON Schema dialects.

2. Incorporating Breaking Changes for the 2025-11-25 MCP Specification

The release aligns with the 2025-11-25 MCP specification updates:

  • Tool Input Validation: Tool input arguments validation is now activated by default. Invalid inputs will now cause a tool execution error, enforcing stricter compliance with the spec.
  • Spec-Required Fields: Adjustments to how nulls and absent fields are handled on the wire (e.g., CompleteCompletion.total and .hasMore are now absent from the wire when not set, rather than being emitted as null).

3. API Cleanup and Modernization

As a major version bump, v2.0.0 takes the opportunity to clean up the API surface:

  • Removal of Deprecated Methods: Deprecated methods from the Server transports builder have been removed entirely.
  • Transport Improvements: Added proper handling for HTTP 405 in HttpClientStreamableHttpTransport and fixed UTF-8 encoding for non-ASCII tool names.
  • Pagination Support: Added support for the meta parameter in client paginated list queries.

Detailed Commit Log (v1.1.0 to v2.0.0-M1)


New contributors

A big thank you to the following contributors who made their first commit in this release:

Full Changelog: v1.1.0...v2.0.0-M1

v1.1.1

27 Mar 20:24

Choose a tag to compare

What's Changed

Full Changelog: v1.1.0...v1.1.1

v1.0.1

27 Mar 20:15

Choose a tag to compare

What's Changed

Full Changelog: v1.0.0...v1.0.1

v1.1.0

13 Mar 13:01

Choose a tag to compare

What's Changed

  • Use dynamic jar discovery for conformance tests by @chemicL in #832
  • Add migration notes for 0.18.1 to 1.0.0 update by @chemicL in #828
  • Support resource subscriptions by @chemicL in #839
  • Add explicit UTF-8 charset to InputStreamReader in StdioServerTransportProvider by @xxxxxxjun in #826
  • Document resource subscription support in server and client guides by @tzolov in #843
  • Fix elicitation and resource subscription tests that deadlock on a single CPU by @chemicL in #854
  • HttpClientStreamHttpTransport: add authorization error handler by @Kehrlann in #861
  • fix: prepare POMs for Maven Central release readiness by @tzolov in #863

New Contributors

Full Changelog: v1.0.0...v1.1.0