mcpField
M
mcp-ucp

mcp-ucp

Local
github.com/codesparBusiness & Marketing275Updated 5w ago

About mcp-ucp

mcp-ucp is an MCP server for Google's Universal Commerce Protocol (UCP), exposing tools for product search, cart, checkout, orders and delivery. The README marks the package as deprecated because the default endpoints do not respond, so no tool reaches a live service.

Key features

  1. 01Product search and detail lookup
  2. 02Cart creation and management
  3. 03Checkout, payment and order confirmation
  4. 04Order lookup, cancellation and returns
  5. 05Delivery options and shipment tracking
  6. 06Buyer identity and profile management

Use cases

  1. 01Prototyping product search and cart flows for AI agents
  2. 02Studying tool interface design for the UCP commerce protocol
  3. 03Reference for mapping ecommerce steps to MCP tools

MCP support

This is an MCP server that exposes 20 commerce tools to MCP clients. The UCP_BASE_URL variable can point it at another endpoint, but the default endpoint is currently unavailable.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"codespar-mcp-ucp": {
"command": "npx",
"args": [
"-y",
"@codespar/mcp-ucp"
],
"env": {
"UCP_API_KEY": "<UCP_API_KEY>"
}
}
}
}
Run commandnpx -y @codespar/mcp-ucp
Environment variables to set
UCP_API_KEYSecretAPI key for ucp

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@codespar/mcp-ucp0.1.4

Tools

20

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
querystringYesSearch query (e.g. 'wireless headphones')
sortByenumNoSort orderrelevance | price_asc | price_desc | rating | newest
categorystringNoCategory filter
currencystringNoCurrency code (default: USD)
maxPricenumberNoMaximum price
minPricenumberNoMinimum price
pageSizenumberNoResults per page
pageTokenstringNoPagination token
merchantIdstringNoMerchant ID (uses default if omitted)

Details

From the project README

@codespar/mcp-ucp

Deprecated: no live endpoint. Measured on 2026-09-27: commerce.googleapis.com answers every path with Google's generic Error 404 (Not Found) page, and sandbox.commerce.googleapis.com (used with UCP_SANDBOX=true) fails the TLS handshake, because the certificate served there covers *.googleapis.com and not the extra label. UCP is an open specification, not an API Google hosts. No tool in this server reaches a service. The package is deprecated on npm and stays in this repository for reference only. If you have a working endpoint, point the server at it with UCP_BASE_URL. To bring the package back, open an issue in mcp-dev-latam with the provider's documented base URL.

MCP server for Google UCP — Universal Commerce Protocol for agentic shopping, cart, checkout, orders, and delivery

npm License: MIT

What is UCP?

Universal Commerce Protocol (UCP) is Google's open standard for agentic commerce. It enables AI agents to autonomously discover products, build carts, checkout, manage orders, and track deliveries — without screen-scraping or bespoke merchant integrations.

UCP works alongside AP2 (payment processing) and A2A (agent-to-agent interoperability), with MCP as the transport layer.

Quick Start

Claude Desktop
{
  "mcpServers": {
    "ucp": {
      "command": "npx",
      "args": ["-y", "@codespar/mcp-ucp"],
      "env": {
        "UCP_API_KEY": "your-key",
        "UCP_MERCHANT_ID": "your-merchant-id"
      }
    }
  }
}
Claude Code
claude mcp add ucp -- npx @codespar/mcp-ucp

Tools (20)

ToolPurpose
search_productsSearch merchant product catalog.
get_productGet detailed product information including pricing, variants, availability, and reviews
check_availabilityCheck product stock and delivery availability for a specific location
list_merchantsList UCP-compatible merchants with optional category and region filters
create_cartCreate a new shopping cart for a merchant
add_to_cartAdd an item to the shopping cart
remove_from_cartRemove an item from the shopping cart
get_cartGet cart contents, item totals, taxes, and shipping estimates
clear_cartRemove all items from the cart
get_delivery_optionsGet available shipping and delivery options for a cart
initiate_checkoutStart the checkout process for a cart.
apply_paymentApply a payment method to the checkout session.
confirm_orderConfirm and place the order.
get_orderGet order details including items, status, payment, and shipping info
list_ordersList orders with optional filters
cancel_orderCancel a pending or confirmed order
request_returnRequest a return or refund for a delivered order
track_shipmentGet real-time shipment tracking details for an order
link_identityLink buyer identity for personalization and order history across merchants
get_profileGet buyer profile, preferences, and linked merchants

UCP + AP2 + A2A — The Full Stack

AI Agent
  └── MCP (tool interface)
       └── UCP (commerce: discover → cart → checkout → order → delivery)
            ├── A2A (agent-to-agent discovery & communication)
            └── AP2 (payment: authorize → execute → settle)

Environment Variables

VariableRequiredDescription
UCP_API_KEYYesSent as Authorization: Bearer
UCP_MERCHANT_IDNoSent as the X-Merchant-Id header
UCP_SANDBOXNotrue switches BASE_URL to https://sandbox.commerce.googleapis.com/ucp/v1, which fails TLS

Links

Enterprise

Need governance, budget limits, and audit trails for agent payments? CodeSpar Enterprise adds policy engine, payment routing, and compliance templates on top of these MCP servers.

Authentication

The server sends UCP_API_KEY as an Authorization: Bearer header and UCP_MERCHANT_ID as an X-Merchant-Id header on every request (src/index.ts:78-83).

There is no portal issuing those credentials. The developer portal this README used to link, developers.google.com/agents/commerce, answers HTTP 404.

License

MIT

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.