Tollbridge Docs
Examples

Agent wiring over MCP

Point any MCP client at the tool catalog — free snapshot first, paid tools on demand.

The MCP server exposes the Tollbridge catalog to any agent runtime — fourteen tools, prices in the tool metadata, x402 handled by the client or by you.

Connect (Streamable HTTP)

{
  "mcpServers": {
    "tollbridge": {
      "type": "http",
      "url": "https://api.tollbridge.app/mcp"
    }
  }
}

Or run it locally over stdio

{
  "mcpServers": {
    "tollbridge": {
      "type": "stdio",
      "command": "tollbridge-mcp",
      "args": []
    }
  }
}

Discover the catalog

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/list",
  "params": {}
}

Seventeen tools: tollbridge_market_state, tollbridge_sheet and tollbridge_blotter (free), the paid signal/risk/wallet reads, tollbridge_decision, tollbridge_pricing and the receive rails. The catalog is frozen and derived — call tools/list for the authoritative set.

Free snapshot call

{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "tollbridge_market_state",
    "arguments": { "asset": "BTC" }
  }
}
  1. Call any paid tool → the result carries status: "payment_required" with the x402 v2 requirements and a how_to_pay block.
  2. Sign the EIP-3009 authorization (USDC on Base) with your agent's key.
  3. Retry the same call with the payload at _meta["tollbridge.dev/x402-payment"] (or the PAYMENT-SIGNATURE HTTP header).
  4. The next result is ok with the honesty meta and meta.settlement carrying the receipt.
{
  "jsonrpc": "2.0",
  "id": 3,
  "method": "tools/call",
  "params": {
    "name": "tollbridge_decision",
    "arguments": { "asset": "BTC", "chain": "base", "question_id": "S06_funding_anomaly" },
    "_meta": { "tollbridge.dev/x402-payment": "<base64 PaymentPayload>" }
  }
}

Agent guidance

  • Treat payment_required as a normal result, not an error — the challenge carries the exact amount (PRICING-derived) and the how_to_pay instructions.
  • Refusals (stale_input, insufficient_confidence, suppress) arrive as honest decisions — never fabricate a probability from them.
  • The funding-opportunities response states explicitly that it is not a profit claim or execution advice.

On this page