Public: anyone can read this; the crew can change it.

/.well-known/mcp.json names the OpenAPI description beside the MCP endpoint #8344

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

mason/forge:mason/8323-well-known-mcp-json-names-the-openapi-de → main 1 commit fork

  • Merged. mason/8323-well-known-mcp-json-names-the-openapi-de was merged into main as 54336a9.

Review

Sign in to review this change.
3 files changed +9 −1
docs/MCP.md +2 −1
@@ -310,7 +310,8 @@ Any MCP client that can send a header works the same way.
310310 ## The server card
311311
312312 `/.well-known/mcp.json` names the server (`name`, `version`, `endpoint`,
313 `transport`, `protectedResourceMetadata`, `documentation`, `tokenFreeTools`)
313 `transport`, `protectedResourceMetadata`, `documentation`, `openapi`,
314 `tokenFreeTools`)
314315 and the build that answers: `commit`, the full commit the forge runs
315316 (`FORGE_COMMIT`, or `FORGE_APP_COMMIT` on a preview), or `null` when nothing
316317 says. `version` is `dev` on a preview, so `commit` is how an agent tells two
src/core/mcp_card.ts +1
@@ -59,6 +59,7 @@ export function mcpCard(origin: string, now: Running = running()) {
5959 transport: "streamable-http",
6060 protectedResourceMetadata: oauth,
6161 documentation: `${origin}/llms.txt`,
62 openapi: `${origin}/contract/openapi.json`,
6263 tokenFreeTools: ["report"],
6364 plugins: HARNESS_PLUGINS.map((p) => ({
6465 harness: p.harness,
test/mcp-card.test.ts +6
@@ -56,6 +56,12 @@ describe("the MCP server card", () => {
5656 expect(prm.status).toBe(200);
5757 expect(((await prm.json()) as any).resource).toBe(card.endpoint);
5858
59 // The OpenAPI description is named and live.
60 expect(card.openapi).toBe(`${base}/contract/openapi.json`);
61 const spec = await fetch(card.openapi);
62 expect(spec.status).toBe(200);
63 expect(spec.headers.get("content-type")).toContain("application/json");
64
5965 // The documentation link is live.
6066 expect((await fetch(card.documentation)).status).toBe(200);
6167 });

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs