• TypeScript 100%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Tadas Antanavicius 3b2d974dbb
docs(discovery): rename Catalog Entry mediaType field to type (ADR 0014) (#32)
## What

Adapts the **MCP Catalog Entry** in `docs/discovery.md` to [AI Catalog
PR #37](https://github.com/Agent-Card/ai-catalog/pull/37) / ADR 0014,
which renames the `CatalogEntry.mediaType` member to **`type`** and
reframes its description as an open-text *type identifier* rather than a
strict IANA media type.

Changes (docs-only, `docs/discovery.md`):

- Renames the `mediaType` member to `type` in the Catalog Entry table.
- Updates the member description to mirror ADR 0014: "An identifier
specifying the type of the referenced artifact."
- Updates the `type` key in all four example catalog entries.
- Updates the client-validation prose (`type` set to … / "ignore entries
with unrecognized types").

## Rebase / conflict resolution

This branch was rebased onto the current `main` to resolve a merge
conflict in `docs/discovery.md`. The conflict came from changes that
landed on `main` after this branch was cut:

- **#31** — `urn:air:` identifier adaptation (ADR 0015). **Preserved.**
- **#39 / #14** — removal of the `displayName` field from MCP Catalog
entries. **Preserved** — this PR does **not** reintroduce `displayName`;
it only renames the field `mediaType` → `type` on top of main's current
structure.

The resolved diff is exactly the `mediaType` → `type` rename (table row,
four examples, validation prose) applied on top of main — nothing from
either side's intent was dropped.

## Scope decision — value deliberately kept as
`application/mcp-server-card+json`

This PR renames the **field only**. The value stays
`application/mcp-server-card+json` and is **not** changed to ADR 0014's
known-type `application/mcp-server+json`. Rationale:

- ADR 0014 explicitly makes `type` an **open-text** format ("any string
value is accepted"); `application/mcp-server+json` is a non-binding
"known type," and ecosystem types are "governed externally" (i.e., by
MCP). So keeping a more precise MCP-governed value is compatible with
ADR 0014, not a contradiction.
- This repo **deliberately** chose `application/mcp-server-card+json`
over `application/mcp-server+json` (issue #9 / PR #18) to avoid
colliding with the MCP Registry's `server.json` concept — a distinction
the README documents in "Relationship to the MCP Registry."

**Flag for maintainers:** AI Catalog's ADR 0014 known-types list uses
`application/mcp-server+json` for MCP. Whether this repo should also
adopt that value (reversing issue #9 / PR #18 and re-introducing the
`server.json` naming collision) is a separate, more consequential
decision and is intentionally **out of scope** here. Happy to file a
cross-repo issue if maintainers want to pursue it.

## What is intentionally NOT changed

- The **Server Card document's own HTTP media type** (`Accept` /
`Content-Type` negotiation, the reserved `/server-card` location prose).
That is a genuine IANA media type, not the renamed catalog field, and
ADR 0014 does not touch it.
- `schema.ts` / `schema.json` — the Server Card schema has no
`mediaType`/`type` member; this convention lives only in the discovery
doc.

## Verification

- [x] Rebased onto latest `main`; merge conflict in `docs/discovery.md`
resolved, preserving both #31 (`urn:air:`) and #39 (`displayName`
removal). PR now reports `MERGEABLE`.
- [x] `npm run check` — `schema.json` up to date, `tsc --noEmit` clean
- [x] `npm run validate` — all 7 examples pass
- [x] `npm run format:check` — `docs/discovery.md` clean, including
markdown table re-alignment
- [x] Verified zero `mediaType` field tokens remain (`git grep
mediaType` → no matches)
- [x] Verified the Server Card HTTP media-type prose was left intact (no
over-reach)
- [x] **CI green** — `build`, `Analyze (actions)`, and `CodeQL` all pass
on the rebased head
([run](https://github.com/modelcontextprotocol/experimental-ext-server-card/actions/runs/29278815978))
- [x] Independent fresh-eyes subagent review: **APPROVE** (rename
complete & correct; no `displayName` reintroduced; value unchanged;
Server Card media-type prose intact; no stray `mediaType`; no conflict
markers)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: tadasant <bob@tadasant.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-13 21:35:28 +02:00
.github/workflows Bootstrap repo with TypeScript source-of-truth and generated JSON Schema 2026-04-27 19:47:01 +00:00
docs docs(discovery): rename Catalog Entry mediaType field to type (ADR 0014) (#32) 2026-07-13 21:35:28 +02:00
examples/ServerCard Make the extension card-only: remove registry Server/package types (#28) 2026-06-18 19:11:55 +02:00
scripts Make the extension card-only: remove registry Server/package types (#28) 2026-06-18 19:11:55 +02:00
.gitignore Bootstrap repo with TypeScript source-of-truth and generated JSON Schema 2026-04-27 19:47:01 +00:00
AGENTS.md docs: add AGENTS.md (CLAUDE.md symlink) for AI coding agents (#20) 2026-06-08 08:16:20 -07:00
CLAUDE.md docs: add AGENTS.md (CLAUDE.md symlink) for AI coding agents (#20) 2026-06-08 08:16:20 -07:00
LICENSE Initial commit 2026-04-27 21:19:27 +02:00
package-lock.json Bump vm2 in the npm_and_yarn group across 1 directory 2026-05-08 14:45:46 +00:00
package.json Bootstrap repo with TypeScript source-of-truth and generated JSON Schema 2026-04-27 19:47:01 +00:00
README.md docs: drop references to the MCP initialization handshake (SEP-2575) (#37) 2026-06-27 08:37:45 +02:00
schema.json docs: drop references to the MCP initialization handshake (SEP-2575) (#37) 2026-06-27 08:37:45 +02:00
schema.ts docs: drop references to the MCP initialization handshake (SEP-2575) (#37) 2026-06-27 08:37:45 +02:00
tsconfig.json Bootstrap repo with TypeScript source-of-truth and generated JSON Schema 2026-04-27 19:47:01 +00:00

MCP Server Cards (Experimental Extension)

Status: Experimental. This work is for prototyping and feedback only, and is not an accepted or official MCP extension.

This repository defines a TypeScript source-of-truth and generated JSON Schema for MCP Server Cards. Server Cards are a static metadata document that describes a remote MCP server enough for clients to discover and connect to it.

It tracks SEP-2127 and is intended to be lifted directly into the main spec when Server Cards graduate (see Graduation plan below).

A prior attempt to land these types directly in the core spec (modelcontextprotocol#2652) is being relaunched here as an experimental extension while the SEP itself is still under review.

What is a Server Card?

A Server Card is a JSON document — hosted at any unreserved URI, with GET <streamable-http-url>/server-card reserved as the recommended location (see discovery.md) — describing:

  • The server's identity (name, version, description, optional title / icons / repository / websiteUrl)
  • Its remote transport endpoints (URLs, headers, variable templates, supported protocol versions)
  • Optional registry-style extension metadata (_meta)

Server Cards intentionally omit primitive listings (tools, resources, prompts) — those remain subject to runtime listing via the protocol's standard list operations. They also intentionally omit local installation metadata — see Relationship to the MCP Registry.

Relationship to the MCP Registry

A Server Card describes remote connectivity only. Metadata for locally-installable servers, packages, registries (npm, PyPI, OCI, NuGet, MCPB), runtime hints, command-line arguments, environment variables, lives in the MCP Registry's server.json schema, which is owned by the registry, not by this extension.

Vendors who genuinely need to attach install hints to a Server Card can use namespaced _meta extension metadata, which remains the card's extension point.

Layout

schema.ts                    # TypeScript source of truth (single file)
schema.json                  # Generated JSON Schema 2020-12 (do not edit by hand)
scripts/
  generate-schema.ts         # Generates schema.json from schema.ts
  validate-examples.ts       # Validates examples/ against the generated schema
examples/
  ServerCard/{valid,invalid} # Example Server Card documents

The generated schema.json is checked into the repo so consumers can grab it without running the toolchain.

Working on the schema

npm install
npm run generate         # regenerates schema.json from schema.ts
npm run validate         # runs all examples through ajv against schema.json
npm run check            # asserts schema.json is in sync with schema.ts and tsc passes
npm run format           # prettier write

When you change schema.ts, always run npm run generate and commit the updated schema.json in the same commit. CI runs npm run check and will fail if they drift.

Schema URL conventions

The $schema field on every document MUST be a URL of the form:

https://static.modelcontextprotocol.io/schemas/v1/<name>.schema.json

Schema URLs are versioned by their vN segment. Server Card objects are open: the schema does not set additionalProperties: false, and vendor-specific data belongs in the namespaced _meta field. Once v1 is published a breaking revision of the shape would publish a new vN family rather than mutating v1 in place. The v1 shape is still pre-release and card-only — it intentionally does not include the registry-shaped Server / packages types.

Graduation plan

When the SEP is accepted and Server Cards graduate from this experimental extension:

  1. The contents of schema.ts in this repo move into schema/draft/schema.ts of modelcontextprotocol/modelcontextprotocol. The two MetaObject and Icon definitions inlined here at the bottom of schema.ts already exist in the main spec and are dropped from the migration.
  2. The main spec's existing scripts/generate-schemas.ts regenerates schema/draft/schema.json (and downstream docs/specification/draft/schema.mdx) — no per-extension generator is required there. Both generators leave objects open (no additionalProperties: false), so the generated shape matches without flag changes.
  3. Published documents update their $schema to point at the main spec's hosted schema URL (e.g., https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json served from modelcontextprotocol/static).
  4. This repository is archived with a pointer to the relevant section of schema/draft/schema.ts in the main spec.

The schema.ts in this repo is deliberately structured to be copy-pasted into the main spec's schema/draft/schema.ts with no transformation other than removing the inlined MetaObject / Icon definitions.

References