docs: require Server Card to be consistent with runtime behavior#25
Merged
Conversation
#23) The Server Card spec describes what a card declares (identity, transport, supported protocol versions) but had no normative requirement that those declarations match the server's actual runtime behavior. A Server Card is fetched before the client connects, so a stale or incorrect card can claim a name, version, transport, or protocol-version set that contradicts what a client observes after connecting. schema.ts already encodes the *omission* half of the threat model (primitives are excluded because a static manifest drifts from runtime). This adds the complementary requirement for the fields the card *does* declare. docs/discovery.md: - New "Consistency with Runtime Behavior" subsection under "MCP Server Cards": a Server Card SHOULD accurately reflect runtime behavior; the serverInfo (name, version) and supportedVersions returned by server/discover, and the transport served at each remotes[] endpoint, SHOULD NOT contradict the card. Clients MUST NOT treat card contents as authoritative for security/access-control decisions and SHOULD verify against the live connection. - New "Server Card Accuracy" subsection under Security Considerations framing an inaccurate card as a mild confusion/downgrade vector. schema.ts: short pointer comment in the ServerCard JSDoc referencing the discovery-doc requirement; schema.json regenerated in the same commit. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
ea3687a to
aa8a42a
Compare
SamMorrowDrums
previously approved these changes
Jun 8, 2026
SamMorrowDrums
left a comment
Collaborator
There was a problem hiding this comment.
I think this covers it well, in some ways it is wordier than I had anticipated - but other then possible brevity pass, I am happy.
Tighten the new "Consistency with Runtime Behavior" and "Server Card Accuracy" prose without changing any normative content — same SHOULD / SHOULD NOT / MUST NOT requirements, same server/discover reference. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
SamMorrowDrums
approved these changes
Jun 8, 2026
SamMorrowDrums
left a comment
Collaborator
There was a problem hiding this comment.
Thanks I think this is solid.
|
Like the wording too. Thank you considering this and expanding the doc. |
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.
Closes #23.
What
Adds the missing normative requirement that a Server Card's declared values must not contradict the server's actual runtime behavior. The schema already encodes the omission half of the threat model (primitives are deliberately excluded because a static manifest drifts from runtime); this adds the complementary requirement for the fields the card does declare.
docs/discovery.mdserverInfo(name,version) andsupportedVersionsreturned byserver/discover, plus the transport actually served at eachremotes[]endpoint (and descriptivetitle/description/icons), SHOULD NOT contradict the equivalent values declared in the Server Card.schema.tsServerCardJSDoc referencing the discovery-doc requirement, complementing the existing primitives-omission rationale.schema.jsonregenerated vianpm run generatein the same commit (CIcheckenforces sync).RFC 2119 keywords are used consistently with the rest of
docs/discovery.md. The runtime reference is phrased around the draft spec'sserver/discoveroperation — the pre-initializeexchange that actually returnsserverInfo/supportedVersions— rather than SEP-2127'sDiscoverResultResponse, which has no term in this repo.Security rationale
Because a Server Card is consumed before the client connects, an inaccurate card can steer a client toward a weaker configuration (downgrade) or a misidentified server (confusion) before it has observed the server's actual
server/discoverresponse. Treating the card as advisory rather than authoritative contains this risk.Scope
Small and focused strictly on the card-vs-runtime consistency requirement. Distinct from #10 (the inverse — primitives the card omits) and #13/#9/#11/#12/#14/#21 (none touch card-vs-runtime consistency). No unrelated changes.
Verification
npm run checkpasses —schema.jsonis in sync withschema.tsandtsc --noEmitis cleannpm run validatepasses — all 7 examples validate against the regenerated schemanpm run formatclean — no formatting changes leftschema.jsonregenerated and committed alongside theschema.tschange (CIcheckenforces this)server/discoverspec link verified to resolve to a real draft-spec page documentingserverInfo/supportedVersions0d0389b) — build, Analyze (actions), and CodeQL all passThis is a docs/comment-only change (no runtime code paths), so the verification is the build/schema toolchain rather than e2e tests. Local toolchain output:
Opened for human review — not merged, per repo policy.