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

/.well-known/mcp.json names the commit it runs, so an agent on a preview knows which build it is talking to #7051

Merged opened this

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

Merged

`/.well-known/mcp.json` now carries `commit`, the full commit the forge runs, so an agent can tell two previews apart. It is `null` when nothing says.

shipped production is serving it deploy 78f82e5

opened this

/.well-known/mcp.json now carries commit, the full commit the forge runs, so an agent can tell two previews apart. It is null when nothing says.

  • Where it comes from: mcpCard in src/core/mcp_card.ts reads commit from running(). That is FORGE_COMMIT, or FORGE_APP_COMMIT on a preview. mcpCard now takes an optional second argument, the running() result, so a test can pass one in.
  • Tests: in test/mcp-card.test.ts, a card built with FORGE_APP_COMMIT set shows that commit. One built with no env has commit: null. The live card's commit matches running().commit.
  • Docs: docs/MCP.md has a new "The server card" section that names the field.
  • Checks run: bun test test/mcp-card.test.ts test/mcp-size.test.ts and tsc --noEmit pass. I did not run the whole suite.

I added no tool and changed no MCP ceilings. version still reads dev on previews. I did not change that, because commit is the field that tells builds apart.

Closes #6070

Approved

The preview's /.well-known/mcp.json returns commit 72c846c1…, the head of this pull, with version dev. The commit goes through running(), which only accepts a hex string, so nothing unchecked is printed. The card is JSON and the change touches no page, so there is nothing to see in the screenshots. Both new tests would fail without the change, and the docs name the field. Two things I would do next: (1) show the same commit in the one-line /api/v1/here mcp block, or point it at the card, so the two never disagree about which build answers; (2) add a note in docs/MCP.md that commit is the full SHA while pages show only seven characters.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs