The agent surface
Doca ships an MCP server: five tools that let an AI agent check a maker's wallet, look up strategy state, and run the health check that matters: does the wallet hold enough WETH to cover every checked commitment at once.
| Tool | Returns | |
|---|---|---|
doca_market | Chain, RPC, Aqua registry and Doca addresses: self-configure in one call | read |
doca_strategies | A maker's live strategy hashes, discovered from chain logs | read |
doca_wallet | Maker's WETH / USDC balance | read |
doca_positions | Per-strategy WETH aboard, budget remaining, fee surcharge | read |
doca_health | Committed WETH vs. wallet balance, honorable: true/false | read |
Why there's no write tool: the server holds no key, so it has nothing to authorize.
The server holds no key, so the endpoint can be given to an agent, a teammate or a monitoring bot without granting any of them custody. Bearer auth turns on with a single environment variable, it binds to loopback by default, and every call is a fresh read with no session to hijack.
An agent watches the book and says when a position is drifting. The wallet owner decides when a promise is made or revoked. That split is the product, not a limitation of it.
bun mcp/server.ts
# doca-mcp listening on :8420 -> POST /mcp
# Any MCP client (HTTP transport): connect to http://127.0.0.1:8420/mcp
One file, zero new dependencies: Bun.serve plus raw JSON-RPC eth_call
against RPC_URL, reading addresses from the same
web/src/deployment.json the app uses. Bearer auth via DOCA_MCP_TOKEN, loopback by default, and every call is a
fresh read.
curl localhost:8420/mcp -d '{"jsonrpc":"2.0","id":1,"method":"tools/call",
"params":{"name":"doca_health","arguments":{"hashes":["0x8c9e..."]}}}'
{ "walletWeth": {"formatted":"2.0000"}, "committedWeth": {"formatted":"0.5000"},
"headroomWeth": {"formatted":"1.5000"}, "honorable": true,
"note": "honorable=true means the wallet actually holds enough WETH to cover
every checked strategy's committed amount at once, even though
nothing was ever deposited into Aqua." }
ship/dock/fill
behind an explicit, scoped authorization the wallet owner grants, not a standing key.Read-only today. The wallet owner keeps every key.