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

# Connect an AI assistant with MCP

> Connect Claude, ChatGPT, Cursor, Codex, or another MCP client to your SiteGPT account through the SiteGPT MCP server.

The SiteGPT MCP server lets an AI assistant work on your SiteGPT account. The assistant can list chatbots, read conversations and leads, add content, and change settings. It uses the Model Context Protocol (MCP).

There are two ways to run it:

| Server        | Address                   | Sign-in                                                        | Best for                                                                |
| ------------- | ------------------------- | -------------------------------------------------------------- | ----------------------------------------------------------------------- |
| Remote server | `https://sitegpt.ai/mcp`  | You approve access in the browser (OAuth). Nothing to install. | Claude, ChatGPT, Cursor, and other apps that support remote MCP servers |
| Local server  | `npx -y @sitegpt/cli mcp` | A CLI login or an API token                                    | Apps that start local (stdio) MCP servers                               |

Both servers act on your SiteGPT account. Neither can do more than your dashboard role allows. They have different tools. See [Tools](#tools).

## Before you start

* A SiteGPT account on the Growth plan or above. See [Plans and limits](/docs/reference/plans-and-limits). On a lower plan, the approval page shows "API access needs the Growth plan or above." instead of the permissions. Calls fail with `403 PLAN_UPGRADE_REQUIRED`.
* The assistant can do only what your dashboard role allows.
* For the local server: Node.js 18 or later.

## Connect the remote server

<Tabs>
  <Tab title="Claude (web and desktop)">
    <Steps>
      <Step title="Open the connector settings">
        In Claude, open **Settings** > **Connectors**.
      </Step>

      <Step title="Add SiteGPT">
        Find SiteGPT in the connectors directory and select **Connect**. Or add a custom connector with this URL:

        ```text theme={null}
        https://sitegpt.ai/mcp
        ```
      </Step>

      <Step title="Approve access">
        SiteGPT opens an approval page. Review the permissions and the chatbot access, then select **Connect**.
      </Step>
    </Steps>
  </Tab>

  <Tab title="ChatGPT">
    <Steps>
      <Step title="Open the SiteGPT plugin">
        Open the [SiteGPT plugin in ChatGPT](https://chatgpt.com/plugins/plugin_asdk_app_6a5f37c3468c81918c978e653fb84783).
      </Step>

      <Step title="Install it">
        Select **Install plugin**.
      </Step>

      <Step title="Approve access">
        SiteGPT opens an approval page. Review the permissions and the chatbot access, then select **Connect**.
      </Step>
    </Steps>

    Then ask ChatGPT, for example, "List my SiteGPT chatbots".
  </Tab>

  <Tab title="Claude Code">
    Run this command in your terminal:

    ```bash theme={null}
    claude mcp add --transport http sitegpt https://sitegpt.ai/mcp
    ```

    Claude Code opens the SiteGPT approval page in your browser. Select **Connect**.
  </Tab>

  <Tab title="Cursor">
    Add the server to `.cursor/mcp.json`:

    ```json theme={null}
    {
      "mcpServers": {
        "sitegpt": {
          "url": "https://sitegpt.ai/mcp"
        }
      }
    }
    ```

    Cursor opens the SiteGPT approval page in your browser. Select **Connect**.
  </Tab>

  <Tab title="Other apps">
    Add a remote MCP server with this URL:

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

    The app must support remote MCP servers over Streamable HTTP with OAuth. When it connects, SiteGPT asks you to approve access in the browser.
  </Tab>
</Tabs>

## Connect the local server

The local server runs on your computer through the SiteGPT CLI. It uses your CLI login or an API token.

<Steps>
  <Step title="Sign in">
    Run `sitegpt login`, or set the `SITEGPT_API_TOKEN` environment variable to an API token. See [Install and log in](/docs/cli/install-login) and [Authentication](/docs/developers/authentication).
  </Step>

  <Step title="Add the server to your app">
    <Tabs>
      <Tab title="Claude Code">
        ```bash theme={null}
        claude mcp add sitegpt -- npx -y @sitegpt/cli mcp
        ```
      </Tab>

      <Tab title="Cursor">
        ```json .cursor/mcp.json theme={null}
        {
          "mcpServers": {
            "sitegpt": {
              "command": "npx",
              "args": ["-y", "@sitegpt/cli", "mcp"]
            }
          }
        }
        ```
      </Tab>

      <Tab title="Codex">
        ```toml ~/.codex/config.toml theme={null}
        [mcp_servers.sitegpt]
        command = "npx"
        args = ["-y", "@sitegpt/cli", "mcp"]
        ```
      </Tab>

      <Tab title="Other apps">
        Use `npx` as the command and `-y @sitegpt/cli mcp` as the arguments. If the CLI is installed, you can also run `sitegpt mcp`.
      </Tab>
    </Tabs>
  </Step>
</Steps>

The npm package `@sitegpt/mcp` also starts the local server. It runs `npx -y @sitegpt/cli mcp` for you.

## Check that it works

Ask the assistant:

```text theme={null}
List my SiteGPT chatbots.
```

The assistant calls a SiteGPT tool and shows your chatbots.

## Permissions

* The assistant can never do more than your dashboard role allows.
* On the approval page, you can see the permissions and chatbot access. Permissions that your role does not allow are left out.
* The remote server also accepts an API token (`sgpt_...`) as a bearer token, for apps that cannot do OAuth.
* A connected app renews its access in the background. You do not need to approve it again each time.
* You can revoke a connection at any time. See [Manage connections](#manage-connections).

## Manage connections

Open **Agents** in the top navigation. The **MCP connections** section lists each app that you approved. Select **Revoke** to disconnect an app.

The local server uses an API token instead. Manage it in the token list on the same page.

## Tools

### Remote server tools

The remote server has 3 tools that reach all of API v2, plus tools for common jobs.

| Tool                                                                              | What it does                                                                       |
| --------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| `search`                                                                          | Finds the right API v2 operation.                                                  |
| `execute_read`                                                                    | Runs read-only API v2 calls (`GET`).                                               |
| `execute_write`                                                                   | Runs API v2 calls that create, change, or delete data.                             |
| `preview_chatbot`                                                                 | Shows a live preview of a chatbot.                                                 |
| `send_chat_message`                                                               | Sends a visitor message to a chatbot and returns the answer.                       |
| `get_onboarding_status`                                                           | Shows the setup status of an onboarding chatbot.                                   |
| `get_chatbot_appearance`, `update_chatbot_appearance`                             | Reads or changes the widget appearance.                                            |
| `list_conversations`, `get_conversation`                                          | Lists conversations and reads one conversation.                                    |
| `get_chatbot_analytics`                                                           | Reads chatbot analytics.                                                           |
| `list_leads`                                                                      | Lists leads.                                                                       |
| `list_escalations`                                                                | Lists escalated conversations that wait for your team.                             |
| `list_knowledge_sources`, `create_knowledge_source`, `authorize_knowledge_source` | Lists connected sources, connects a new source, and gets a new authorization link. |
| `upload_knowledge_file`                                                           | Uploads one file as content.                                                       |

Apps that support MCP app views can show some of these results as interactive views in the chat.

`execute_write` cannot create or change GitHub sources, because they carry an access token. Connect GitHub in the dashboard. See [Connect GitHub](/docs/guides/content/connect-github).

### Local server tools

The local server has its own tools, named `sitegpt_...`, for example `sitegpt_whoami`, `sitegpt_list_chatbots`, and `sitegpt_send_message`. They match the CLI commands. See [Command reference](/docs/cli/command-reference).

## Troubleshooting

<AccordionGroup>
  <Accordion title="The approval page does not return to the app">
    * Check that a pop-up blocker or privacy extension does not block the page.
    * Make sure you are signed in to the right SiteGPT account in the same browser.
    * Remove the server in the app and add it again.
  </Accordion>

  <Accordion title="The app shows no SiteGPT tools">
    The remote server needs sign-in before it shows any tools. Finish the approval in the browser. If the app does not open the approval page, check that it supports remote MCP servers with OAuth.
  </Accordion>

  <Accordion title="A SiteGPT call fails">
    Ask the assistant for the status code and error code. Common causes are a permission your role does not have, a chatbot the connection cannot access, or a revoked connection. See [API conventions](/docs/api-reference/v2/conventions#errors).
  </Accordion>

  <Accordion title="The CLI works but the remote server does not">
    The CLI and the remote server sign in in different ways. Remove the server in the app and connect it again.
  </Accordion>
</AccordionGroup>

## Documentation MCP server

These docs have their own MCP server at `https://sitegpt.ai/docs/mcp`. It needs no sign-in. It lets an assistant search and read the SiteGPT documentation. It cannot access your account.
