Commit graph ext-server-card/docs
Author SHA1 Message Date
Tadas Antanavicius
92999cb3f5
docs: drop references to the MCP initialization handshake (SEP-2575) (#37) 2026-06-27 08:37:45 +02:00
Tadas Antanavicius
e42749bfc2
docs(discovery): adopt AI Catalog urn:air: identifier convention (ADR 0015) (#31)
## What & why

Adopts the AI Catalog **`urn:air:`** identifier-naming convention
standardized in
[Agent-Card/ai-catalog#36](https://github.com/Agent-Card/ai-catalog/pull/36)
(ADR 0015) for this extension's discovery docs.

This repo's only identifier-naming surface is the **MCP Catalog Entry**
in [`docs/discovery.md`](docs/discovery.md). It previously used a
repo-local `urn:mcp:server:<name>` URN. `docs/discovery.md` describes
the MCP Catalog as *"a minimal, MCP-scoped subset of the AI Catalog
specification"* whose entries *"can be used as-is within a full AI
Catalog document"* — a claim the old format contradicted, since the AI
Catalog now standardizes the domain-anchored
`urn:air:{publisher}:{namespace}:{name}` form.

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

- Replace the `urn:mcp:server:<name>` convention with the AI Catalog
`urn:air:` form.
- Document the segments for an MCP server:
- **`publisher`** — the publisher's domain (forward DNS), e.g.
`example.com`, matching ADR 0015's framing that the publisher is a
domain.
- **`namespace`** — optional, populated per the AI Catalog specification
(the examples omit it).
- **`name`** — the server-name suffix (the segment after the `/` in the
referenced Server Card's reverse-DNS `name`), e.g. `weather`.
- So a Server Card named `com.example/weather` can be referenced as
`urn:air:example.com:weather`.
- Update all 4 catalog examples accordingly.

### Design notes for reviewers

- **Forward-DNS publisher**, anchored on the publisher's domain per ADR
0015.
- **Server Card schema deliberately untouched.**
`schema.ts`/`schema.json` have **no `identifier`/`identity` field** —
the card carries `name` (reverse-DNS) only — so this is a discovery-doc
change, not a schema change. Keeps the PR minimal and avoids pre-empting
unresolved SEP-2127 discussion.
- **Related open question:** issue #26 ("Remove the MCP Catalog") — this
aligns the identifier format while the MCP Catalog exists and does not
pre-empt that discussion.

## Verification

- [x] **Self-review (fresh-eyes) done.** Ran independent in-process
reviews of the diff across iterations; findings (an
incorrectly-attributed `urn:air:local:` form; reverse- vs forward-DNS
publisher) were addressed.
- [x] **ADR 0015 cross-checked against source** — verified the
`urn:air:{publisher}:{namespace}:{name}` form, the forward-domain
example `urn:air:example.com:...`, and the optional namespace against
the raw `adr/0015-agent-identifier-naming.md` in PR #36.
- [x] **All 4 examples internally consistent** with the documented
mapping; example `url` hosts match the publisher domains.
- [x] **No stale references** — `grep` confirms zero remaining
`urn:mcp:server:` occurrences.
- [x] **Schema untouched & in sync** — `npm run check` → `✓ schema.json
is up to date`; `tsc --noEmit` passes.
- [x] **Examples validate** — `npm run validate` → `All 7 example(s)
passed.`
- [x] **Formatting** — `npm run format:check` (prettier) passes on all
tracked files.
- [x] **CI green** — confirmed on the pushed branch (`build`, `CodeQL`,
`Analyze` all pass).

Local proof:

```
$ npm run check
✓ schema.json is up to date     (+ tsc --noEmit, no errors)

$ npm run validate
All 7 example(s) passed.

$ npm run format:check
All matched files use Prettier code style!
```

Documentation-only change; no UI and no runtime/logic behavior to
exercise beyond the schema toolchain above.

🤖 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-06-19 13:17:11 +01:00
Tadas Antanavicius
9222cf6527
docs: require Server Card to be consistent with runtime behavior (#25)
Closes #23.

## What

Adds the missing normative requirement that a Server Card's declared
values must not contradict the server's actual runtime behavior. The
schema already encodes the *omission* half of the threat model
(primitives are deliberately excluded because a static manifest drifts
from runtime); this adds the *complementary* requirement for the fields
the card **does** declare.

### `docs/discovery.md`

- **New "Consistency with Runtime Behavior" subsection** under "MCP
Server Cards":
- A Server Card SHOULD accurately reflect the server's actual runtime
behavior. The `serverInfo` (`name`, `version`) and `supportedVersions`
returned by
[`server/discover`](https://modelcontextprotocol.io/specification/draft/server/discover),
plus the transport actually served at each `remotes[]` endpoint (and
descriptive `title`/`description`/`icons`), SHOULD NOT contradict the
equivalent values declared in the Server Card.
- Clients MUST NOT treat Server Card contents as authoritative for
security or access-control decisions, and SHOULD verify claims against
the live connection — the same posture the spec takes toward primitives,
generalized to the declared fields.
- **New "Server Card Accuracy" subsection** under "Security
Considerations": frames an inaccurate (stale or crafted) card as a mild
confusion/downgrade vector, so the consistency requirement is partly a
security property, not just correctness. It is explanatory and points
back to the single normative statement above rather than re-asserting
the MUST NOT.

### `schema.ts`

- Short pointer comment in the `ServerCard` JSDoc referencing the
discovery-doc requirement, complementing the existing
primitives-omission rationale. `schema.json` regenerated via `npm run
generate` in the same commit (CI `check` enforces sync).

RFC 2119 keywords are used consistently with the rest of
`docs/discovery.md`. The runtime reference is phrased around the draft
spec's
[`server/discover`](https://modelcontextprotocol.io/specification/draft/server/discover)
operation — the pre-`initialize` exchange that actually returns
`serverInfo`/`supportedVersions` — rather than SEP-2127's
`DiscoverResultResponse`, which has no term in this repo.

## Security rationale

Because a Server Card is consumed *before* the client connects, an
inaccurate card can steer a client toward a weaker configuration
(downgrade) or a misidentified server (confusion) before it has observed
the server's actual `server/discover` response. Treating the card as
advisory rather than authoritative contains this risk.

## Scope

Small and focused strictly on the card-vs-runtime consistency
requirement. Distinct from #10 (the inverse — primitives the card omits)
and #13/#9/#11/#12/#14/#21 (none touch card-vs-runtime consistency). No
unrelated changes.

## Verification

- [x] `npm run check` passes — `schema.json` is in sync with `schema.ts`
and `tsc --noEmit` is clean
- [x] `npm run validate` passes — all 7 examples validate against the
regenerated schema
- [x] `npm run format` clean — no formatting changes left
- [x] `schema.json` regenerated and committed alongside the `schema.ts`
change (CI `check` enforces this)
- [x] Fresh-eyes review by a separate agent — feedback addressed
(full-term "Server Card" wording for consistency with the rest of the
doc; de-duplicated the MUST NOT so the security section is explanatory
and points to the single normative statement)
- [x] Maintainer review (Sam) — substance approved; applied the
requested brevity pass, tightening both new subsections with no change
to any normative statement
- [x] `server/discover` spec link verified to resolve to a real
draft-spec page documenting `serverInfo` / `supportedVersions`
- [x] CI green on the final commit (`0d0389b`) — build, Analyze
(actions), and CodeQL all pass

This is a docs/comment-only change (no runtime code paths), so the
verification is the build/schema toolchain rather than e2e tests. Local
toolchain output:

```
✓ Generated schema.json
✓ schema.json is up to date    (npm run check)
All 7 example(s) passed.        (npm run validate)
```

Opened for human review — **not** merged, per repo policy.

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 13:36:19 -07:00
Tadas Antanavicius
bd9bcce280
Add DoS section (#24)
Closes
https://github.com/modelcontextprotocol/experimental-ext-server-card/issues/21
2026-06-08 12:49:33 -07:00
Tadas Antanavicius
10e958fa82
Server Cards: recommend /server-card over .well-known (resolves #12) (#22)
Resolves #12.

## What & why

Moves the **single-server Server Card** off a `.well-known` path. We
reserve `GET <streamable-http-url>/server-card` as the recommended
location while allowing **any unreserved URI** — the Catalog
(`/.well-known/mcp/catalog.json`) is the discovery entrypoint and
already carries each card's `url`, so clients never need to guess where
a card lives.

Adopts wording close to the resolution discussed in #12 (credit: Darrel
Miller's point that `.well-known` is for *site-wide* metadata, not
application-level metadata like an individual server's card; proposed
wording from @SamMorrowDrums and @tadasant):

> MCP Servers MAY host their Server Card at `GET
<streamable-http-url>/server-card`, which we reserve for this purpose,
though any unreserved URI is valid. MCP Servers SHOULD respect the
agreed media type wherever they choose to host it. After a client
identifies a Server Card URL from an AI Catalog or MCP Catalog, it
SHOULD request that URL expressing the Server Card media type.

### Content negotiation

A client fetching a Server Card requests its preferred representation
with the `Accept` header (`Accept: application/mcp-server-card+json`) —
the request-side content-negotiation header for a GET. The server echoes
the type it actually served back in the response's `Content-Type`.

> **Note on media type:** this PR is scoped to *placement* only and does
**not** perform the `application/mcp-server+json` →
`application/mcp-server-card+json` rename — that is handled in a
separate PR. So the two coexist deliberately here:
> - **Pre-existing strings** (catalog-entry description, the four
example `mediaType` values, validation prose, and the "Server Cards use
the media type" line) are left as `application/mcp-server+json`,
untouched, for the rename PR to sweep.
> - **New prose introduced by this PR** (the reserved-location
blockquote and the `Accept`-header example in the "Server Card Location"
section) names the type explicitly as the **post-rename
`application/mcp-server-card+json`**, since the rename PR's diff is
against `main` and would not touch text that doesn't yet exist there.
>
> The temporary mix resolves to a single consistent type once both PRs
land.

## Rationale for `/server-card` (also captured permanently in
`docs/discovery.md` → "Alternatives considered")

- **Not `.well-known`:** site-wide vs. application-level metadata; the
Catalog already provides the `url`, so `.well-known` adds no value for
the card.
- **Not the bare streamable-HTTP endpoint** (`GET <url>` with no
suffix): a GET there already opens the SSE stream in Streamable HTTP.
Hosting the card there overloads the connection-establishing endpoint
and forces content negotiation to disambiguate. Spec-*allowed*,
explicitly **not recommended** — this is the primary motivation for a
distinct suffix.
- **Not domain-root `/mcp/` nesting:** `/mcp` denotes the *transport
endpoint itself* in MCP's canonical-URI examples; there's no precedent
for `/mcp/` as a metadata sub-namespace, and it collides conceptually
with "the JSON-RPC endpoint."
- **Elegant consequence:** because the suffix is appended to the
streamable-HTTP URL, a server at `https://host/mcp` naturally yields
`https://host/mcp/server-card` — path-namespacing for free.

## Scope guardrail

This applies **only to the single-server Server Card**. `.well-known` is
unchanged and remains correct for the **Catalog**
(`/.well-known/mcp/catalog.json`) and OAuth metadata
(`/.well-known/oauth-protected-resource`, etc.) — those are genuinely
site-wide. The doc calls this out explicitly so it doesn't read as
"abandon `.well-known` everywhere."

## Files changed

- **`docs/discovery.md`** — new "Server Card Location" section with the
reserved convention + `Accept`-header guidance; permanent "Alternatives
considered" subsection; rewritten single- and multi-server example URLs
(`https://example.com/mcp/server-card`;
`https://acme.com/code-review/server-card`, `/docs-search/server-card`,
`/ci-cd/server-card`).
- **`schema.ts`** — updated the two `.well-known` doc comments
(`ServerCard` and `Server`) to the new convention.
- **`schema.json`** — regenerated from `schema.ts` (`npm run generate`).
- **`README.md`** — updated the "What is a Server Card?" line to the new
convention, normalizing the pre-existing README-vs-schema `.well-known`
mismatch.

## Verification

- [x] `npm run check` passes (schema.json in sync with schema.ts + `tsc
--noEmit` clean)
- [x] `npm run generate` run and regenerated `schema.json` committed in
the same change
- [x] `npm run validate` passes — all 7 examples validate against the
regenerated schema
- [x] `npm run format` run (prettier clean)
- [x] No single-server-card `.well-known` references remain in
`README.md`, `schema.ts`, `schema.json`, or `docs/discovery.md`
(verified via grep); remaining `.well-known` references are
Catalog/OAuth/the "Alternatives considered" explainer only
- [x] Pre-existing media-type strings left untouched — `git diff
origin/main` shows zero changes to existing
`application/mcp-server+json` strings (rename owned by a separate PR);
only the new placement prose names the post-rename
`application/mcp-server-card+json`
- [x] Examples updated and internally consistent with the new prose
- [x] Fresh-eyes subagent review performed; its one cosmetic finding was
addressed and CI re-confirmed green
- [x] CI green (see checks on this PR)

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

---------

Co-authored-by: Agent (Claude) <peter@tadasant.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 12:40:51 -07:00
Sam Morrow
ee1f187084
Merge remote-tracking branch 'origin/main' into pr/19/sammorrowdrums/fix-discovery-md-primitives
# Conflicts:
#	docs/discovery.md
2026-06-08 13:02:09 +02:00
Sam Morrow
ac36447c8d style: prettier formatting
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-05 22:15:29 +02:00
Sam Morrow
1ff3c61b35 docs: remove primitives from Server Card contents (fixes #10)
The 'A Server Card includes:' list in docs/discovery.md mentioned
'Capabilities — Tools, resources, and prompts the server offers',
which contradicts schema.ts and SEP-2127: Server Cards do not
enumerate primitives. Primitives remain subject to runtime listing
via the protocol's standard list operations.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-05 22:13:39 +02:00
Sam Morrow
877e62682c docs: align Catalog mediaType with AI Catalog spec
Replace application/mcp-server+json with application/mcp-server-card+json
in docs/discovery.md to match the AI Catalog specification, which
discovery.md cites as the standard MCP Catalog entries are a subset of.

Fixes #9

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-05 22:13:08 +02:00
Sam Morrow
b4135246f1
docs(discovery): port authoritative fix from upstream PR
Replaces the prior reconstruction with the canonical content from commit
bb3bd697 on SamMorrowDrums/modelcontextprotocol@sammorrowdrums/mcp-catalog-specification,
adapted from .mdx to plain .md (frontmatter and Mintlify components stripped,
content preserved verbatim).

Covers all of tadasant's review feedback: internal MCP Server Cards subsection,
.json well-known path, reverse-DNS identifiers, identifier MUST constraint,
cross-domain advertising language, SHOULD-publish recommendation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-25 21:27:42 +02:00
Sam Morrow
9e3b3d7c9d
docs(discovery): address tadasant review feedback
- Add MCP Server Card subsection defining application/mcp-server+json
  and link 'MCP Server Cards' references internally rather than to SEP-2127
- Reframe domain hosting language to support cross-host advertising
  (catalog MAY reference servers on different web hosts)
- Switch well-known URI to /.well-known/mcp/catalog.json
- Add SHOULD-publish recommendation for organizations offering MCP services
- Make specVersion OPTIONAL with note about pushing AI Catalog to align
- Tighten identifier definition: MUST begin with urn:mcp:server: and the
  remainder MUST exactly match the server card's name
- Update all examples to use reverse-DNS identifiers
- Keep Content-Type: application/json for the catalog itself
- Add cross-host advertising example and trust considerations

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-25 21:27:42 +02:00
Sam Morrow
55996b594b
Add MCP Catalog discovery specification
Add docs/discovery.md defining the MCP Catalog format for config-free
auto-discovery of MCP server cards via a well-known URI. The catalog is
a minimal, MCP-scoped subset of the AI Catalog specification.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-25 21:27:42 +02:00