docs(discovery): clarify /server-card discovery (bare-GET + resolution rule) + evaluation of a /server-card.json convention#38
Closed
tadasant wants to merge 3 commits into
Closed
Conversation
Adds a draft proposal under docs/proposals/ evaluating the suggestion to recommend fetching Server Cards at <mcp_url>/server-card.json via a plain GET. The writeup corrects the motivating premise (discovery already uses a path suffix, /server-card, not content negotiation against /mcp), lays out the honest pros/cons of the .json spelling, and recommends keeping /server-card while adding a non-breaking bare-GET guarantee and a suffix-resolution rule. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Scope the "catalog url is pre-resolved" claim: note templated/multi-tenant remotes have no single concrete card URL either. - Mark the application/json media-type con as contingent on open question #4. - Clarify the bare-GET MUST is non-breaking for consumers but a new producer obligation (AGENTS.md Principle 4). - Add an Authenticated/private-servers caveat scoping the bare-GET MUST, and a Collision-with-a-real-route consideration. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Apply the two non-breaking normative edits the proposal recommends, so the change is ready to merge if maintainers agree (the reserved suffix stays /server-card; .json is deliberately not adopted): - Bare-GET guarantee: if a server hosts its card at the reserved /server-card path, a plain GET (no Accept) MUST return it. Scoped to the reserved path; hosting there remains OPTIONAL and auth/catalog-url paths are unaffected. - Suffix-resolution rule: append to the RFC 3986 path component after template expansion, collapse a single trailing slash, and do not carry query/fragment onto the card URL (query-routed servers publish an explicit catalog url). - Reconcile the CORS allow-list with the recommended Accept header. Fresh-eyes review feedback addressed: lead the bullet with the conditional before the MUST; note the bare-GET path as the cross-origin CORS fallback. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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
Evaluates the suggestion to fetch a Server Card via a plain
GETat a fixed path suffix —<mcp_url>/server-card.json— to spare simple scrapers from HTTP content-type negotiation, and implements the recommended outcome as concrete, mergeable edits todocs/discovery.mdso maintainers can merge directly if they agree.Two files change:
docs/proposals/server-card-json-suffix.md(new) — the objective written evaluation, pros/cons, and recommendation.docs/discovery.md— the two non-breaking normative clarifications the evaluation recommends (see below). The reserved suffix stays/server-card;.jsonis deliberately not adopted.Key finding: the motivating premise is already largely satisfied
The suggestion is pitched as "switch away from content negotiation to a path suffix." But
docs/discovery.mdalready reserves a path-suffix convention —GET <streamable-http-url>/server-card— and its "Alternatives considered" section already explicitly rejects serving the card off the bare/mcpendpoint because that "forces content negotiation to disambiguate 'give me the card' from 'open the stream.'" The headline win (plain GET to a predictable URL) is the design the spec landed on in #22 (resolving #12).That narrows the live decision to two questions, both addressed: the
.jsonspelling, and how hard to lean onAccept.Recommendation (argued, not rubber-stamped) — and what this PR implements
/server-card; do NOT adopt/server-card.json..json's main benefit (static-host content-type inference) is weakest at the dynamic MCP endpoint the suffix governs, it nudges static hosts toward genericapplication/jsonrather than the registeredapplication/mcp-server-card+json, it couples the path to a serialization, and it re-litigates a just-decided experimental convention. The.jsonoption is presented fairly, then argued against. → No-op by design (reserved suffix unchanged).GETguarantee — implemented indiscovery.md: if a server hosts its card at the reserved/server-cardpath, a plainGET(noAccept) MUST return it. Scoped to the reserved path; hosting there stays OPTIONAL; auth-gated and catalog-url-only servers are unaffected. This is the cheap, non-breaking change that delivers the scraper-friendliness the suggestion wants.discovery.md: append/server-cardto the RFC 3986 path component after template expansion, collapse a single trailing slash, and do not carry the endpoint's query/fragment onto the card URL (query-routed/multi-tenant servers publish an explicit catalogurl). This closes a real ambiguity ("just tack it on the end of an/mcpURL" is not unambiguous — query strings, trailing slashes, templated URLs) that exists for the current/server-cardtoo.discovery.md: addAcceptto the discoveryAccess-Control-Allow-Headersexample so a browser client can actually send the recommendedAcceptcross-origin; the bare-GETguarantee is the documented fallback.Reviewers who disagree with the normative edits can drop the
discovery.mdchanges and keep just the evaluation doc.Verification
docs/proposals/; thediscovery.mdedits are confined to the Server Card discovery convention this repo owns. Honors the conservative, spec-tracked posture (AGENTS.md).docs/discovery.md, README,examples/), correcting the premise where inaccurate.GETrule is non-breaking for card consumers; it is a new producer obligation, called out explicitly perAGENTS.mdPrinciple 4. The reserved path spelling is unchanged, so no existing card URL breaks.npm run check(schema in sync +tsc) ✓,npm run validate(all 7 examples) ✓,prettier --checkon both changed docs ✓.discovery.mdedits); all SHOULD-FIX feedback addressed — catalog-urlscoping for templated servers, media-type con marked contingent, producer-vs-consumer precision, auth/private-server caveat, collision-with-route note, conditional-before-MUST ordering, and the CORS/Acceptreconciliation.🤖 Generated with Claude Code