Synchronity
Concepts

MCP Server

The 22 commerce tools Synchronity exposes to Claude, ChatGPT, Cursor, and any other Model Context Protocol client.

What is MCP?

The Model Context Protocol is Anthropic's open standard for letting LLMs call tools running on the user's machine (or hosted elsewhere). Synchronity ships an MCP server that exposes the gateway's REST API as 22 typed tools, so an agent can call search_products the same way it'd call read_file.

Two delivery modes

The same MCP server ships two ways:

  1. stdio binary — runs locally; your client spawns it and communicates over stdin/stdout. Used by Claude Desktop and Cursor's local MCP config. Installed via the .mcpb bundle or npx @synchronity/mcp-server.
  2. Hosted HTTP — the gateway mounts the same tools at its root. Remote agents (ChatGPT custom connectors, hosted Claude.ai) connect to https://api.synchronity.app/mcp without installing anything.

The 22 tools

CategoryToolWhat it does
Discoverylist_sitesReturns all sites the agent has access to.
Discoverysearch_productsCross-store keyword search, returns ranked AMPS payload.
Discoveryget_productFetch one product by ID + site.
Discoveryget_product_reviewsReviews for a product.
Discoverycompare_productsSide-by-side comparison across stores.
Cartcreate_cartOpen a new cart on a site.
Cartadd_to_cartAdd a product variant + quantity.
Cartremove_from_cartRemove a line item.
Cartget_cartFetch current cart state.
Cartapply_couponApply a discount code.
Shippingset_shipping_addressSet destination, get rates.
Shippingselect_shipping_optionPick a rate.
Checkoutexecute_checkoutFinalize order (triggers delegation if required).
Delegationrequest_delegationIssue an OAuth device code.
Delegationcheck_delegationPoll for approval status.
Delegationsubmit_delegation_otpApprove a request with an emailed one-time passcode.
Orderslist_ordersList buyer's past orders.
Ordersget_orderSingle order detail.
Paymentsget_payment_methodsPayment channels available for an order.
Paymentsinitiate_paymentStart an in-chat payment (mobile money or card); requires delegation.
Paymentssubmit_payment_otpSubmit a mobile-money OTP; requires delegation.
Paymentsget_payment_statusPoll until the payment is confirmed or fails.

(The payment tools bring the in-chat checkout flow to MCP clients; the exact surface area grows as the gateway does.)

Inline payments

The four *_payment* tools let an agent collect payment inside the chat for an order that already exists, without sending the buyer to a hosted checkout page. The flow: get_payment_methodsinitiate_payment (mobile money or a Paystack-hosted card redirect) → submit_payment_otp if an OTP is needed → poll get_payment_status until paid/processing. initiate_payment and submit_payment_otp require a buyer_delegation_token (same as checkout), and site_id falls back to DEFAULT_SITE_ID so only order_id is strictly required.

Interactive cards (MCP Apps)

As of v1.1, Synchronity ships MCP Apps Views (SEP-1865) — interactive UI cards that render directly inside hosts that support them, such as Claude. Instead of returning plain text, discovery and cart tools emit dual output:

  • a Markdown summary (so every client, including text-only ones, still gets a readable answer),
  • structuredContent (the typed AMPS payload), and
  • a ui.resourceUri pointing at a hosted view under ui://synchronity/*.

Three views ship today:

ViewResourceBacked by
Single productui://synchronity/productget_product, search_products (single result)
Product listui://synchronity/product-listsearch_products, compare_products
Cartui://synchronity/cartcreate_cart, get_cart, add_to_cart, remove_from_cart

Hosts that don't understand the views simply fall back to the Markdown — there's no degraded experience. The view bundles ship inside the .mcpb (and the hosted MCP serves them), so no extra setup is required.

Tool authentication

The MCP server reads GATEWAY_URL, AIT_TOKEN, and DEFAULT_SITE_ID from env. Every tool call attaches the AIT as a Bearer token; the gateway enforces scope. Tools that mutate (cart, checkout) check that the AIT carries manage_cart or execute_checkout respectively — wrong scope returns 403 forbidden_scope before the connector is touched.

Adding a custom tool

The MCP layer is a thin shell over the REST gateway — it holds no business logic of its own. New capabilities are added as gateway routes and surfaced as MCP tools, so there's a single source of truth.

Reference clients

Typed clients are published for TypeScript, Python, Go, and PHP, so you can call the gateway directly without the MCP layer.

On this page