> Full index: https://docs.buchungapp.com/llms.txt
> Early access. Use the API base, channel key and allowed origins supplied by Buchung before running examples.

# Storefront MCP server

Every enabled Buchung operator exposes a guest-facing Model Context Protocol (MCP) server directly on their own storefront domain:

```text
https://<storefront-host>/mcp
```

It is a third transport over the same Storefront v1 catalogue readers used by the HTTP API. There is no shared cross-operator address and no operator argument in tool calls: the storefront host resolves the operator and its dedicated `assistant` booking channel on every request.

> **Early access and opt-in**
>
> The Storefront MCP endpoint is provisioned per operator on request. If an operator has not enabled it (or has disabled it), `/mcp` returns HTTP `404` with an empty body.

## Transport and security boundary [#transport-and-security-boundary]

- **Protocol:** Stateless Streamable HTTP (JSON-RPC 2.0 over `POST` with `Content-Type: application/json`), supporting MCP protocol `2026-07-28` (`server/discover`) and earlier stateless protocol versions (`initialize`).
- **No sessions or streams:** no `Mcp-Session-Id` is issued or accepted; `GET`, `DELETE` and other non-`POST` methods return `405 Method Not Allowed` (`Allow: POST`). JSON-RPC batch arrays are rejected (`400`).
- **Credential-free and guest-only:** the endpoint never reads cookies or `Authorization` headers, never sets cookies and never accesses staff or customer data. No management operation or checkout write exists on this endpoint.
- **No browser calls:** requests carrying an `Origin` header are rejected with `403`. MCP clients call from server/connector or CLI environments, not browser pages.
- **Payload bounds:** request bodies are capped at **16 KiB** (`413`). Complete tool results (text plus structured content together) are capped at **100 KB UTF-8**.

## Available tools [#available-tools]

All nine tools are strictly read-only (`readOnlyHint: true`, `destructiveHint: false`, `idempotentHint: true`, `openWorldHint: false`). Every tool accepts an optional `locale` argument (following the same default-locale fallback rules as `Buchung-Locale`) and returns both JSON text content and `structuredContent`.

| Tool | Purpose | Key arguments & behavior |
| --- | --- | --- |
| `get_site` | Operator name, branding, locations, contact details, legal links and supported locales. | Optional `locale`. |
| `list_activities` | Browse published activities. | Optional `where` (JSON string), `includePast`, `limit` (1–25, default 25), `cursor`, `locale`. Returns summary items (omitting `media`, `trustSignals` and `html` to stay compact). |
| `query_activities` | Filter published activities with a JSON object. | Same as `list_activities`, but `where` is a JSON object using the [typed query grammar](/docs/developers/data-model#typed-filters-where). No free-text search. |
| `get_activity` | Full details for one activity, including media, trust signals, HTML, facts and PDFs. | Pass exactly one of `id` (UUID) or `handle`, plus optional `locale`. Resolves published and unlisted activities. |
| `list_availabilities` | Browse upcoming dates, times, prices and remaining units. | Optional `activityId`, `where` (JSON string), `includePast`, `limit` (1–25), `cursor`, `locale`. Enriches responses with an `activities` array (`id`, `handle`, `title`) for every referenced activity. |
| `query_availabilities` | Filter dates, times, prices and remaining units with a JSON object. | Same as `list_availabilities`, with `where` as a JSON object (for example `{"availability":{"startDate":{"from":"2027-07-01","to":"2027-07-31"}}}`). Best starting point for date questions. |
| `get_availability` | Details, price and remaining places for one availability. | Required `id` (UUID), optional `locale`. |
| `get_booking_options` | Paginated offerable options for one activity, plus activity-wide `priceSummary` and `from`. | Required `id` (activity UUID), optional `limit` (1–25), `cursor`, `locale`. Automatically shrinks page size if needed to stay under the 100 KB result cap. |
| `get_booking_page` | Resolve the absolute storefront URL (`/<lang>/activities/<handle>`) where the guest can book an activity. | Pass exactly one of `id` or `handle`, plus optional `locale`. Selects and reserves nothing. |

### Guidance built into tool responses [#guidance-built-into-tool-responses]

- **Money:** amounts are integer minor units (`6500` EUR = €65.00).
- **Timestamps:** UTC instants; display in the result's `timeZone`.
- **Capacity:** `remaining` is units of that specific option (`null` means uncapped, not sold out). Never sum `remaining` across options.
- **Drops:** `open: false` means not bookable yet; `bookableFrom` gives the opening timestamp unless sold out.
- **Typed filters:** `where` uses `activity`, `availability` and `fact` leaves. Use public catalogue references. Unavailable references are handled like unknown ones. Use the [Storefront HTTP API](/docs/developers/data-model#configured-facets-and-collections) for collection and facet queries.

## Error handling [#error-handling]

Tool failures never return an empty list (which would mislead an assistant into saying nothing is available). Instead, they return a tool result with `isError: true` and a structured error object `{ error: { reason, message, retryable } }`:

| `reason` | Retryable | Meaning |
| --- | --- | --- |
| `invalid_argument` | No | Correct the invalid parameter, locale, resource reference, or `id`/`handle` choice before retrying. |
| `not_found` | No | Resource does not exist or is not publicly accessible. |
| `result_too_large` | No | Response exceeded the 100 KB cap; narrow the query or lower `limit`. |
| `temporarily_unavailable` | Yes | Reader timeout (10s tool deadline), concurrency cap or transient backend error. |

HTTP-level rejections occur before tool execution:

- `400`: malformed JSON-RPC envelope or batch array (`-32600`)
- `403`: `Origin` header present
- `404`: operator not provisioned or MCP disabled
- `405`: non-POST method (`Allow: POST`)
- `413`: body larger than 16 KiB
- `415`: `Content-Type` is not `application/json`
- `429`: rate limit exceeded (returns `Retry-After`)
- `503`: limiter or channel configuration unavailable

## Rate limits [#rate-limits]

Limits fail closed (no in-memory fallback) and use fixed one-minute windows:

| Scope | Limit per minute |
| --- | ---: |
| Source / vendor network (before database lookup) | 1200 requests |
| Operator assistant channel + source / vendor | 300 channel requests (`server/discover`, `initialize`, `tools/list`, `tools/call`) |
| OpenAI per-subject (`openai/subject` metadata) | 60 tool calls |

Anthropic and OpenAI published connector IP ranges are bucketed by vendor so multi-IP connector calls stay predictable.

## Testing with curl and CLI clients [#testing-with-curl-and-cli-clients]

Verify tool discovery against an enabled storefront host:

```sh
curl -sS -X POST "https://<storefront-host>/mcp" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
```

Call `query_availabilities` for a date range:

```sh
curl -sS -X POST "https://<storefront-host>/mcp" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 2,
    "method": "tools/call",
    "params": {
      "name": "query_availabilities",
      "arguments": {
        "where": {
          "availability": {
            "startDate": { "from": "2027-07-01", "to": "2027-07-31" }
          }
        },
        "limit": 10
      }
    }
  }'
```

For guest-facing setup steps in Claude and ChatGPT, see the [AI assistants operator guide](/docs/platform/ai-assistants).

## Planned extensions [#planned-extensions]

Today's Storefront MCP slice focuses on read-only discovery plus activity page links (`get_booking_page`). Pre-filled checkout links and inquiry/waitlist tools are planned future additions and are not part of this endpoint today. Staff use a separate authenticated server, described in the [operator MCP guide](/docs/developers/operator-mcp), which is in an invitation-only pilot.

