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

# Set up the ClickHouse documentation MCP server

> Connect AI tools to the ClickHouse documentation through the Model Context Protocol.

<Info>
  This page configures the MCP server for searching the ClickHouse documentation. To query ClickHouse data instead, use the [open-source ClickHouse MCP server](/docs/guides/use-cases/ai-ml/MCP) or the [ClickHouse Cloud remote MCP server](/docs/products/cloud/features/ai-ml/remote-mcp).
</Info>

Query the ClickHouse documentation directly from your AI tools using the Model Context Protocol (MCP).

<h2 id="connect-your-ai-tool">
  Connect your AI tool
</h2>

<Tabs>
  <Tab title="Claude Code" icon="https://clickhouse-docs-assets.s3.us-east-1.amazonaws.com/logo-claudecode-color.svg">
    Run in your terminal:

    ```bash theme={null}
    claude mcp add --transport http clickhouse-docs https://clickhouse.com/docs/mcp --scope user
    ```
  </Tab>

  <Tab title="Claude Desktop" icon="https://clickhouse-docs-assets.s3.us-east-1.amazonaws.com/logo-claude.svg">
    Add to `claude_desktop_config.json`:

    ```json theme={null}
    {
      "mcpServers": {
        "clickhouse-docs": {
          "command": "npx",
          "args": ["-y", "mcp-remote", "https://clickhouse.com/docs/mcp"]
        }
      }
    }
    ```
  </Tab>

  <Tab title="Codex" icon="https://mintcdn.com/private-7c7dfe99/XJAlwu-tcr9cBsLZ/images/logo-codex.svg?fit=max&auto=format&n=XJAlwu-tcr9cBsLZ&q=85&s=7f52668daa9560ccb0c6439fe7bbd264" width="24" height="24" data-path="images/logo-codex.svg">
    Run in your terminal:

    ```bash theme={null}
    codex mcp add clickhouse-docs --url https://clickhouse.com/docs/mcp
    ```
  </Tab>

  <Tab title="Cursor" icon="https://clickhouse-docs-assets.s3.us-east-1.amazonaws.com/logo-cursor.png">
    Add to `.cursor/mcp.json`:

    ```json theme={null}
    {
      "mcpServers": {
        "clickhouse-docs": {
          "command": "npx",
          "args": ["-y", "mcp-remote", "https://clickhouse.com/docs/mcp"]
        }
      }
    }
    ```
  </Tab>

  <Tab title="Windsurf" icon="https://clickhouse-docs-assets.s3.us-east-1.amazonaws.com/logo-windsurf.svg">
    Add to `~/.codeium/windsurf/mcp_config.json`:

    ```json theme={null}
    {
      "mcpServers": {
        "clickhouse-docs": {
          "command": "npx",
          "args": ["-y", "mcp-remote", "https://clickhouse.com/docs/mcp"]
        }
      }
    }
    ```
  </Tab>
</Tabs>

<h2 id="add-clickhouse-skills">
  Add ClickHouse skills to your coding agent
</h2>

Install the ClickHouse skills to give your agent expert ClickHouse knowledge and best practices:

```bash theme={null}
npx skills add https://clickhouse.com
```
