docs: add Server Cards (SEP-2127) usage guide#1
Open
tadasant wants to merge 1 commit into
Open
Conversation
Document the experimental Server Cards / AI Catalog discovery feature: building and serving a Server Card, mounting it plus the AI Catalog on the ASGI app, the discovery HTTP semantics (well-known path + fallback, strong SHA-256 ETags, conditional GET, CORS/Cache-Control headers), and client-side discovery. Adds docs/server-cards.md (with verified, type-checked snippets) and a single nav entry. No source or test changes. 🤖 Authored via Claude Code, on behalf of @tadasant.
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.
What this adds
Documentation for the experimental MCP Server Cards (SEP-2127) and AI Catalog discovery feature you built in modelcontextprotocol#2951. The PR shipped
src/+tests/with no docs, so this fills that gap:docs/server-cards.md— a guide covering:build_server_card,streamable_http_app()ASGI app (mount_server_card,server_card_entry,mount_ai_catalog),/.well-known/ai-catalog.json) with the MCP-scoped…/mcp/catalog.jsonfallback, strong SHA-256 ETags + conditionalIf-None-Match/304, and theDISCOVERY_HEADERS(CORS +Cache-Control),discover_server_cards) and the lower-level helpers (well_known_ai_catalog_url,fetch_ai_catalog,fetch_server_card,load_server_card), including the note about passing your ownhttp_clientfor network policy,urn:air:{publisher}:{name}identifier derivation.nav:line inmkdocs.ymlwiring the page in.Additive — none of your code changes
This is purely documentation. It changes no source and no tests.
git diff --statagainstexperimental-server-card-v2:It targets
experimental-server-card-v2(your PR branch), not upstreammain, so you can fold it straight into modelcontextprotocol#2951.A note on conventions
The repo's docs pages embed code inline with
title="…"fences (e.g.docs/testing.md) rather than via adocs_src/snippet directory, and the prose pages live flat indocs/— so this page matches that. The new nav entry sits under the existing Documentation section (there is no "Advanced" section). Every code snippet is based on the real public signatures from your branch, and the server-side examples use the low-levelServerto match yourtests/experimental/server_card/test_server.py.Verification
uv run mkdocs build --strictpasses — no broken nav, links, or mkdocstrings cross-references. Output:Documentation built in ~19s, exit 0.uv run pyright→0 errors, 0 warnings. (Doc snippets aren't part of CI'spytest-examplesrun, which only targetsREADME.v2.md, so this was verified locally.)Disclosure
🤖 Opened via Claude Code, on behalf of @tadasant.