ucp-supplier-gateway
Ships a SAP Commerce (OCC v2) backend adapter that lets agents search a supplier's catalog, build carts and request/negotiate quotes at the linked buyer account's contract and volume prices, without modifying the SAP backend. Includes a mock OCC B2B storefront (with volume breaks, MOQ, stock and customer-specific prices) for development, and can be pointed at a real OCC system via OCC_BASE_URL and OCC_SITE_ID.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
ucp-supplier-gateway
A reference supplier-side endpoint for the Universal Commerce Protocol (UCP), over REST and MCP, in front of a B2B commerce backend.
It lets AI agents and procurement platforms search a supplier's catalog, build carts, and request or negotiate quotes, all at the linked buyer account's contract and volume prices, without changing the backend. The first backend adapter targets SAP Commerce (OCC v2), including on-premise 2205 systems that won't get native agent support.
Status: reference implementation, not production-ready. The SAP backend is a mock built from SAP's OCC documentation, buyer identity uses static demo tokens, and stores are in-memory. See Limitations.
Why
B2B buying is quote-led and account-priced: the same item has a different price for every customer, volume breaks, minimum order quantities, and "call for quote". UCP's B2B work (the B2B Procurement charter, #947, and the quote proposal, #929) is just starting. This project shows, in working and tested code, what the supplier side of that looks like against a legacy ERP-backed storefront.
Related MCP server: Shopping MCP Server
What it implements
UCP capability | REST | MCP tool | Notes |
Discovery |
| — | Business profile advertising REST and MCP services |
|
|
| Account pricing with identity linking |
|
|
| Batch lookup with |
|
|
| Contract and volume pricing, MOQ and stock messages, expiry |
Quote extension (#929, draft) |
| same tools | Firm quotes, price proposals, pending review, accept by id, invalidation |
Protocol behaviour that's implemented and tested:
Conformance: every response is validated in tests against the official UCP JSON Schemas (vendored from release
2026-08-25) and the draft quote schema from PR #930.Idempotency per UCP: SHA-256 of the raw request body,
409on key reuse with a different body, replay withIdempotent-Replayed: true, and server errors aren't stored, so retries work after recovery. Also honoured for MCP viameta["idempotency-key"].Two-layer errors: transport errors as HTTP status (REST) or JSON-RPC
-32000(MCP); business outcomes as UCPmessageswith severity and JSONPathpath.Access control: carts and quotes are scoped to the buyer account; other accounts get
not_found. Quoting requires a linked account (identity_requiredotherwise).Money is always integer minor units; decimal backend prices convert without float maths.
Quick start
Requires Node.js 22+ and pnpm.
pnpm install
pnpm test # 79 tests, including schema conformance and a real MCP client
pnpm start # mock SAP OCC on :9002, gateway on :8080REST
H='UCP-Agent: profile="https://agent.example/profile.json"'
A='authorization: Bearer demo-token-acme' # a linked buyer account (demo token)
J='content-type: application/json'
# Same search, anonymous vs. Acme's contract prices
curl -s -X POST localhost:8080/ucp/catalog/search -H "$H" -H "$J" -d '{"query":"hex bolt"}'
curl -s -X POST localhost:8080/ucp/catalog/search -H "$H" -H "$A" -H "$J" -d '{"query":"hex bolt"}'
# Cart for 500 boxes (volume break) and ask for a firm quote
curl -s -X POST localhost:8080/ucp/carts -H "$H" -H "$A" -H "$J" -H 'idempotency-key: demo-1' \
-d '{"line_items":[{"item":{"id":"HX-1040"},"quantity":500}],"quote":{"proposal":{}}}'
# Accept it: PUT the same line items with quote.accepted_id = the returned quote.idMCP
Point any MCP client at http://localhost:8080/ucp/mcp (streamable HTTP). Send the buyer's
token as an Authorization: Bearer header, and include UCP metadata in every call:
{ "name": "search_catalog",
"arguments": { "meta": { "ucp-agent": { "profile": "https://agent.example/profile.json" } },
"catalog": { "query": "hex bolt" } } }Quotes, end to end
Buyer sends ( | Default policy answers | Result |
| Firm quotation at the current account price |
|
| Accept |
|
… within 10% below | Send to a person |
|
… lower | Decline |
|
| Accept that quotation if it's current |
|
| Accept if it's for this account, the same items and quantities (any order), and unexpired |
|
Line items or quantities change | — | Quotation invalidated, |
(Business withdraws a | — |
|
The policy is a pluggable interface (QuotePolicy), so rules, a model or a sales desk can decide.
new ThresholdQuotePolicy(0.03, 0.1, false) answers {} with quote_unavailable instead of a
quotation, for a Business whose answer would reveal its floor (the MAY discussed on #929).
With ADMIN_TOKEN set, two routes stand in for a sales desk:
Route | Does |
|
|
| Issues a quotation outside any cart: |
Architecture
AI agent / procurement platform
│ UCP over REST │ UCP over MCP (streamable HTTP)
▼ ▼
┌──────────── ucp-supplier-gateway ─────────────┐
│ profile · catalog · cart · quote extension │ MCP tools are translated onto the
│ identity → account · idempotency · validation │ REST routes in-process: one implementation
│ pricing: contract · volume breaks · MOQ · stock│
└────────────────────┬───────────────────────────┘
│ CommerceBackend port (swappable)
▼
SAP Commerce OCC v2 (mock included)Path | What |
| Canonical catalog model and the |
| SAP Commerce OCC v2 adapter, plus a mock B2B storefront |
| Pure line pricing: volume breaks, MOQ, stock, currency checks |
| Profile, catalog and cart routes, quote state machine, schemas |
| UCP MCP binding (official MCP TypeScript SDK) |
| UCP replay protection |
| Official UCP schemas (Apache-2.0) and the draft quote schema |
Run against a real OCC system by setting OCC_BASE_URL and OCC_SITE_ID. In production,
set PUBLIC_ORIGIN. The quote extension's namespace is derived from it, so its served schema
passes UCP authority binding.
Limitations
No real SAP system tested yet. OCC field names follow SAP's documentation and still need checking against a 2205 sandbox.
Identity linking is stubbed: static tokens map to buyer accounts. Production needs a UCP identity-linking OAuth server.
No request signature verification (RFC 9421) yet.
In-memory stores for carts and idempotency keys; production needs Postgres.
No checkout, orders or payments. Carts and quotes only.
The quote extension follows a draft (#929 / PR #930) and will change with it. It is served under the gateway's own namespace until
dev.ucp.common.quoteis released.An accepted quotation is held even if the buyer's price later falls. The
quotetotals entry isquote.subtotalminus the current line subtotals, so when the account price drops below the quoted subtotal, the entry turns positive and the buyer pays more than today's price. The draft spec doesn't say what should happen here; it's raised on #929, and the gateway will follow whatever is agreed.
Open design questions
Backend credentials per buyer account. OCC prices a B2B customer's session, so account pricing needs an OCC token per buyer organisation (a technical customer per unit, token exchange, or price rows via the Integration API).
Slow ERP pricing. Customer prices often come from the ERP (ECC/S/4HANA) in real time. The likely answer is caching with short TTLs, and
pendingor async responses when pricing is slow.
Roadmap
Postgres stores; RFC 9421 signature verification; real identity linking
Track #929 / #877 / #969 as they evolve; per-line quoted prices if the spec adds them
Checkout and order, with async completion (
complete_in_progress) for slow backendsA second backend adapter
Contributing
Issues and pull requests are welcome, especially from people running SAP Commerce or other
B2B backends who can test against real systems. Please run pnpm test and pnpm typecheck
before opening a PR.
License
Apache-2.0. Includes UCP schemas under Apache-2.0; see NOTICE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Search multi-merchant supply, checkout, and track orders via MCP.
Agent-native commerce with trusted catalog, durable carts, and Stripe Checkout via MCP and UCP.
Universal Commerce Protocol (UCP 2026-08-25) MCP storefront for AI shopping agents and @shopify/ucp-cli: catalog search, batch lookup, product detail pages, stateful carts, Stripe & USDC checkouts, and order tracking.
Self-sovereign BYOC headless commerce & agentic MCP checkout engine for B2B storefronts.
81
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to discover products, build carts, and complete purchases across multiple downstream commerce services through a secure, contract-driven API.-
- FlicenseAqualityDmaintenanceEnables eBay-backed product search, authenticated shopping carts, checkout quotes, and order management through MCP tools and resources.11-
- AlicenseAqualityCmaintenanceEnables AI agents to query tenants, browse catalogue items with pricing, pull recent orders, and add products through the MCP tool-calling interface.4MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to discover products, verify signed catalog feeds, negotiate within published policies, and place mandate-bound orders with signed receipts via MCP, A2A, or REST.1MIT