ADR 0005: A read-only MCP server
Status
Accepted (2026-10-25).
Context
The fleet exposes bounded contexts to AI clients through the Model Context Protocol as an
additive inbound adapter (.claude/rules/fleet/no-auth-and-mcp.md): the official Go SDK,
Streamable HTTP only, a separate cmd/mcp binary, nothing in the domain or application
depending on it (TestMCPAdapterDependencyRule). A checkout session moves money.
Decision
cmd/mcpserves ONE tool,get_checkout_session, over the sameGetSessionuse case the REST adapter uses (internal/adapters/inbound/mcp). It is read-only (annotatedReadOnlyHint) and the binary wires only the Postgres session repository: no outbox, no relay, no policy, no Kafka, no sibling gateway. Opening and confirming a session stay on REST because they authorize and capture a shopper's money.- Errors keep the REST slugs (
not-found); anything else is logged and reported as a genericinternal-errorso infrastructure details never reach the model. - No authentication, consistent with the fleet decision of 2026-09-11. The view carries
references only (
shopperId,shipToAddressId) and never the PSP token.
Consequences
- A second deployable that shares the database of
cmd/apiand runs the idempotent embedded migrations on start, like every MCP binary of the fleet. - A write tool would need its own ADR first.