Repository navigation
Conversation
A legacy server may reject server/discover with HTTP 200 and a JSON-RPC error while setting Mcp-Session-Id. The streamable client stored that ID and sent it on the fallback initialize, so a server that assigned a new session ID made Connect fail with "mismatching session IDs". server/discover is sessionless in 2026-07-28, and under 2025-11-25 the session ID belongs to the response carrying the InitializeResult, so the client no longer records a session ID from a server/discover response. Fixes modelcontextprotocol#1522 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
This PR has been closed automatically. This repo only keeps pull requests open when they come from a maintainer, or from a contributor a maintainer has assigned to the linked issue, and you aren't currently assigned to #1522. You're welcome to keep pushing commits here (just avoid force-pushing, since GitHub can't reopen a rewritten branch), but that on its own won't get the PR reviewed or the issue assigned. There's no need to open a new PR either way. Maintainers: reopen, remove |
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.
A legacy server may reject
server/discoverwith HTTP 200 and a JSON-RPC error while settingMcp-Session-Id. The streamable client stored that ID and sent it on the fallbackinitialize, so a server that assigned a new session ID madeConnectfail withmismatching session IDs.server/discoveris sessionless in 2026-07-28, and under 2025-11-25 the session ID belongs to the response carrying theInitializeResult, so the client no longer records a session ID from aserver/discoverresponse.The new table test covers the HTTP 200 / -32601 case and four HTTP 400 rejection shapes seen from real legacy servers (plain text, -32600 with an unmatched id, -32600 with legacy-only
data.supported), each with a session ID on the discover response.Fixes #1522
AI disclosure: written with Claude Code; I reviewed the change and can explain it.