MCP server

ClickHouse

Query ClickHouse clusters and chDB from AI assistants

Official ClickHouse MCP server for running SQL queries and listing databases and tables on a ClickHouse cluster, read-only by default. Optionally exposes chDB for querying local files and URLs with the embedded ClickHouse engine.

Also available as

Connect

  1. 1Add the server to Codex
    codex mcp add clickhouse --env CLICKHOUSE_HOST=YOUR_CLICKHOUSE_HOST --env CLICKHOUSE_PORT=YOUR_CLICKHOUSE_PORT --env CLICKHOUSE_USER=YOUR_CLICKHOUSE_USER --env CLICKHOUSE_PASSWORD=YOUR_CLICKHOUSE_PASSWORD --env CLICKHOUSE_SECURE=YOUR_CLICKHOUSE_SECURE -- uv run --with mcp-clickhouse --python 3.12 mcp-clickhouse

Configs are generated from the publisher's documented endpoint. Check their docs for plan requirements and scopes. New to this? Read the step-by-step tutorial.

Tools 4

run_querylist_databaseslist_tablesrun_chdb_select_query

Things to ask

  • “List the databases on my ClickHouse cluster”
  • “What are the top 10 events by count yesterday?”
  • “Describe the tables in the analytics database”

Related