Make the extension card-only: remove registry Server/package types (v2)#28
Open
dsp-ant wants to merge 1 commit into
Open
Make the extension card-only: remove registry Server/package types (v2)#28dsp-ant wants to merge 1 commit into
dsp-ant wants to merge 1 commit into
Conversation
Server Cards describe remote connectivity only. The Server type and the package-installation machinery (Package, PackageTransport, StdioTransport, StreamableHttpPackageTransport, SsePackageTransport, Argument helpers) were carried over from the abandoned core-spec PR when this repo was bootstrapped; locally-installable package metadata is owned by the MCP Registry's server.json schema, not by this extension. - schema.ts: drop Server and all package types; keep ServerCard, Remote, Repository, Icon, MetaObject, and the Input/KeyValueInput helpers that remotes still use for URL templating and headers - generate with --noExtraProps so a document containing packages (or any unknown property) is rejected; _meta stays open as the extension point - bump the schema URL family from /v1/ to /v2/ (breaking change) - remove Server examples; add an invalid example asserting that a card with packages fails validation - README: replace the companion-Server framing with a 'Relationship to the MCP Registry' section
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 does
Makes this extension card-only and remote-only: removes the registry-shaped
Servertype and all package-installation types, so the only document shape this repo defines isServerCard(identity,remotes,icons,repository,websiteUrl,_meta).Why
The SEP-2127 review consensus was that a Server Card should describe remote (HTTP) connectivity only, with minimal information. The
Serversuperset and the package-install machinery (Package,PackageTransport,StdioTransport,StreamableHttpPackageTransport,SsePackageTransport,registryType,runtimeHint, runtime/package arguments,fileSha256, …) were carried over from the abandoned core-spec PR (modelcontextprotocol/modelcontextprotocol#2652) when this repo was bootstrapped in #1 — they were never kept by a deliberate decision. That shape is the MCP Registry'sserver.json, which is owned by the registry, not by this extension.What changed
Server,Package, the three package transports, and theArgument/PositionalArgument/NamedArgumenthelpers that only package types referenced. KeptServerCard,Remote,Repository,Icon,MetaObject, and theInput/KeyValueInputhelpers that remotes still need for URL templating and headers. FoldedInputWithVariablesintoKeyValueInput, its only remaining subtype.--noExtraProps, so Server Card objects are closed (additionalProperties: false) and a document containingpackages(or any unknown field) is rejected._metastays open as the extension point —MetaObjectuses an interface-with-index-signature form, with a comment explaining why that form is load-bearing under the flag.$schemaURL family bumps from/v1/to/v2/per the README's convention. The$schemapattern is also pinned toserver-card.schema.json(the generic[^/]+wildcard only existed to admitserver.schema.json).examples/Server/; added invalid exampleswith-packages.json(a card withpackagesmust fail validation) andwrong-schema-name.json(the removedserver.schema.jsonURL must fail).validate-examples.tsnow only knows aboutServerCardand fails (instead of exiting green) if no examples are found.Serverframing with a "Relationship to the MCP Registry" section — package metadata lives in the registry'sserver.jsonschema; a registry entry MAY reference or embed a card's remote info; vendors needing install hints can use namespaced_meta. The schema-URL and graduation-plan sections note that the closed-object behavior comes from the generator flag and must be carried over on graduation, since the main spec's generator doesn't pass--noExtraProps.The Catalog spec in
docs/discovery.mdonly references Server Cards, so it needed no changes (and this PR deliberately doesn't touch the open question in #26 about the Catalog itself).Breaking changes (called out per the contribution guidelines)
Serverdefinition and all package types are gone fromschema.json.v2schemas reject unknown properties everywhere, not justpackages— av1card with any undeclared field is invalid underv2. Any revision of the shape now publishes a newvNfamily; extension data belongs in_meta.How this was verified
npm run check— regeneratingschema.jsonfromschema.tsproduces no diff, andtscpasses.npm run validate— all 8 examples pass: 2 valid remote-only cards validate cleanly; 6 invalid ones (including thepackagescard and the staleserver.schema.jsonURL) are rejected.npm run format:checkpasses.packages,npm,pypi,oci,nuget,mcpb,stdio,uvx,docker,runtimeHint) returns only the intentional mentions in the registry-relationship section, the versioning history note, and the invalid example that exists to be rejected.