UCP via MCP
The same operations as JSON-RPC tools, with the spec's tool names.
MCP binding
The same operations as JSON-RPC tools, with the spec's tool names.
create_checkoutget_checkoutupdate_checkoutcomplete_checkoutcancel_checkoutcurl -X POST \
https://go.sessions.website/@<handle>/api/ucp/mcp \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'The envelope
UCP-Agent and Idempotency-Key travel in the meta argument rather than in headers, matching the spec's MCP binding.
Every result carries structuredContent — the checkout object you parse — alongside a text rendering for clients that only read text.
structuredContent.messages explains what happened — not as isError. isError is reserved for protocol failures like an unknown session id.{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "create_checkout",
"arguments": {
"meta": {
"ucp-agent": "https://you.example/ucp.json",
"idempotency-key": "6f1e…"
},
"checkout": {
"line_items": [
{"item": {"id": "gid://Sessions/Pass/01J…"},
"quantity": 1}
],
"buyer": {"email": "ada@example.com"},
"com.sessions.codes": {"discount": "SPRING20"}
}
}
}
}Paying
When the total is above zero, complete needs a credential in payment.instruments[]. Mark the instrument you want charged with selected: true; with a single instrument that is implied.
The token is a Stripe payment-method id created against the connected account the manifest advertises — initialise Stripe with the manifest's publishable_key and stripe_account, tokenize there, and send the resulting id. Sessions confirms it server-side on that same account.
Pairing with discovery
This server is checkout only. It has no browse or search tools, because the public MCP server already has them and the ids line up.
An assistant can find a session there and hand the id straight to create_checkout here. Public MCP server