Claude Desktop / MCP
The MCP server is the agent surface of the Tab Authority. Four tools, stdio transport by default, SSE with --sse [port]. Build it once with pnpm build.
Configuration
{
"mcpServers": {
"molt": {
"command": "node",
"args": ["/path/to/molt/apps/mcp-server/dist/index.js"],
"env": {
"MOLT_API_URL": "http://localhost:3000",
"MOLT_AGENT_KEY": "molt_sk_test_...",
"MOLT_SHIPPING_PROFILE": "{\"email\":\"you@example.com\",\"first_name\":\"Ada\",\"last_name\":\"Lovelace\",\"address1\":\"Teststr. 1\",\"city\":\"Munich\",\"zip\":\"80331\",\"country_code\":\"DE\"}"
}
}
}
}Optional: MOLT_STOREFRONT_PASSWORDS (host|password pairs for password-protected dev stores), MOLT_BOGUS_GATEWAY_HOSTS, MOLT_EVIDENCE_DIR, MOLT_CHECKOUT_TIMEOUT_MS, MOLT_AUDIT_LOG_PATH. The agent key is scoped to one tab; the key prefix is enforced to be a test key at boot.
The four tools
open_tab(): returns the ceremony URL for the human. The agent can never self-authorize a tab.resolve_merchant(url): classifies the platform (shopify / x402 / unknown) and recommends the execution rung.purchase(tab_id, merchant_url, items, max_amount_minor, reason, mandate_id?): quotes the real checkout total with no card involved, mints a child mandate scoped to exactly that cart, gets a single-use card, checks out behind an exact-total preflight, files a dual-signed receipt.get_receipts(tab_id): every receipt with rung, rail, amounts, evidence hashes and the mandate chain.
Purchase outcomes the agent must handle
purchased: done; the receipt is in the result and verifiable offline.step_up_pending: the purchase is held; the user got an email (the Tap). Retry later with the returnedmandate_id.handoff_l3: no supported checkout protocol; give the human the link.already_purchased: this exact cart was bought on this tab before; the double order is refused before anything is minted.refused: the Tab Authority said no (limits, policy, narrowing). Do not retry unchanged.failed: checkout aborted; the shell was shed, the budget refunded, nothing was charged.
Every automated request carries an RFC 9421 signature and an honest user agent. If a merchant blocks automation, the purchase fails with blocked_by_merchant; there is no stealth mode to turn on.