> ## Documentation Index
> Fetch the complete documentation index at: https://storekit.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP Endpoint

> Connect an AI assistant to a storekit store over MCP. Read a venue's menu, item options, fulfillment methods and time slots, and build a priced cart with the UCP cart tools.

**Who this is for:** an assistant or agent app acting for the customer, outside their browser.

Every storekit ordering host is also a remote [MCP](https://modelcontextprotocol.io) server. An assistant that is nowhere near the customer's browser — ChatGPT, Claude, an agent app, an IDE — can connect to it, read a venue's menu, quote a price and build a cart the customer then opens to pay.

## Endpoints

There are two scopes, and both are reached on the store's own ordering host:

| Endpoint                                  | Scope                                                     |
| ----------------------------------------- | --------------------------------------------------------- |
| `POST https://{host}/{venueSlug}/api/mcp` | One venue — for an agent already talking about a location |
| `POST https://{host}/api/mcp`             | Every venue of the brand on that host, resolved per call  |

`{host}` is the domain the store's ordering pages are served from, such as `order.storekit.com`. Both endpoints are scoped by that host, so a brand on its own domain can only ever answer for its own venues.

Use the brand endpoint when the customer has not said which branch they want: `find_venues` returns the slug every other tool then takes as its `venue` argument. Use the venue endpoint when the location is already settled.

A `GET` or `HEAD` on either endpoint returns `200` and a line saying what the endpoint is, so a client can probe it before opening a session.

## Protocol

JSON-RPC 2.0 over HTTP, one message per `POST`. The methods implemented are `initialize`, `ping`, `tools/list` and `tools/call`; MCP revisions `2025-06-18`, `2025-03-26` and `2024-11-05` are all answered in the revision the client asks for.

```bash theme={null}
curl -X POST https://order.storekit.com/gordon-ramsay-plane-food-1/api/mcp \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "search_menu",
      "arguments": { "query": "something vegan" }
    }
  }'
```

Every result is JSON in a text content block, repeated as `structuredContent` for clients that read it. The endpoint is stateless: `initialize` returns no session id and nothing is remembered between requests, so a conversation carries the venue slug and the cart id rather than a session.

Errors split by who can act on them. A malformed argument is a JSON-RPC `-32602` naming the parameter; anything the assistant could recover from — no such category, no match, a venue that stopped accepting orders — comes back as a tool result with `isError: true` whose text says what to do next.

## Read Tools

| Tool                        | Description                                                                                                                                                                |
| --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `find_venues`               | List the brand's venues, filtered by name, town or postcode. Returns the slug the other tools take.                                                                        |
| `get_menu`                  | The venue's menu: every category with its items, prices, dietary tags and availability. A very long menu is summarised, and a category name returns that category in full. |
| `search_menu`               | Search the menu by dish name, category or description. For menus too long to return whole.                                                                                 |
| `get_item`                  | One item in full, including every option group, how many choices it takes and what each costs.                                                                             |
| `get_available_fulfillment` | How the venue can be ordered from, the minimum spend for each method, whether it is open now, and today's hours.                                                           |
| `get_available_slots`       | The delivery or collection slots still free on a given day.                                                                                                                |

On the brand endpoint every tool except `find_venues` takes an extra `venue` argument, and a slug that does not belong to that brand is refused with the brand's own list rather than answered from another brand's menu.

Reads carry `readOnlyHint`, so a client can call them without asking the customer first. Prices are formatted strings in the venue's currency, descriptions are stripped and truncated, and every list is capped.

<Note>
  Fulfillment methods are reported from what the venue payload proves: Delivery, Pickup and InStore. Catering is not offered over MCP.
</Note>

## Cart Tools

The cart capability follows the [UCP cart MCP binding](https://ucp.dev/2026-08-25/specification/shopping/cart/mcp/) exactly, so a UCP client needs no mapping table.

| Tool          | Description                                                                                      |
| ------------- | ------------------------------------------------------------------------------------------------ |
| `create_cart` | Build a cart at this venue from menu items, priced in the venue's currency.                      |
| `get_cart`    | Re-read and re-price a cart by id.                                                               |
| `update_cart` | Replace the cart's lines. A full replacement, not a patch: send every line the cart should hold. |
| `cancel_cart` | Discard the cart.                                                                                |

What the binding means in practice:

* Every call carries `meta["ucp-agent"]` with your agent profile. A call without it is rejected.
* The cart id is a top-level `id`, never nested inside `cart`.
* Amounts are integer minor units (`450` is £4.50).
* A business problem is a successful result carrying `messages[]` — a line that stopped being sellable is reported there rather than vanishing.
* Lines are named by item id with options in brackets, `BURGER(CHEESE;BACON:2)`, the same grammar the [basket prefill links](/docs/developers/basket-prefill) use.

A cart holds intent, not prices: every operation re-resolves and re-prices it against the menu as it is right now, so a stored cart cannot quote a figure the venue page would contradict. Carts expire 24 hours after their last write, and nothing customer-scoped is stored in one.

<Warning>
  A cart is not an order, and these tools speak only for the customer's side. Nothing here reads a store's order queue, edits a menu or changes a setting. The tools return a `continue_url` the customer opens to review the cart and pay on the venue's page — there is no checkout, payment or discount tool, and no order is placed until they finish there.
</Warning>

## Related

<CardGroup cols={2}>
  <Card title="UCP discovery" icon="magnifying-glass" href="/docs/developers/agents/ordering/ucp">
    The profile that advertises these endpoints and the cart capability.
  </Card>

  <Card title="WebMCP tools" icon="window" href="/docs/developers/agents/ordering/webmcp">
    The separate tool set an agent calls inside the customer's browser.
  </Card>
</CardGroup>


## Related topics

- [UCP Discovery](/docs/developers/agents/ordering/ucp.md)
- [Ordering Agents Overview](/docs/developers/agents/ordering/overview.md)
- [Developer Introduction](/docs/developers/introduction.md)
- [WebMCP Tools](/docs/developers/agents/ordering/webmcp.md)
- [llms.txt](/docs/developers/agents/ordering/llms-txt.md)
