MCP transport
When a merchant enables UCP and the MCP server on a channel, UCP shopping and common capabilities are exposed as MCP tools at https://{shop-domain}/mcp.
The OpenRPC schema URLs are published in /.well-known/ucp under the MCP transport bindings (dev.ucp.shopping publishes services/shopping/mcp.openrpc.json, and dev.ucp.common publishes services/common/mcp.openrpc.json when location capabilities are active).
Transport
Storefront MCP uses stateless Streamable HTTP JSON-RPC 2.0 on POST /mcp:
- Request format:
POST /mcpwithContent-Type: application/json, supporting both single and batch JSON-RPC 2.0 requests. - Supported MCP protocol versions:
2025-06-18,2025-03-26,2024-11-05. - Capabilities:
toolsonly (no resources or prompts). - Other HTTP methods:
GET /mcp(SSE streaming) returns405 Method Not Allowed;DELETE /mcpandOPTIONS /mcpreturn204 No Content.
Tools and tiers
The Storefront MCP server exports 16 tools. tools/list filters the returned tools by the caller’s authenticated tier (anonymous callers see only the 10 anonymous-tier tools; signed, user, and token callers see all 16), and tools/call enforces tier authorization again at execution time.
For get_order, Token and Signed callers can read orders by their server-issued public order ID. When a User-tier token (Authorization: Bearer ucp_at_...) is also presented, the token must hold scope dev.ucp.shopping.order:read and access is restricted to the linked customer’s orders.
Discover exact schemas from tools/list or the OpenRPC schemas in /.well-known/ucp. Do not derive tool names from capability identifiers.
Arguments and required metadata
Every tools/call validates params.arguments against the tool’s JSON Schema before execution.
Required meta
All 16 tools, including ucp_describe, require meta["ucp-agent"].profile in params.arguments:
{
"meta": {
"ucp-agent": {
"profile": "https://your-platform.example/.well-known/ucp"
}
}
}Domain-object argument wrapping
Unlike REST request bodies, MCP tool payloads are nested inside a named domain object (catalog, cart, checkout, or location) rather than passed as root-level fields. Resource IDs for get_*, update_*, complete_*, and cancel_* tools are passed at the root as id.
Catalog search example (with pagination inside catalog):
{
"meta": {
"ucp-agent": {
"profile": "https://your-platform.example/.well-known/ucp"
}
},
"catalog": {
"query": "blue t-shirts under 30",
"pagination": { "limit": 20 }
}
}Cart creation example:
{
"meta": {
"ucp-agent": {
"profile": "https://your-platform.example/.well-known/ucp"
}
},
"cart": {
"line_items": [
{ "item": { "id": "12345" }, "quantity": 1 }
]
}
}Idempotency keys
Three MCP tools require meta["idempotency-key"]:
cancel_cartcomplete_checkoutcancel_checkout
{
"meta": {
"ucp-agent": {
"profile": "https://your-platform.example/.well-known/ucp"
},
"idempotency-key": "550e8400-e29b-41d4-a716-446655440000"
},
"id": "{checkout-id}"
}Idempotency keys are cached for 24 hours, fingerprinted per operation and payload, and scoped per caller (or per downstream profile origin for broker keys). Reusing a key with a different payload returns JSON-RPC error -32000 (idempotency_conflict).
Unlike REST, MCP create_cart and create_checkout do not declare or consume meta["idempotency-key"].
Authentication, profile binding, and broker mode
Storefront MCP uses the same authentication tiers, credentials (X-API-Key, RFC 9421 signatures, enabled anonymous access, and paired Authorization: Bearer ucp_at_... tokens), and error rules as UCP authentication. Public keys (fq_pub_...) and bare Authorization: Bearer ucp_at_... tokens without an agent credential are rejected with HTTP 401.
Profile binding
For non-broker platform keys (fq_platform_*) and signed requests, meta["ucp-agent"].profile on every tools/call must share an origin (scheme, host, and port) with the authenticated platform or signer profile. Mismatches are rejected with isError: true and error code profile_mismatch. If the HTTP UCP-Agent header is also sent, Finqu checks it against the same origin at HTTP authentication time (403 profile_mismatch). Channel keys (fq_secret_*) are not bound to a platform profile.
Broker platform keys
A platform key provisioned by Finqu in broker mode may forward any valid public HTTPS downstream agent profile in meta["ucp-agent"].profile at Token tier:
- Per-downstream-origin isolation: Rate-limit buckets and
meta["idempotency-key"]caches are scoped per downstream profile origin. - Batching behavior: Single
tools/callrequests and same-origin JSON-RPC batches use the downstream origin’s rate-limit bucket; mixed-origin JSON-RPC batches and protocol handshakes (initialize,tools/list) use the broker’s shared bucket. - User-tier binding: When a broker key also presents
Authorization: Bearer ucp_at_...,meta["ucp-agent"].profileis required and must match the origin the buyer token was issued to; omitting it or sending another origin fails withprofile_mismatch.
Rate limiting
Storefront MCP uses the mcp resource bucket on the 60-second sliding window defined in UCP authentication. Platform and broker keys (fq_platform_...) receive higher limits than channel keys, and User-tier requests share the paired agent credential’s allowance. Responses include X-RateLimit-Remaining and X-RateLimit-Reset headers; 429 responses also include Retry-After.
Error responses
Clients must handle four error shapes on /mcp:
- HTTP transport, authentication, and rate-limit errors (HTTP
400,401,403,404,405,413,415,429,500,502,503,504): JSON-RPC error object (-32600,-32700,-32603, or-32000) withmessage.401responses includeWWW-Authenticate;429responses includeX-RateLimit-Remaining,X-RateLimit-Reset, andRetry-After. - Protocol-level JSON-RPC errors on
tools/call(HTTP200, JSON-RPCerror):-32001("UCP discovery failed",data: { "code", "content" }): profile negotiation failures (invalid_profile_url,profile_unreachable,profile_malformed,version_unsupported).-32000("Idempotency conflict",data: { "code": "idempotency_conflict", "content" }): idempotency key reused for a different operation or payload.
- Policy and validation tool errors (HTTP
200, JSON-RPCresultwithisError: true):content[0].textcontains a JSON-encoded UCP error envelope (ucp.status: "error",severity: "unrecoverable") forinsufficient_tier,insufficient_scope,unauthorized,profile_mismatch,tool_not_found,invalid_parameters, andinternal_error. - Business-level tool errors (HTTP
200, JSON-RPCresultwithisError: false):content[0].textcontains a JSON-encoded UCP error envelope (ucp.status: "error",messages: [...]) for business outcomes such asnot_found,capabilities_incompatible,validation_error,customization_error,cart_error,cart_unavailable,checkout_creation_failed,checkout_update_failed,checkout_completion_failed,cancel_failed,request_too_large, andinsufficient_scope(on User-tierget_ordermissingdev.ucp.shopping.order:read).
Always parse content[0].text and inspect ucp.status and messages, even when isError is false.
Connecting an agent
- Enable UCP and the MCP server on the channel (see Activating UCP).
- Point your Streamable HTTP MCP client to
POST https://{shop-domain}/mcp. - Authenticate with
X-API-Key(fq_secret_...orfq_platform_...), RFC 9421 signatures, or an enabled anonymous tier, pairing withAuthorization: Bearer ucp_at_...for buyer-scoped User-tier access. - Call
tools/list(filtered to your authenticated tier) or read the OpenRPC schemas from/.well-known/ucp. - Send
meta["ucp-agent"].profileon every tool call, wrap request fields incatalog,cart,checkout, orlocation, and includemeta["idempotency-key"]oncancel_cart,complete_checkout, andcancel_checkout.