docs: add Server Cards (SEP-2127) usage guide#1
Open
tadasant wants to merge 1 commit into
Open
Conversation
3c4d2b0 to
9f42184
Compare
🤖 Authored via Claude Code, on behalf of @tadasant.
89e0f23 to
8bbe795
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.
What this adds
Documentation for the experimental MCP Server Cards (SEP-2127) + AI Catalog discovery feature you built on
experimental-server-card-v2. The feature shipped without docs; this PR adds a guide so the capability is discoverable and usable.docs/advanced/server-cards.md— a full guide: what a Server Card / AI Catalog is (leads with an experimental / opt-in warning), a discovery sequence diagram, the card fields, building & serving a card on an ASGI app, static-file hosting, discovery HTTP semantics (DISCOVERY_HEADERS, strong-ETag conditional GET /304, the/.well-known/ai-catalog.jsonpath with/.well-known/mcp/catalog.jsonfallback), client-side discovery, and theurn:air:identifier derivation.docs_src/server_cards/tutorial00{1..4}.py— the runnable snippets the page embeds via--8<--, written against the real public signatures (build_server_card,mount_server_card,mount_ai_catalog,server_card_entry,discover_server_cards,fetch_ai_catalog/fetch_server_card, the low-levelServer).mkdocs.yml— one nav line adding the page under Advanced.Scope
Additive and docs-only. No
src/ortests/changes — the single non-doc edit is the one-line nav entry. It targetsexperimental-server-card-v2so it folds into modelcontextprotocol#2951 alongside the code it documents.git diff --statvs the base:Verification
uv run pyright docs_src/server_cards→0 errors, 0 warnings, 0 informations.uv run pytest tests/docs_src/test_shape.py→451 passed— the new chapter imports cleanly against the current SDK, uses only publicmcpmodules, and every snippet is included by the page.scripts/docs/build.sh(Zensical--strict+check_crossrefs.py+llms_txt.py) → exit 0,No issues found;site/advanced/server-cards/index.htmlrenders with all four snippets embedded.Notes
304branch indiscovery_response(ai_catalog.py) that drops the CORS headers; that's already flagged inline on Add experimental Server Cards support (SEP-2127) modelcontextprotocol/python-sdk#2951 and is out of scope here.Serverfor the server-side examples (matching this branch's owntests/experimental/server_card/test_server.py), sincebuild_server_cardreads plain identity attributes.🤖 Opened via Claude Code, on behalf of @tadasant.