Zum Inhalt springen
tablezio

Agenten & MCP

Verbinde einen KI-Agenten mit einem Restaurant.

Tablezio spricht das Model Context Protocol. Mit einem API-Schlüssel erhält ein Agent in Claude, Cursor oder ChatGPT 14 Werkzeuge für Reservierungen, Speisekarte, Bestellungen, Lager und Umsätze eines Restaurants — begrenzt durch die Scopes des Schlüssels, den Tarif und die gebuchten Module.

What it is

One MCP endpoint, two modes. The Bearer token is optional: without it you get the public, read-only tools; with it you get the restaurant that owns the key, and only that restaurant.

  • Remote, over Streamable HTTP: POST https://api.tablezio.com/mcp, stateless, no session to keep.
  • Either way the key is the tenant: an agent can never read or write another restaurant’s data.

When a client lists the tools, the server returns only the ones the key’s scopes, plan and contracted modules allow. get_account is always there: it is how an agent finds out what it may do and why it may not do more.

Install

Create a key in Tablezio › Settings › API keys and agents and point your client at https://api.tablezio.com/mcp with the key in an Authorization: Bearer header. Clients whose connector screen only asks for a URL need no key at all: see the OAuth connector below.

Claude Desktop

Add Tablezio as a custom connector (Settings › Connectors › Add custom connector) with the URL https://api.tablezio.com/mcp. Claude Desktop signs in through the OAuth flow described below, so there is no key to paste.

Claude Code

Run it from the project folder
claude mcp add --transport http tablezio https://api.tablezio.com/mcp \
  --header "Authorization: Bearer tbz_test_..."

Cursor

.cursor/mcp.json (or ~/.cursor/mcp.json for every project)
{
  "mcpServers": {
    "tablezio": {
      "url": "https://api.tablezio.com/mcp",
      "headers": { "Authorization": "Bearer tbz_test_..." }
    }
  }
}

ChatGPT and other remote clients

ChatGPT adds Tablezio as a remote MCP connector: either with the URL alone (OAuth, below) or pointing at the endpoint with the key in the Authorization header. Any client that supports remote MCP takes the same shape.

Remote MCP over HTTP
{
  "mcpServers": {
    "tablezio": {
      "type": "http",
      "url": "https://api.tablezio.com/mcp",
      "headers": { "Authorization": "Bearer tbz_live_..." }
    }
  }
}

Remote connector (OAuth 2.1)

Claude.ai and ChatGPT’s "Add connector" screen only asks for a URL — no key, no header to type. Pasting https://api.tablezio.com/mcp there runs the whole OAuth 2.1 dance for you: discovery, dynamic client registration and a consent screen in the Tablezio dashboard, instead of copying a key into a config file.

  1. In the client, add a remote connector with the URL https://api.tablezio.com/mcp. Nothing else to fill in.
  2. It reads /.well-known/oauth-protected-resource (RFC 9728) and /.well-known/oauth-authorization-server (RFC 8414), then registers itself with POST /oauth/register (RFC 7591) — a public client, no secret.
  3. It opens /oauth/authorize with PKCE (S256). You sign in to the Tablezio dashboard and land on a consent screen that names the connector and lists the scopes it is asking for in plain language.
  4. Granting access returns a one-time code, which the connector exchanges at POST /oauth/token for an access token (tbz_oat_…) and a refresh token.
  5. From then on every call carries that token with the same scopes, plan and cost limits as an API key — nothing in the tools or the rest of this page changes.
  6. Revoke it anytime from Settings › API keys and agents › Connected apps, or disconnect it inside Claude.ai/ChatGPT — both call POST /oauth/revoke (RFC 7009).

The static Authorization: Bearer header above still works — OAuth is only for clients whose connector flow supports it.

Tools

Every tool declares the scope it needs, the module it belongs to and the weighted cost units a call is charged. A tool whose scope or module the key does not have is never registered, so an agent cannot call it by mistake.

