fix: accept namespaced discovery server information - #1044
Merged
DaleSeo merged 2 commits intoJul 27, 2026
Merged
Conversation
tsarlandie-oai
force-pushed
the
codex/rmcp-1039-discovery-server-info
branch
from
July 25, 2026 00:47
2ef853e to
a08dd9a
Compare
alexhancock
previously approved these changes
Jul 27, 2026
alexhancock
marked this pull request as ready for review
July 27, 2026 14:34
alexhancock
approved these changes
Jul 27, 2026
howardjohn
reviewed
Jul 27, 2026
| } | ||
|
|
||
| #[test] | ||
| fn discover_result_serializes_top_level_server_info() { |
Contributor
There was a problem hiding this comment.
Is this right? looking at the latest spec https://modelcontextprotocol.io/specification/draft/schema#discoverresult this is not even a field in the type anymore after a late spec change modelcontextprotocol/modelcontextprotocol#3002.
Contributor
There was a problem hiding this comment.
Ah, I missed this. Thanks for connecting the dots.
9 tasks
howardjohn
added a commit
to howardjohn/rust-sdk
that referenced
this pull request
Jul 27, 2026
Fixes modelcontextprotocol#1064 Replaces modelcontextprotocol#1044 This removes the `server_info` field which is not part of the spec: https://modelcontextprotocol.io/specification/draft/schema#discoverresult.
howardjohn
added a commit
to howardjohn/rust-sdk
that referenced
this pull request
Jul 28, 2026
Fixes modelcontextprotocol#1064 Replaces modelcontextprotocol#1044 This removes the `server_info` field which is not part of the spec: https://modelcontextprotocol.io/specification/draft/schema#discoverresult.
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
serverInfoor_meta["io.modelcontextprotocol/serverInfo"]serverInfowhen both representations are presentDiscoverResult.server_infofield and top-level serialization shapeWhy
Discovery result deserialization only recognized server identity at the top level. Servers that place identity in the namespaced metadata field could therefore fail to deserialize as a discovery result.
The compatibility decoder accepts both representations without changing the existing Rust public API, generated schema, or server wire output.
Validation
server-statelessconformance scenario: 30/30 checks passedcargo +1.95.0 clippy -p rmcp --all-features --all-targets -- -D warningsFixes #1039