Title: Add experimental Server Cards support (SEP-2127) by SamMorrowDrums · Pull Request #2951 · modelcontextprotocol/python-sdk · GitHub
Open Graph Title: Add experimental Server Cards support (SEP-2127) by SamMorrowDrums · Pull Request #2951 · modelcontextprotocol/python-sdk
X Title: Add experimental Server Cards support (SEP-2127) by SamMorrowDrums · Pull Request #2951 · modelcontextprotocol/python-sdk
Description: Closes modelcontextprotocol/experimental-ext-server-card#16 Summary Experimental SDK support for MCP Server Cards (SEP-2127) and AI Catalog discovery, opt-in under mcp.{shared,server,client}.experimental. As an experimental extension, these APIs may change without notice. Takes over #2696 (thanks @dsp-ant — the original two commits are preserved with authorship), rebased cleanly onto current main. #2696 was stacked on the Tasks (SEP-1686) work, since removed from main (#2714). Opening as a draft for maintainer review — per the extension repo's contribution rules, AI-assisted changes are not self-merged. What it does A server builds a Server Card from its own identity, serves it from a Starlette app, and advertises it through an AI Catalog. A client discovers a host's catalog, then fetches and validates the cards it references. Cards describe identity and remote (HTTP) transport only — locally-runnable package metadata stays in the MCP Registry's server.json. Conformance to the v1 schema $schema is pinned to https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json; a card pointing at the registry's server.schema.json is rejected. A document that omits $schema is defaulted to the v1 URL rather than rejected. Media type — serving and catalog entries use the canonical application/mcp-server-card+json; the client recognizes only this type and skips catalog entries declaring anything else. Catalog identifiers are urn:air:{publisher}:{name} — the card name's reverse-DNS namespace turned back into the publisher's forward-DNS domain (com.example/weather → urn:air:example.com:weather). Discovery goes through an AI Catalog at /.well-known/ai-catalog.json, with the MCP-scoped /.well-known/mcp/catalog.json as a fallback. Discovery responses carry the CORS headers the spec requires (MUST) and Cache-Control (SHOULD). version accepts exact versions only; ranges and wildcards (^1.2.3, ~1.2.3, >=1.2.3, 1.x, 1 || 2, 1 - 2) are rejected. Verification pytest tests/experimental/, ruff check / ruff format --check, and pyright all pass; the full CI matrix (Python 3.10–3.14, Ubuntu + Windows, client/server conformance) is green. 🤖 Conformance commit assisted by GitHub Copilot. Update: Added strong SHA-256 ETag headers and If-None-Match conditional request handling for both Server Card and AI Catalog discovery responses, matching modelcontextprotocol/experimental-ext-server-card#33.
Open Graph Description: Closes modelcontextprotocol/experimental-ext-server-card#16 Summary Experimental SDK support for MCP Server Cards (SEP-2127) and AI Catalog discovery, opt-in under mcp.{shared,server,client}.experi...
X Description: Closes modelcontextprotocol/experimental-ext-server-card#16 Summary Experimental SDK support for MCP Server Cards (SEP-2127) and AI Catalog discovery, opt-in under mcp.{shared,server,client}.experi...
Opengraph URL: https://github.com/modelcontextprotocol/python-sdk/pull/2951
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:a32cf12c-573b-ebe5-d5a1-d0c442c2654b |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 9D8C:21BB41:1C2719C:2600E0B:6A598624 |
| html-safe-nonce | fbc2a714171a9484a5ca5077c7087411358da1eea4c59060be71bde33fcf33a6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RDhDOjIxQkI0MToxQzI3MTlDOjI2MDBFMEI6NkE1OTg2MjQiLCJ2aXNpdG9yX2lkIjoiNDc3MjczNDEwMzk2NzA3MzgyOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 61ee535dc97a597e0bac63b63def4819dfdc0a517d88144484762dadd771439a |
| hovercard-subject-tag | pull_request:3914876711 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/modelcontextprotocol/python-sdk/pull/2951/files |
| twitter:image | https://avatars.githubusercontent.com/u/4811358?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/4811358?s=400&v=4 |
| og:image:alt | Closes modelcontextprotocol/experimental-ext-server-card#16 Summary Experimental SDK support for MCP Server Cards (SEP-2127) and AI Catalog discovery, opt-in under mcp.{shared,server,client}.experi... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | a540949572872b935b393b36db38922db390ae71c859537d741b8f3eb7e545b5 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/modelcontextprotocol/python-sdk git https://github.com/modelcontextprotocol/python-sdk.git |
| octolytics-dimension-user_id | 182288589 |
| octolytics-dimension-user_login | modelcontextprotocol |
| octolytics-dimension-repository_id | 862584018 |
| octolytics-dimension-repository_nwo | modelcontextprotocol/python-sdk |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 862584018 |
| octolytics-dimension-repository_network_root_nwo | modelcontextprotocol/python-sdk |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 624bb50a7497aa346bef8cc3743af408a9ea10ca |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width