ToolBerechtigungModuleCostWhat it does
get_account — — 0Restaurant, plan, the key’s scopes, whether it is a test key, and the remaining allowance. Call it first.
get_service_snapshotanalytics:readanalytics5How service is going right now: today’s sales, average ticket, occupied tables, open orders.
get_sales_reportanalytics:readanalytics5Sales for a period (92 days max): revenue, orders, average ticket, peak hours, best and worst sellers.
list_reservationsreservations:readreservations1Reservations for a day or range, filterable by status: time, party size, name, state.
check_availabilityreservations:readreservations1Free slots for a date and party size. Call it before creating or moving a reservation.
create_reservationreservations:writereservations10Creates a reservation (date, time, party, name, phone or email, notes) and can notify the guest.
update_reservationreservations:writereservations5Changes time, party size, table or notes, or the status (confirmed, seated, completed, no_show).
cancel_reservationreservations:writereservations5Cancels a reservation and notifies the guest. Irreversible, so it requires confirm: true.
search_menumenu:readmenu1Finds menu items by text or category: price, availability (86’d or not), allergens, category.
set_item_availabilitymenu:writemenu2Marks an item as sold out (86) or puts it back on the menu.
update_item_pricemenu:writemenu2Changes an item’s price. Rejects moves of more than 50% unless confirm: true.
list_ordersorders:readcore1Orders by status, type or table: table, total, summarised lines, state. Defaults to open orders (not completed or cancelled); pass an exact status or "all".
get_low_stockinventory:readinventory2Inventory items below their minimum, with stock, unit and minimum.
record_stock_movementinventory:writeinventory2Records a receipt, issue, waste or adjustment against an inventory item.

Scopes and presets

Keys carry granular resource:action scopes. Instead of ticking them one by one you can mint a key from a preset.

PresetGrantsUse it for
readanalytics:read, customers:read, events:read, inventory:read, loyalty:read, menu:read, orders:read, reports:read, reservations:read, webhooks:readDashboards, reporting agents, anything that must not change data.
writeevery :read scope + reservations:write, menu:write, inventory:write, orders:write, customers:writeThe day-to-day agent: book, move, 86 an item, record stock.
fullevery scope in the whitelist (adds loyalty:write, reports:write, webhooks:write)Integrations that also manage webhooks, loyalty and reports.

There is no wildcard preset: * can only be granted by an operator, never over HTTP. Give each agent its own key with the narrowest preset that works — keys are revoked individually.

Test and live

  • tbz_test_… — reads are real, writes are simulated. Nothing reaches the floor and no guest is notified: this is the key you build and demo an agent with.
  • tbz_live_… — everything is real, on the restaurant’s live data.
  • Irreversible actions (cancelling a reservation, moving a price by more than 50%) additionally require an explicit confirm: true, in both environments.

Cost and limits

Limits are measured in weighted cost units, not calls: a simple read costs 1, creating a reservation costs 10 (see the Cost column above). Per-minute and concurrency limits are per key; the daily and monthly allowances are per restaurant.

PlanKey environmentsKeysUnits/minUnits/dayUnits/month
Free test only 120300—
Basic test only 120300—
Pro test + live 51205,00050,000

Plans without live access can still wire an agent up and watch it work with a test key. Enterprise limits are agreed case by case.

Errors

Three failures are specific to agents. All three say what to do next, so an agent can explain itself instead of retrying blindly.

403 LIVE_API_ACCESS_DENIED — the plan has no live keys
HTTP/1.1 403 Forbidden

{
  "message": "Your Basic plan does not include live API access — use a tbz_test_ key or upgrade to Pro at https://app.tablezio.com/billing",
  "code": "LIVE_API_ACCESS_DENIED",
  "details": {
    "planKey": "basic",
    "environment": "live",
    "upgradePlan": "pro",
    "upgradeUrl": "https://app.tablezio.com/billing"
  }
}
403 PACK_NOT_INCLUDED — the module is not contracted
HTTP/1.1 403 Forbidden

{
  "message": "Your plan does not include the Inventory module — add it from https://app.tablezio.com/billing",
  "code": "PACK_NOT_INCLUDED",
  "details": { "pack": "inventory", "upgradeUrl": "https://app.tablezio.com/billing" }
}
429 rate_limited — wait for Retry-After, then retry
HTTP/1.1 429 Too Many Requests
Retry-After: 24
X-RateLimit-Limit: 120
X-RateLimit-Remaining: 0

{
  "error": {
    "type": "rate_limit_error",
    "code": "rate_limited",
    "message": "Has superado el límite de 120 unidades por minuto…"
  }
}

A 429 always carries Retry-After in seconds: wait that long, then retry once. The full envelope, status codes and error types are on Fehler.

Reference

Every tool is a thin wrapper over the versioned REST API, so anything an agent can do you can do yourself over HTTP: