Skip to main content
Watch: I Built an AI App Without Leaving Databricks

Databases - official ClickHouse server

ClickHouse MCP server

Open-source MCP server from ClickHouse that lets AI assistants list databases and tables and run SQL against any ClickHouse instance, self-hosted or Cloud. It also has an optional chDB embedded engine. It runs locally over stdio by default, and can also serve Streamable HTTP. It runs locally from mcp-clickhouse (pypi); the notes below cover how it authenticates.

Last verified 4 tools7 sources

Install

Terminal
claude mcp add \
  --transport stdio \
  --env CLICKHOUSE_HOST=your-clickhouse-host \
  --env CLICKHOUSE_USER=your-clickhouse-user \
  --env CLICKHOUSE_PASSWORD=your-clickhouse-password \
  --scope user \
  mcp-clickhouse -- \
  uv run --with mcp-clickhouse --python 3.10 mcp-clickhouse
Terminal
codex mcp add mcp-clickhouse \
  --env CLICKHOUSE_HOST=your-clickhouse-host \
  --env CLICKHOUSE_USER=your-clickhouse-user \
  --env CLICKHOUSE_PASSWORD=your-clickhouse-password \
  -- uv run --with mcp-clickhouse --python 3.10 mcp-clickhouse
JSON
{
  "mcpServers": {
    "mcp-clickhouse": {
      "command": "uv",
      "args": [
        "run",
        "--with",
        "mcp-clickhouse",
        "--python",
        "3.10",
        "mcp-clickhouse"
      ],
      "env": {
        "CLICKHOUSE_HOST": "your-clickhouse-host",
        "CLICKHOUSE_USER": "your-clickhouse-user",
        "CLICKHOUSE_PASSWORD": "your-clickhouse-password"
      }
    }
  }
}

Generic

JSON
{
  "mcpServers": {
    "mcp-clickhouse": {
      "command": "uv",
      "args": [
        "run",
        "--with",
        "mcp-clickhouse",
        "--python",
        "3.10",
        "mcp-clickhouse"
      ],
      "env": {
        "CLICKHOUSE_HOST": "your-clickhouse-host",
        "CLICKHOUSE_USER": "your-clickhouse-user",
        "CLICKHOUSE_PASSWORD": "your-clickhouse-password"
      }
    }
  }
}

Tools

run_query
Execute SQL on the ClickHouse cluster; read-only by default, with optional named query parameters.
list_databases
List all databases on the ClickHouse cluster.
list_tables
List tables in a database with pagination, LIKE filters and optional column metadata.
run_chdb_select_query
Execute SQL using chDB's embedded ClickHouse engine (requires the optional chdb extra).

As documented on October 17, 2026. A running server reports its current list through tools/list.

Notes and caveats

  • Latest release v0.7.0 (2026-09-21).
  • Version numbers are pre-1.0, and the docs give no ga/beta label.
  • Connects with ClickHouse credentials in environment variables.
  • HTTP/SSE transports require auth by default: a static bearer token (CLICKHOUSE_MCP_AUTH_TOKEN), OAuth/OIDC via FastMCP, or auth explicitly disabled for local development.
  • The standalone SSE transport is deprecated in favor of Streamable HTTP.
  • Writes are off by default (CLICKHOUSE_ALLOW_WRITE_ACCESS=false).
  • The generic snippet is the Claude Desktop config from the docs.
  • ClickHouse's Cloud docs list the open-source tools as run_select_query, list_databases and list_tables, but the current README names the query tool run_query.

FAQ

What does the ClickHouse MCP server do?

Open-source MCP server from ClickHouse that lets AI assistants list databases and tables and run SQL against any ClickHouse instance, self-hosted or Cloud. It also has an optional chDB embedded engine. It runs locally over stdio by default, and can also serve Streamable HTTP. The vendor documents 4 tools, including run_query, list_databases, list_tables and run_chdb_select_query.

How do I add the ClickHouse MCP server to Claude Code?

ClickHouse documents a Claude Code config; copy it from the Claude Code section of this page. Snippets for Codex, Cursor and Generic are there too.

Does the ClickHouse MCP server need authentication?

It uses a scheme other than OAuth or an API key, such as the session of the app or instance it runs in; the notes on this page describe it. Transport: stdio, Streamable HTTP, SSE. Status: Unlabelled, last checked October 17, 2026.

Sources

Last verified against 7 ClickHouse pages, then re-checked independently.

Newsletter

New MCP servers, the week they ship

One email per week. New official MCP servers, the coding tools that support them and how developers wire them up.