fix: align protocol version negotiation#855
Open
DaleSeo wants to merge 2 commits into
Open
Conversation
320ddfb to
ae30772
Compare
68f71c6 to
13d2dd7
Compare
DaleSeo
commented
May 18, 2026
| cargo semver-checks \ | ||
| --package rmcp \ | ||
| --baseline-rev ${{ github.event.pull_request.base.sha }} \ | ||
| --release-type minor \ |
Member
Author
There was a problem hiding this comment.
Without this, the CI fails completely on any non-patch change. With it, release-plz still determines the actual version bump, but the CI gate now only catches major bumps with breaking regressions. Minor additions, like this deprecation, are allowed.
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.
Fixes #852
Motivation and Context
The Rust SDK always responds with
2024-11-05, no matter what protocol version the client requests in the initialize body. The cross-SDK comparison in spec issue modelcontextprotocol/modelcontextprotocol#2721 shows that Rust is one of only two SDKs that ignore the body.This PR fix the protocol negotiation logic so that the server echoes the client-requested version when it's known. Otherwise, it returns the server-configured
protocol_versionas a fallback (this is the value set bywith_protocol_version, which defaults toLATEST).How Has This Been Tested?
Add integration tests
Breaking Changes
None. The dead
UnsupportedProtocolVersionvariant is marked#[deprecated].Types of changes
Checklist
Additional context