> ## 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 and reply to conversations, read 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.md). 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

**Claude (web and desktop)**

**1. Open the connector settings**

In Claude, open **Settings** > **Connectors**.

**2. 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
```

**3. Approve access**

SiteGPT opens an approval page. Review the permissions and the chatbot access, then select **Connect**.

**ChatGPT**

**1. Open the SiteGPT plugin**

Open the [SiteGPT plugin in ChatGPT](https://chatgpt.com/plugins/plugin_asdk_app_6a5f37c3468c81918c978e653fb84783).

**2. Install it**

Select **Install plugin**.

**3. Approve access**

SiteGPT opens an approval page. Review the permissions and the chatbot access, then select **Connect**.

Then ask ChatGPT, for example, "List my SiteGPT chatbots".

**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**.

**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**.

**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.

## Connect with read-only access

On the approval page, you can limit the app to read-only access. The assistant can then look at your data, but it cannot create, change, or delete anything.

**1. Open the approval page**

Connect the app as shown in [Connect the remote server](#connect-the-remote-server). SiteGPT opens the approval page.

**2. Select Read only**

Under **Access**, select **Read only**. The page shows "Only the read permissions from the request will be granted. Nothing can be created, changed, or deleted." The permission list and **Advanced permissions** show only the read permissions.

**3. Approve access**

Select **Connect**.

**Everything requested** is selected by default. It gives the app every permission that it asked for and that your role allows. The **Access** choice shows only when the app asks for read permissions and other permissions. If the app asks only for read permissions, the connection is already read-only.

A read-only connection:

* Can list chatbots and read conversations, leads, escalations, analytics, knowledge sources, settings, and appearance. `execute_read`, `open_sitegpt`, and `open_sitegpt_inbox` work.
* Cannot create, change, or delete data. For example, `execute_write`, `reply_to_conversation`, `send_chat_message`, `update_chatbot_appearance`, `update_sitegpt_settings`, `create_knowledge_source`, `authorize_knowledge_source`, and `upload_knowledge_file` fail, and so do the reply form and the **Connect** and **Upload and train** forms of the **Knowledge** tab in the views. These calls return `403 TOKEN_SCOPE_NOT_ALLOWED`. `error.details.requiredScopes` lists the permission that the call needs.

The app still lists every SiteGPT tool. Only the calls that need a write permission fail.

To change an existing connection to read-only, revoke it first (see [Manage connections](#manage-connections)), then connect the app again and select **Read only**. Connecting again does not end the app's other connections, so the old connection keeps its permissions until you revoke it.

## Connect the local server

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

**1. 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.md) and [Authentication](/docs/developers/authentication.md).

**2. Add the server to your app**

**Claude Code**

```bash theme={null}
claude mcp add sitegpt -- npx -y @sitegpt/cli mcp
```

**Cursor**

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

**Codex**

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

**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`.

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. You can also limit the app to read-only access. See [Connect with read-only access](#connect-with-read-only-access).
* In the list that starts with "This will allow", the approval page sums up the permissions in groups: **Chatbots**, **Knowledge**, **Customization**, **Conversations and leads**, **Team and account**, **Billing management**, **API tokens**, and **Integrations**. A group shows only if the app gets a permission in it. If the app gets only read permissions in a group, the group says so, for example "View your chatbots and their details." **Advanced permissions** lists each permission.
* 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.
* When you approve an app again, its other connections stay connected. For example, ChatGPT can hold more than one connection to SiteGPT. Each connection shows on the **Agents** page.
* You can revoke a connection at any time. See [Manage connections](#manage-connections).

## HIPAA workspaces

For a chatbot in a HIPAA workspace, the MCP servers do not return conversations, leads, or escalations. This applies to the remote server (ChatGPT, Claude, and every other app that connects to `https://sitegpt.ai/mcp`) and to the local server (`sitegpt mcp`). See [HIPAA](/docs/account/hipaa.md).

The local server needs SiteGPT CLI 0.6.0 or later for this block. To update, see [Upgrade the CLI](/docs/cli/install-login.md#upgrade-the-cli). With an older CLI, the local server is blocked only if you signed in with `sitegpt login`. It is not blocked if it uses an API token that you made in the dashboard.

On the remote server:

* `list_conversations`, `get_conversation`, `reply_to_conversation`, `list_escalations`, and `list_leads` return `403 HIPAA_AI_ASSISTANTS_DISABLED`. So do `execute_read` and `execute_write` calls to the conversation and lead endpoints.
* `send_chat_message` can start a new conversation, but it cannot continue one.
* In the `open_sitegpt` home view, the **Inbox**, **Escalations**, and **Leads** tabs show the refusal message. **Analytics** and **Knowledge** work.
* If SiteGPT cannot check the HIPAA status, these calls return `503 HIPAA_CHECK_UNAVAILABLE`. Try again in a moment.
* This block does not affect the other tools, for example settings, analytics, appearance, and preview. Other HIPAA limits still apply, for example the limits on cloud file connectors. See [Content](/docs/account/hipaa.md#content).

On the local server, the conversation and lead tools return the same `403 HIPAA_AI_ASSISTANTS_DISABLED` and `503 HIPAA_CHECK_UNAVAILABLE` errors. `sitegpt_send_message` can start a new conversation, but it cannot continue one. The other tools work.

Open conversations and leads in the SiteGPT dashboard.

## Manage connections

Open **Agents** in the top navigation. The **MCP connections** section lists each connection that you approved, with its permissions. An app that you approved more than once can have more than one connection. Select **Revoke** to end a connection.

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 (`search`, `execute_read`, and `execute_write`), plus tools for common jobs: conversations and replies, leads, escalations, analytics, content, widget appearance, settings, and a chatbot preview.

For each tool's access type, scopes, personal data, side effects, inputs, outputs, errors, and limits, see [MCP tool reference](/docs/developers/mcp-tools.md).

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

The views use the light or dark theme of the app. In the **Inbox** and **Escalations** views, an open conversation has a reply form. Select **Send** to send your reply to the visitor. If the AI still answers the conversation, the form tells you that sending stops the chatbot in this conversation. In apps that let a view send a message to the chat, **Ask for a draft** asks the assistant to write a draft. Nothing reaches the visitor until you send it. A resolved conversation has no reply form. An open conversation has an **Open in SiteGPT** button that opens it in the dashboard.

### 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.md).

## Troubleshooting

> **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.

> **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.

> **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.md#errors).
>
> `403 TOKEN_SCOPE_NOT_ALLOWED` means that the connection does not have the permission that the call needs, for example a write call on a read-only connection. To allow it, revoke the connection and connect again with **Everything requested**. See [Connect with read-only access](#connect-with-read-only-access).
>
> `403 HIPAA_AI_ASSISTANTS_DISABLED` means that the chatbot is in a HIPAA workspace. Its conversations and leads are not available through the remote server or the local server (`sitegpt mcp`). See [HIPAA workspaces](#hipaa-workspaces).

> **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.

## 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.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.