- TypeScript 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
## What & why
Adds an **`AGENTS.md`** (with a **`CLAUDE.md` symlink**) at the repo
root — a concise operating manual for AI coding agents contributing to
this repository.
It is deliberately **minimal and non-duplicative**:
[`README.md`](./README.md) remains the source of truth for everything
mechanical (what a Server Card is, the layout, the `npm run
generate`/`check`/`validate`/`format` workflow, the
`schema.ts`→`schema.json` regeneration rule, the `$schema` URL
convention, the graduation plan), and `AGENTS.md` points to it rather
than restating it. `AGENTS.md` adds only the **contribution conduct the
README doesn't cover**:
- **Open PRs for human review — do not self-merge AI-generated
changes**, even with merge permissions.
- Keep changes small and scoped; one coherent change per PR; link the
relevant SEP/issue.
- Respect the experimental, SEP-2127-tracked nature; don't pre-empt
unresolved spec discussion; keep the graduation path intact.
- Treat the schema as a public contract; flag breaking changes
explicitly.
`AGENTS.md` is the portable, tool-agnostic entry point; `CLAUDE.md` is a
symlink to it so Claude Code loads it automatically — one file, two
entry points, zero duplication.
## Verification
- [x] **`npm run check` passes** (schema.json in sync, `tsc --noEmit`
clean): `✓ schema.json is up to date`
- [x] **`npm run validate` passes**: `All 7 example(s) passed.`
- [x] **`npm run format:check` passes** (the new `AGENTS.md` is
Prettier-clean): `All matched files use Prettier code style!`
- [x] **Change is docs-only** — adds `AGENTS.md` + `CLAUDE.md` symlink;
no `schema.ts`/`schema.json`/examples touched
- [x] **`CLAUDE.md` is a symlink to `AGENTS.md`** (verified `ls -l`:
`CLAUDE.md -> AGENTS.md`), no content duplication
- [x] **No README duplication** — `AGENTS.md` references `README.md` for
all mechanics and only adds contribution conduct (verified by re-reading
both files side by side after a fresh-eyes review)
- [x] **CI green on this PR**: `build`, `CodeQL`, and `Analyze
(actions)` all pass (re-confirmed after each revision)
---
🤖 Opened by an AI coding agent for human review — **not** to be
self-merged (per the contribution norms in this very PR). Please review
and merge if it looks good.
|
||
| .github/workflows | ||
| docs | ||
| examples | ||
| scripts | ||
| .gitignore | ||
| AGENTS.md | ||
| CLAUDE.md | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| schema.json | ||
| schema.ts | ||
| tsconfig.json | ||
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 — a static metadata document that describes a remote MCP server enough for clients to discover and connect to it before initialization.
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, typically published at https://<host>/.well-known/mcp/server-card, describing:
- The server's identity (
name,version,description, optionaltitle/icons/repository/websiteUrl) - Its remote transport endpoints (URLs, headers, variable templates, supported protocol versions)
- Optional registry-style extension metadata (
_meta)
The companion Server document is a strict superset that adds locally-runnable packages — it is the shape the MCP Registry uses for server.json.
Server Cards intentionally omit primitive listings (tools, resources, prompts) — those remain subject to runtime listing via the protocol's standard list operations.
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
Server/{valid,invalid} # Example Server (registry-shaped) 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 rather than by date, so additive revisions of the v1 shape don't bump every published document's $schema. Breaking changes would publish a v2 family.
Graduation plan
When the SEP is accepted and Server Cards graduate from this experimental extension:
- The contents of
schema.tsin this repo move intoschema/draft/schema.tsofmodelcontextprotocol/modelcontextprotocol. The twoMetaObjectandIcondefinitions inlined here at the bottom ofschema.tsalready exist in the main spec and are dropped from the migration. - The main spec's existing
scripts/generate-schemas.tsregeneratesschema/draft/schema.json(and downstreamdocs/specification/draft/schema.mdx) — no per-extension generator is required there. - Published documents update their
$schemato point at the main spec's hosted schema URL (e.g.,https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.jsonserved frommodelcontextprotocol/static). - This repository is archived with a pointer to the relevant section of
schema/draft/schema.tsin 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
- SEP-2127: MCP Server Cards (PR)
- SEP-2133: Extensions framework (PR)
- Abandoned core spec PR (superseded by this repo): modelcontextprotocol#2652
- MCP Registry
server.jsonschema