fix: remove server_info from DiscoverResult - #1065
Open
howardjohn wants to merge 1 commit into
Open
Conversation
howardjohn
force-pushed
the
modern/server-info
branch
from
July 27, 2026 23:17
7c53e17 to
6b9c7b5
Compare
tsarlandie-oai
suggested changes
Jul 27, 2026
tsarlandie-oai
left a comment
Contributor
There was a problem hiding this comment.
Moving serverInfo into _meta for serialization makes sense, but clients must remain able to consume legacy top-level serverInfo, and must not fail when server identity is absent: the specification makes this metadata optional. The current MissingServerInfo path already causes 15 client conformance failures and bypasses the conservative fallback in #1045. We should preserve the legacy deserialization test, emit only the modern representation, and accept both representations on input.
|
|
||
| #[test] | ||
| fn discover_result_prefers_top_level_server_info_over_namespaced_metadata() { | ||
| fn discover_result_ignores_legacy_top_level_server_info() { |
Contributor
There was a problem hiding this comment.
We should not change this test. I think it's a useful test to make sure we remain compatible with legacy servers.
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
force-pushed
the
modern/server-info
branch
from
July 28, 2026 00:02
6b9c7b5 to
b68d366
Compare
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.
Motivation and Context
Fixes #1064
Replaces #1044
This removes the
server_infofield which is not part of the spec:https://modelcontextprotocol.io/specification/draft/schema#discoverresult.
1044 add a synthetic server_info field; this PR removes it. This aligns with other types in this repo (using _meta as the source of truth, not a projection) and with other SDKS (Go and TypeScript do not have a
server_info) field. Instead, users can use the helper accessors.How Has This Been Tested?
Tested proxying to copilot MCP
Breaking Changes
Breaking from beta3 - the server_info field is removed
Types of changes
Checklist
Additional context