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

# Model Context Protocol (MCP)

> Connect an AI assistant to Chataigne's safe, tenant-aware restaurant operations surface.

Chataigne exposes a remote [Model Context Protocol](https://modelcontextprotocol.io/) server for AI assistants such as Claude and Codex. It is a business-oriented facade: tools represent restaurant intentions instead of mirroring every REST endpoint.

<CardGroup cols={2}>
  <Card title="Streamable HTTP" icon="arrows-rotate">
    Stateless MCP requests use `POST /mcp` and structured JSON results.
  </Card>

  <Card title="Delegated OAuth" icon="shield-check">
    OAuth 2.1, PKCE, live consent and role checks protect every call.
  </Card>

  <Card title="24 focused restaurant tools" icon="wrench">
    18 read tools and 6 bounded actions cover restaurant operations.
  </Card>

  <Card title="6 navigable resources" icon="link">
    Models can move from search results to organization, location, catalog, order, customer and
    conversation details.
  </Card>
</CardGroup>

## Connect

Use the MCP URL supplied for your environment. The canonical production URL is:

```text theme={null}
https://mcp.chataigne.ai/mcp
```

A compatible client discovers OAuth metadata automatically at:

```text theme={null}
/.well-known/oauth-protected-resource/mcp
/.well-known/oauth-authorization-server/api/auth
```

The connection flow uses OAuth Dynamic Client Registration, Authorization Code with PKCE, and refresh-token rotation. The MCP endpoint accepts Bearer access tokens only; browser cookies and API keys cannot be combined with it.

<Steps>
  <Step title="Add the remote MCP server">Add the canonical `/mcp` URL in your AI client.</Step>

  <Step title="Sign in to Chataigne">
    Complete the OAuth consent screen and grant only the scopes required for the intended workflow.
  </Step>

  <Step title="Inspect the connection">
    Call `chataigne_context_get` to confirm the delegated user, client, scopes, and enabled toolset.
  </Step>

  <Step title="Discover workspaces">
    Call `chataigne_workspaces_list` before using restaurant-specific tools.
  </Step>
</Steps>

## Typical workflow

```text theme={null}
chataigne_context_get
  → chataigne_workspaces_list
  → chataigne_catalog_search
  → chataigne_orders_list
  → chataigne_order_get
```

List and search tools are cursor-paginated and return compact data. Detail tools expose only immediate relationships. Tool responses contain a short text summary and a validated `structuredContent` envelope:

```json theme={null}
{
  "data": { "orders": [] },
  "meta": {
    "request_id": "request-id",
    "next_cursor": "opaque-cursor"
  }
}
```

## Safety boundary

The restaurant V1 surface intentionally excludes payments, refunds, order cancellation/rejection, destructive deletes, campaigns, credentials, full onboarding, provider synchronization, exports and platform administration. Privileged MCP capabilities are documented separately in the gated Admin section.

<Note>
  Global Chataigne administrators can operate across every organization and location, but they still
  need the corresponding scopes in the OAuth consent. An administrator role never overrides missing
  OAuth consent.
</Note>

<CardGroup cols={3}>
  <Card title="Authentication and permissions" icon="key" href="/mcp/authentication" />

  <Card title="Tools and resources" icon="toolbox" href="/mcp/tools" />

  <Card title="Safety and errors" icon="triangle-exclamation" href="/mcp/safety-errors" />
</CardGroup>
