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

# MCP server

> Get started with the Katla MCP server - connect Claude, ChatGPT, or your editor and manage your sites in plain language.

Katla ships a remote [MCP](https://modelcontextprotocol.io) server, so you can manage your
domains and ask questions about your cookies and consent records straight from an AI
assistant - the same things you can do with the [CLI](/cli), without the terminal.

Ask "which marketing cookies is example.com setting?" or "what's our consent acceptance
rate this month?" and the assistant answers using your real Katla data.

## Prerequisites

* A Katla account at [katla.app](https://katla.app) with at least one site
* An AI assistant that supports remote MCP servers - Claude, ChatGPT, Claude Code, Cursor,
  or VS Code

There is nothing to install and no API key to create.

## Step 1: Copy the server URL

```
https://api.katla.app/mcp
```

## Step 2: Add it to your assistant

<Tabs>
  <Tab title="Claude">
    1. Open **Settings → Connectors** in Claude (web, desktop, or mobile).
    2. Click **Add custom connector**.
    3. Name it `Katla` and paste `https://api.katla.app/mcp` as the URL.
    4. Click **Add**.
  </Tab>

  <Tab title="ChatGPT">
    1. Open **Settings → Connectors**.
    2. Click **Create** and choose a remote MCP server.
    3. Paste `https://api.katla.app/mcp` as the server URL and pick **OAuth** for
       authentication.
    4. Click **Save**.
  </Tab>

  <Tab title="Claude Code">
    Run:

    ```bash theme={null}
    claude mcp add --transport http katla https://api.katla.app/mcp
    ```
  </Tab>

  <Tab title="Cursor / VS Code">
    Add the server to your MCP configuration:

    ```json theme={null}
    {
      "mcpServers": {
        "katla": {
          "url": "https://api.katla.app/mcp"
        }
      }
    }
    ```
  </Tab>
</Tabs>

## Step 3: Sign in

Click **Connect** (in Claude Code, run `/mcp` and choose **Authenticate**). A browser window
opens where you sign in with your normal Katla account, exactly as you would on the
dashboard.

That's it - the Katla tools are now available in any new chat.

<Note>
  Everything the MCP server does runs as **you**. It can only reach the teams and sites you
  already have access to, and team roles, site permissions, and plan limits are enforced
  exactly as they are in the dashboard and CLI.
</Note>

## Step 4: Try it

Ask your assistant something it needs your Katla data to answer:

```
What sites do I have in Katla, and when was each last scanned?
```

If it lists your domains, you're connected.

## What you can ask

<CardGroup cols={2}>
  <Card title="Audit cookies" icon="cookie">
    "What cookies does example.com set, and which are marketing?"
  </Card>

  <Card title="Check consent" icon="chart-no-axes-column">
    "What's the consent acceptance rate for example.com?"
  </Card>

  <Card title="Onboard a domain" icon="globe">
    "Add shop.example.com to Katla and scan it."
  </Card>

  <Card title="Fix a classification" icon="pencil">
    "Reclassify the `_hjSession` cookie on example.com as analytics."
  </Card>

  <Card title="Write your own wording" icon="languages">
    "Describe `_ga` on example.com in German as 'Unterscheidet Besucher'."
  </Card>

  <Card title="Install the banner" icon="code">
    "How do I install the Katla widget on example.com?"
  </Card>
</CardGroup>

## Setting up a new domain, end to end

The steps below normally mean several separate visits to the dashboard. Ask for them
together and the assistant walks the sequence itself:

1. **"Add `shop.example.com` to Katla."** The domain is usable immediately - there is no
   DNS record or meta tag to publish first.
2. **"Scan it."** Starts a cookie crawl. Scans count against your plan quota.
3. **"What did it find?"** Lists the cookies and their categories.
4. **"How do I install the banner?"** Returns your script tag.

## Troubleshooting

<AccordionGroup>
  <Accordion title="The client says it cannot discover the server">
    Check that the URL is exactly `https://api.katla.app/mcp`, with no trailing slash. If you
    run your own Katla API, see [self-hosting](/mcp-reference#self-hosted-or-staging).
  </Accordion>

  <Accordion title="Sign-in succeeds but tools fail with an authentication error">
    Your Katla session expired. Disconnect and reconnect the connector to sign in again.
  </Accordion>

  <Accordion title="A tool says the connection is read-only">
    The client requested only the `katla:read` scope. Reconnect and grant `katla:write` too.
  </Accordion>

  <Accordion title="Scanning is refused with a quota error">
    You have used your plan's monthly scan allowance. Ask the assistant to check your plan,
    or review it in the [dashboard](https://katla.app).
  </Accordion>

  <Accordion title="The assistant asks which team to use">
    You belong to more than one team. Name the team in your request, or ask it to list your
    teams first.
  </Accordion>
</AccordionGroup>

## Next steps

<CardGroup cols={2}>
  <Card title="MCP reference" icon="wrench" href="/mcp-reference">
    Every tool, the permission model, and self-hosting.
  </Card>

  <Card title="CLI" icon="terminal" href="/cli">
    The same capabilities from your terminal.
  </Card>
</CardGroup>
