Skip to content

Add MCP protocol version 2025-11-25 - #1304

Open
DivyaMaddipudi wants to merge 2 commits into
smithy-lang:mainfrom
DivyaMaddipudi:feat/add-protocol-version
Open

Add MCP protocol version 2025-11-25#1304
DivyaMaddipudi wants to merge 2 commits into
smithy-lang:mainfrom
DivyaMaddipudi:feat/add-protocol-version

Conversation

@DivyaMaddipudi

Copy link
Copy Markdown
Contributor

What behavior changes?

Before: When a client sends "protocolVersion": "2025-11-25" in the initialize request, the server treats it as UnknownVersion and omits protocolVersion from the response (falling back to the builder default "2024-11-05"). This breaks the handshake for clients expecting the server to echo back "2025-11-25".

After: The server recognizes "2025-11-25" as a known version and correctly echoes it back in the initialize response.

Why is this change needed?

Clients like Claude Code and Cursor have adopted MCP spec version 2025-11-25 and are sending it during initialization. The smithy-java MCP server only recognized versions up to 2025-06-18, causing initialization failures for these clients. The 2025-11-25 spec uses the same handshake model (initialize → response → initialized) as prior versions, so no protocol-level changes are required beyond accepting the version string.

How was this validated?

  • New ProtocolVersionTest: validates version resolution, null handling, ordering, and unknown-version behavior
  • New McpServerTest.initializeWithV2025_11_25ProtocolVersion: end-to-end test confirming the server echoes the version and serves tools/list after handshake
  • All 87 existing tests continue to pass

What should reviewers focus on?

  • ProtocolVersion.java: The only production change — adds v2025_11_25 to the sealed class hierarchy and switch statement. Note that defaultVersion() intentionally remains at v2025_03_26 until the new capabilities (tasks, richer elicitation) are implemented.

Additional Links

permits ProtocolVersion.UnknownVersion, ProtocolVersion.v2024_11_05, ProtocolVersion.v2025_03_26,
ProtocolVersion.v2025_06_18 {
ProtocolVersion.v2025_06_18, ProtocolVersion.v2025_11_25 {
public static final class v2025_11_25 extends ProtocolVersion {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you also intend to implement some of the new mcp features as well?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now we would like to support only the protocol version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants