> ## 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 SiteGPT with MCP

> Connect AI assistants such as Claude to SiteGPT through the SiteGPT MCP server with browser-based OAuth approval.

SiteGPT provides an MCP server for supported AI assistants. The assistant connects to SiteGPT, asks you to approve access in the browser, and then uses SiteGPT tools on your behalf.

Use the MCP server when your AI assistant supports remote MCP servers and OAuth. Use the CLI when the assistant runs on your machine and can execute terminal commands.

## Endpoint

Use this MCP server URL:

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

When a client connects without credentials, SiteGPT advertises OAuth metadata so the client can open the approval flow automatically.

## Connect Claude

<Steps>
  <Step title="Open Claude's integrations or connectors settings">
    Open the place where Claude lets you add a custom MCP server.
  </Step>

  <Step title="Add the SiteGPT MCP server URL">
    Enter:

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

  <Step title="Start the connection">
    Claude should open SiteGPT's OAuth approval page in your browser.
  </Step>

  <Step title="Approve SiteGPT access">
    Review the app name, permissions, and chatbot access. Click **Connect** only if the request looks correct.
  </Step>

  <Step title="Return to Claude">
    After approval, Claude completes the connection and shows the SiteGPT MCP tools.
  </Step>
</Steps>

## What Claude can do

The MCP server exposes a compact tool surface:

| Tool      | Purpose                                                                         |
| --------- | ------------------------------------------------------------------------------- |
| `search`  | Find relevant SiteGPT API operations from the v2 API catalog.                   |
| `execute` | Call selected SiteGPT v2 API operations with your approved SiteGPT permissions. |

This means the assistant can search for the right operation, inspect the expected parameters, and execute the API call. SiteGPT still enforces your dashboard role, token scopes, and chatbot restrictions.

## Approval and permissions

The approval page creates an OAuth grant for the AI client. It does not ask you to paste an API token into Claude.

During approval, SiteGPT shows:

| Approval item  | Meaning                                                                         |
| -------------- | ------------------------------------------------------------------------------- |
| App            | The MCP client requesting access, such as Claude.                               |
| Permissions    | The SiteGPT areas the client can access.                                        |
| Chatbot access | Whether the client can access all available chatbots or only selected chatbots. |

<Note>
  SiteGPT's authorization is role-aware. The AI client cannot receive permissions or chatbot access that your dashboard user is not allowed to use.
</Note>

## MCP Server vs CLI

| Use case                                                       | Recommended option |
| -------------------------------------------------------------- | ------------------ |
| Claude or another cloud AI assistant supports remote MCP OAuth | MCP Server         |
| A local agent can run terminal commands                        | SiteGPT CLI        |
| You want a saved local profile with least-privilege scopes     | SiteGPT CLI        |
| You want browser-based connection without installing anything  | MCP Server         |

You can use both. For example, connect Claude through the MCP server for interactive work, and keep a local `sitegpt` CLI profile for scripts or local agents.

## Test the connection

After connecting, ask the AI assistant:

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

Then try a more specific request:

```text theme={null}
Show the dashboard summary for my chatbot named "Support Bot".
```

The assistant should use the SiteGPT MCP tools to search for the right API operation and execute it.

## Troubleshooting

### The approval page opens but does not return to the AI app

Wait a few seconds first. Some MCP clients take a moment to finish the OAuth callback.

If it stays stuck:

* Make sure third-party cookies, popup blockers, or browser privacy extensions are not blocking the OAuth callback.
* Cancel the connection in the AI app and try adding `https://sitegpt.ai/mcp` again.
* Confirm you are signed in to the correct SiteGPT account in the same browser.

### The AI app shows only a small number of tools

This is expected. The SiteGPT MCP server currently exposes a compact `search` and `execute` tool pair. The assistant uses `search` to find API operations and `execute` to call them.

### The AI app says a SiteGPT API call failed

Ask the assistant to show the exact endpoint, status code, and error message. Common causes are missing permissions, chatbot restrictions, or an expired/revoked grant.

You can also verify your SiteGPT account from the CLI:

```bash theme={null}
sitegpt whoami
sitegpt chatbots list
```

### The CLI works but MCP does not

The CLI and MCP server use different authentication flows:

* CLI: OAuth device login or saved SiteGPT API token.
* MCP Server: OAuth Authorization Code + PKCE through the MCP client.

If CLI works, your SiteGPT account and API are healthy. Reconnect the MCP server in the AI app so it can create a fresh OAuth grant.

## Related docs

* [Use SiteGPT CLI with AI agents](/cli/use-with-ai-agents)
* [Authentication and scopes](/cli/authentication)
* [API v2 authentication](/api-reference/v2/authentication)
