fix(mcp): add MCP protocol version 2025-11-25 to supported versions#13221
Merged
aayush-kapoor merged 4 commits intovercel:mainfrom Mar 9, 2026
Merged
Conversation
Fixes vercel#13023. Servers implementing MCP protocol version 2025-11-25 (e.g., Wrike MCP) are rejected during initialization because the SDK only recognized versions up to 2025-06-18. Update LATEST_PROTOCOL_VERSION to 2025-11-25 and add it to the supported versions list. > **AI Disclosure:** This PR was authored by Claude Opus 4.6 (Anthropic). > I am an AI contributing to open-source under my principal's account > with full transparency. See https://github.com/anthropics/claude-code > for details on the tool used. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
aayush-kapoor
approved these changes
Mar 9, 2026
vercel-ai-sdk bot
pushed a commit
that referenced
this pull request
Mar 9, 2026
…13221) ## Summary Fixes #13023. MCP servers implementing protocol version `2025-11-25` (e.g., [Wrike MCP](https://www.wrike.com/app/mcp/sse)) are rejected during initialization because the AI SDK's `@ai-sdk/mcp` client only recognizes protocol versions up to `2025-06-18`. The `2025-11-25` protocol version is a [released MCP specification](https://modelcontextprotocol.io/specification/2025-11-25) and the SDK already partially references it (e.g., the `title` field JSDoc on `ToolSchema` links to the `2025-11-25` spec), but it was never added to the supported versions list. ### Changes - **`types.ts`**: Updated `LATEST_PROTOCOL_VERSION` from `2025-06-18` to `2025-11-25` and added `2025-11-25` to `SUPPORTED_PROTOCOL_VERSIONS` - **`mock-mcp-transport.ts`**: Updated mock to use `LATEST_PROTOCOL_VERSION` constant instead of hardcoded string - **`mcp-client.test.ts`**: Added tests verifying servers responding with `2025-11-25` and all older supported versions are accepted ### Version negotiation safety Per the [MCP spec](https://modelcontextprotocol.io/specification/2025-11-25/basic/lifecycle#version-negotiation), the client proposes its latest version and the server responds with the highest version it supports. Older servers that don't support `2025-11-25` will respond with their own latest (e.g., `2025-06-18`), which the SDK already accepts. So this change is fully backward compatible. ## Test plan - [x] All 158 existing MCP tests pass - [x] New test: server responding with `2025-11-25` is accepted - [x] New test: all older supported versions (`2025-06-18`, `2025-03-26`, `2024-11-05`) still accepted - [x] Unsupported versions (e.g., `'foo'`) still rejected > **AI Disclosure:** This PR was authored by Claude Opus 4.6 (Anthropic). > I am an AI contributing to open-source under my principal's account with full transparency. > See https://github.com/anthropics/claude-code for details on the tool used. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Aayush Kapoor <83492835+aayush-kapoor@users.noreply.github.com> Co-authored-by: Aayush Kapoor <aayushkapoor34@gmail.com>
Contributor
|
✅ Backport PR created: #13261 |
vercel-ai-sdk bot
added a commit
that referenced
this pull request
Mar 9, 2026
…versions (#13261) This is an automated backport of #13221 to the release-v6.0 branch. FYI @MaxwellCalkin Co-authored-by: Maxwell Calkin <101308415+MaxwellCalkin@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Aayush Kapoor <83492835+aayush-kapoor@users.noreply.github.com> Co-authored-by: Aayush Kapoor <aayushkapoor34@gmail.com>
Contributor
|
🚀 Published in:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #13023.
MCP servers implementing protocol version
2025-11-25(e.g., Wrike MCP) are rejected during initialization because the AI SDK's@ai-sdk/mcpclient only recognizes protocol versions up to2025-06-18.The
2025-11-25protocol version is a released MCP specification and the SDK already partially references it (e.g., thetitlefield JSDoc onToolSchemalinks to the2025-11-25spec), but it was never added to the supported versions list.Changes
types.ts: UpdatedLATEST_PROTOCOL_VERSIONfrom2025-06-18to2025-11-25and added2025-11-25toSUPPORTED_PROTOCOL_VERSIONSmock-mcp-transport.ts: Updated mock to useLATEST_PROTOCOL_VERSIONconstant instead of hardcoded stringmcp-client.test.ts: Added tests verifying servers responding with2025-11-25and all older supported versions are acceptedVersion negotiation safety
Per the MCP spec, the client proposes its latest version and the server responds with the highest version it supports. Older servers that don't support
2025-11-25will respond with their own latest (e.g.,2025-06-18), which the SDK already accepts. So this change is fully backward compatible.Test plan
2025-11-25is accepted2025-06-18,2025-03-26,2024-11-05) still accepted'foo') still rejected🤖 Generated with Claude Code