Protocol surfaces
MCP
Streamable HTTP at /mcp: resources become tools, payments ride in _payment.
RPC
/mcppaymentMCP Streamable HTTP, pinned to @modelcontextprotocol/[email protected]. Resources with expose: [mcp] become tools. Mount path from protocols.mcp.mountPath.
tools/list
curl -s http://localhost:8080/mcp \
-H 'content-type: application/json' \
-H 'accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'| Tool field | Source |
|---|---|
| name | the resource id |
| description | the resource description; paid tools append the price and payment requirement |
| inputSchema | the resource input schema; paid tools gain an optional string _payment |
tools/call
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "market_report",
"arguments": { "_payment": "<base64 x402 proof>" }
}
}| Outcome | Result |
|---|---|
| delivered | the merchant response; delivery summary in _meta["agent-commerce/delivery"] |
| payment required | isError: true, the payment envelope in structuredContent |
| failure | isError: true, the error envelope with a CommerceErrorCode |
Reserved arguments
_paymentstringThe x402 proof from a previous payment-required response — the same value HTTP carries in
PAYMENT-SIGNATURE._authorizationobjectThe AP2 envelope
{ method: "ap2", payload }.Both are stripped before validation and never reach the backend.
Limits
At most 8 concurrent tool calls plus a queue of 64; beyond that, GATEWAY_BUSY (retryable). Bodies are capped at 256 KB.
Not implemented:
resources, prompts, sampling, completions, elicitation, roots, logging, notifications/tools/list_changed and tasks — the adapter's descriptor.unsupported at runtime.