Protocol surfaces

MCP

Streamable HTTP at /mcp: resources become tools, payments ride in _payment.

RPC/mcppayment

MCP 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 fieldSource
namethe resource id
descriptionthe resource description; paid tools append the price and payment requirement
inputSchemathe resource input schema; paid tools gain an optional string _payment

tools/call

json
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "market_report",
    "arguments": { "_payment": "<base64 x402 proof>" }
  }
}
OutcomeResult
deliveredthe merchant response; delivery summary in _meta["agent-commerce/delivery"]
payment requiredisError: true, the payment envelope in structuredContent
failureisError: true, the error envelope with a CommerceErrorCode

Reserved arguments

_paymentstring
The x402 proof from a previous payment-required response — the same value HTTP carries in PAYMENT-SIGNATURE.
_authorizationobject
The 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.