Doca

The agent surface

Read your positions from anywhere an agent can run

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.

What it exposes

ToolReturns
doca_marketChain, RPC, Aqua registry and Doca addresses: self-configure in one callread
doca_strategiesA maker's live strategy hashes, discovered from chain logsread
doca_walletMaker's WETH / USDC balanceread
doca_positionsPer-strategy WETH aboard, budget remaining, fee surchargeread
doca_healthCommitted WETH vs. wallet balance, honorable: true/falseread

Safe to hand out

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.

Run it

Terminal
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.

Example call

HTTP
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." }

Roadmap

Read-only today. The wallet owner keeps every key.