Negotiate modern and legacy protocol eras - #304
Open
pushpak1300 wants to merge 13 commits into
Open
Conversation
pushpak1300
force-pushed
the
mcp/v1/era-aware-client
branch
2 times, most recently
from
August 10, 2026 16:07
32feedd to
6666436
Compare
taylorotwell
force-pushed
the
mcp/v1/era-aware-client
branch
from
August 10, 2026 17:19
6666436 to
27a8ec6
Compare
pushpak1300
force-pushed
the
mcp/v1/era-aware-client
branch
from
August 11, 2026 04:56
27a8ec6 to
f3e4f47
Compare
pushpak1300
force-pushed
the
mcp/v1/era-aware-client
branch
2 times, most recently
from
August 11, 2026 07:32
ef53fb5 to
f424d10
Compare
pushpak1300
force-pushed
the
mcp/v1/era-aware-client
branch
from
August 11, 2026 07:56
f424d10 to
30fd800
Compare
pushpak1300
force-pushed
the
mcp/v1/era-aware-client
branch
2 times, most recently
from
August 11, 2026 14:01
c0d6503 to
e6d7a0c
Compare
pushpak1300
force-pushed
the
mcp/v1/era-aware-client
branch
from
August 11, 2026 14:12
e6d7a0c to
7bd22a4
Compare
taylorotwell
force-pushed
the
mcp/v1/era-aware-client
branch
from
August 11, 2026 14:30
7bd22a4 to
3f13af6
Compare
taylorotwell
force-pushed
the
mcp/v1/era-aware-client
branch
from
August 11, 2026 14:30
3f13af6 to
1ec7a5f
Compare
pushpak1300
marked this pull request as ready for review
August 12, 2026 09:10
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.
Currently the client always starts with the legacy
initializehandshake. That locks it to the pre-2026-07-28protocol flow and prevents it from talking to modern servers that expect discovery and per-request protocol metadata.Existing calls do not need to choose a protocol version:
The client probes the latest protocol first, then falls back to the legacy handshake only when the response indicates that the endpoint does not support the modern flow. If the server reports its supported versions, the client selects the newest mutual version instead of guessing.
A version can also be pinned when the server is already known:
The HTTP transport keeps session handling in the legacy flow and sends protocol-version headers in the modern flow. Method and name header mirroring is intentionally left for a follow-up so it can be modeled at the method boundary instead of in the transport.
Warning
Custom client transports no longer implement
setProtocolVersion(string). Protocol-aware transports should implementUsesProtocol::useProtocol(ProtocolVersion), while protocol-agnostic transports need no protocol method.ProtocolVersion::supported()is replaced byserverSupported(), withclientSupported()andinitializeSupported()exposing the other support lists.Tests cover negotiation, fallback behavior, version pinning, reconnects, protocol metadata, HTTP headers, and legacy sessions.