Synchronity
Concepts

MCP Server

The 26 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 26 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 26 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.
Discoveryrequest_back_in_stockSubscribe the buyer to a back-in-stock email alert for an out-of-stock product.
Cartcreate_cartOpen a new cart on a site.
Cartadd_to_cartAdd a product variant + quantity.
Cartset_cart_quantitySet a line's quantity (0 removes it).
Cartremove_from_cartRemove a line item.
Cartget_cartFetch current cart state.
Cartget_active_cartResume the buyer's in-progress cart.
Cartapply_couponApply a discount code.
Shippingset_shipping_addressSet destination, get rates.
Shippingselect_shipping_optionPick a rate.
Checkoutquick_checkoutAssemble checkout-ready cart(s) across one or more stores in a single call (creates carts, adds items, sets address).
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 + enabled gateways (gateways[]) available for an order.
Paymentsinitiate_paymentStart an in-chat payment (mobile money or card); optional gateway selector; 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 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.

When a store enables more than one payment gateway, get_payment_methods returns a gateways[] array (e.g. Paystack, Stripe, PayPal). Ask the buyer which they want and pass it as the optional gateway argument (paystack | stripe | paypal) to initiate_payment; omit it to use the store's first enabled gateway. Stripe and PayPal are card/redirect via a hosted Checkout page (PayPal appears only for PayPal-supported currencies); Paystack also offers Ghana mobile money (with the in-chat OTP step).

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 — all optional (GATEWAY_URL defaults to the hosted gateway; with no AIT_TOKEN the server auto-registers its own identity on first run). 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