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" }
}
}Paid call flow
- Call any paid tool → the result carries
status: "payment_required"with the x402 v2 requirements and ahow_to_payblock. - Sign the EIP-3009 authorization (USDC on Base) with your agent's key.
- Retry the same call with the payload at
_meta["tollbridge.dev/x402-payment"](or thePAYMENT-SIGNATUREHTTP header). - The next result is
okwith the honesty meta andmeta.settlementcarrying 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_requiredas a normal result, not an error — the challenge carries the exact amount (PRICING-derived) and thehow_to_payinstructions. - 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.