Public: anyone can read this; the crew can change it.
MCP release_keeper answers the crew's run token on the forge's own repository, the same body as GET /api/v1/keeper #15455
Check · Review · Land · Live done — Landed and live in production.
A crew run token on the forge's own repository can now call MCP releasekeeper. It gets back the same body that GET /api/v1/keeper gives it: the same keeperAnswer, with mayRead still deciding. This closes the gap #15449 left, so the cause of a stopped release can be read over MCP as well as over HTTP.
shipped production is serving it deploy 496afdb
A crew run token on the forge's own repository can now call MCP release_keeper. It gets back the same body that GET /api/v1/keeper gives it: the same keeperAnswer, with mayRead still deciding. This closes the gap #15449 left, so the cause of a stopped release can be read over MCP as well as over HTTP.
src/http/run_gate.ts: next to the #15449 keeper read, the gate now letsPOST /mcpthrough only for a crew run (never an app preview's token) whose repository is the forge's own. A newrunMcpRefusalthen accepts that token's message only when it is atools/callofrelease_keeper(RUN_MCP_TOOL). Any other method or tool gets the gate's usualnot_found. The module's header comment now names this one exception.src/http/mcp.ts: callsrunMcpRefusalright after the body is parsed and checked, before any tool code runs. Other credentials are not affected.
Look closely at the narrowing. A run token on /mcp reaches this one tool and nothing else: no initialize, no tools/list, no ping. An MCP client that starts with initialize will get 404, so callers should send the tools/call directly. I chose that over opening the handshake so the door stays the width of one tool name. No tool was added, no ceiling raised, and docs/MCP.md doesn't say who may call release_keeper, so it is unchanged.
Tests: test/keeper-crew-reads.test.ts has three new cases:
- the MCP answer equals the HTTP body;
- the crew token gets 404 for
whoami,read_file,tools/listandinitialize; - anonymous gets 401, and a run on another repository or an app preview's token gets 404.
The equal-body case fails with the source change removed. bun x tsc --noEmit passes, and so does bun scripts/gate.ts --fix, which rewrapped comments in one file. scripts/fast.ts named 2357 test files (estimated 199 minutes, over its 5-minute budget), so I ran the covering ones myself. All 77 tests pass in keeper-crew-reads, mcp-size, run-gate-doors, run-token, boundary-tokens-crew, boundary-tokens-gates, apps-preview-token and sealed-review-reads.
I did not post the v0.7.629 cause on #15443, as the issue leaves that to a person once this is live. I also did not call the keep_plan or estimate tools: they aren't available in this session, and I give no time estimate.
Try it: with a crew run token on the forge's repository, send POST /mcp with {"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"release_keeper","arguments":{}}}. The JSON in result.content[0].text should equal the body of GET /api/v1/keeper.
🤖 Generated with Claude Code
Clean and narrow. I opened the preview: / answers 200, and the MCP door refuses a token it does not know, as it should (the preview does not accept my reviewer token as a crew run token, so I did not see the keeper body there). runGate opens POST /mcp only for a crew run (not an app preview) on the forge repo. runMcpRefusal then lets through one tools/call of release_keeper and 404s everything else, before any tool code runs. /mcp takes a single JSON object, so there is no batch bypass. Tests cover equal body, other tools and methods refused, and anonymous, elsewhere and preview refused. No new tool, no raised ceiling, no dependency, no README change.
A crew run token on the forge's own repository can now call MCP
release_keeper. It gets back the same body thatGET /api/v1/keepergives it: the samekeeperAnswer, withmayReadstill deciding. This closes the gap #15449 left, so the cause of a stopped release can be read over MCP as well as over HTTP.src/http/run_gate.ts: next to the #15449 keeper read, the gate now letsPOST /mcpthrough only for a crew run (never an app preview's token) whose repository is the forge's own. A newrunMcpRefusalthen accepts that token's message only when it is atools/callofrelease_keeper(RUN_MCP_TOOL). Any other method or tool gets the gate's usualnot_found. The module's header comment now names this one exception.src/http/mcp.ts: callsrunMcpRefusalright after the body is parsed and checked, before any tool code runs. Other credentials are not affected.Look closely at the narrowing. A run token on
/mcpreaches this one tool and nothing else: noinitialize, notools/list, noping. An MCP client that starts withinitializewill get 404, so callers should send thetools/calldirectly. I chose that over opening the handshake so the door stays the width of one tool name. No tool was added, no ceiling raised, anddocs/MCP.mddoesn't say who may callrelease_keeper, so it is unchanged.Tests:
test/keeper-crew-reads.test.tshas three new cases:whoami,read_file,tools/listandinitialize;The equal-body case fails with the source change removed.
bun x tsc --noEmitpasses, and so doesbun scripts/gate.ts --fix, which rewrapped comments in one file.scripts/fast.tsnamed 2357 test files (estimated 199 minutes, over its 5-minute budget), so I ran the covering ones myself. All 77 tests pass inkeeper-crew-reads,mcp-size,run-gate-doors,run-token,boundary-tokens-crew,boundary-tokens-gates,apps-preview-tokenandsealed-review-reads.I did not post the v0.7.629 cause on #15443, as the issue leaves that to a person once this is live. I also did not call the
keep_planorestimatetools: they aren't available in this session, and I give no time estimate.Try it: with a crew run token on the forge's repository, send
POST /mcpwith{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"release_keeper","arguments":{}}}. The JSON inresult.content[0].textshould equal the body ofGET /api/v1/keeper.🤖 Generated with Claude Code
Closes #15453