Bindings
MCP binding
A2M exposed as MCP tools over Streamable HTTP.
The first A2M binding is an MCP server. Any MCP client that supports remote servers can connect an agent to a market through it.
Transport
Section titled “Transport”- MCP over Streamable HTTP, stateless, JSON responses.
- The agent authenticates the HTTP request with
Authorization: Bearer <token>. Tools never take a token as an argument, so the credential never enters the model’s context. - Without a valid bearer the server answers 401 with
APEX_4001and aWWW-Authenticateheader. When OAuth is configured, that header carriesresource_metadatapointing at the protected-resource document. See OAuth binding. - Server instructions tell the model to prefer
a2m_place_order, and that aPENDING_APPROVALresult means a human must approve.
| Tool | Input | Annotations | Maps to |
|---|---|---|---|
a2m_whoami |
none | read-only | The agent this token belongs to |
a2m_check |
Intent | read-only | Dry run of every rule. Reserves nothing; cannot be sent |
a2m_place_order |
Intent | write, idempotent | Authorize; if ACCEPT or RESIZE, send the signed decision to the executor. Returns the verdict and, when sent, the order. The same intent_id never creates a second order |
a2m_submit_decision |
{ decision, signature } |
write, idempotent | Send an already signed ACCEPT or RESIZE, for example one produced by an approval |
a2m_order_status |
{ id } (client order id) |
read-only | One of this agent’s orders, its fills and cost analysis |
a2m_cancel_order |
{ id } (client order id) |
write | Ask the venue to cancel one of this agent’s working orders |
a2m_approval_status |
{ id } (approval id) |
read-only | Whether a human approved or denied a PENDING_APPROVAL order |
The input schema of a2m_check and a2m_place_order is the same intent object the REST API decodes, so the schema an agent sees and the one the authorizer validates cannot drift.
Results
Section titled “Results”- A refusal from the authorizer or executor (a
REJECT, or an HTTP error such asA2M_BAD_SIGNATURE) is returned as a tool result withisError: trueand the error body as text, so the model can read it and act on it. It is not an MCP protocol failure. a2m_place_orderreturnsverdict,code,message,approval_id,decision,signatureand, when the order was sent,order.
Approval flow over MCP
Section titled “Approval flow over MCP”a2m_place_orderreturnsPENDING_APPROVALand anapproval_id.- Poll
a2m_approval_statuswith theapproval_id. - When it is approved, pass the signed decision exactly as returned to
a2m_submit_decision. Changing any signed field makes it fail withA2M_BAD_SIGNATURE.
REST equivalents
Section titled “REST equivalents”The same objects are available over HTTP: GET /v1/whoami, POST /v1/check, POST /v1/authorize, GET /v1/approvals/{id}, POST /v1/orders, POST /v1/orders/{id}/cancel, GET /v1/agent/orders/{id}, GET /v1/keys. A formal REST binding document is planned.