Skip to content

fix: accept namespaced discovery server information#1044

Draft
tsarlandie-oai wants to merge 1 commit into
modelcontextprotocol:mainfrom
tsarlandie-oai:codex/rmcp-1039-discovery-server-info
Draft

fix: accept namespaced discovery server information#1044
tsarlandie-oai wants to merge 1 commit into
modelcontextprotocol:mainfrom
tsarlandie-oai:codex/rmcp-1039-discovery-server-info

Conversation

@tsarlandie-oai

Copy link
Copy Markdown

Summary

  • accept both top-level serverInfo and _meta["io.modelcontextprotocol/serverInfo"]
  • preserve unrelated metadata
  • prefer top-level identity when both forms are present
  • deserialize conformance-server responses as ServerResult::DiscoverResult

Why

Discovery result deserialization only recognized server identity at the top level. Servers that correctly placed the identity in the namespaced metadata field therefore lost that information and could fail to deserialize as a discovery result.

This accepts both representations with a deterministic precedence rule and without disturbing other metadata.

Validation

  • comprehensive regression suite: 516 tests passed
  • whole-workspace formatting check passed
  • all-target, all-feature Clippy passed with the documented beta-only toolchain warning suppressed

Fixes #1039

@github-actions github-actions Bot added T-test Testing related changes T-core Core library changes labels Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-core Core library changes T-test Testing related changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DiscoverResult rejects valid discovery responses with server identity in _meta

1 participant