ClickHouse MCP: Documentation
Updated:
Connection
uv run --with mcp-clickhouse --python 3.13 mcp-clickhouse or pip install mcp-clickhouse (stdio, no auth). Over HTTP/SSE, use CLICKHOUSE_HOST, CLICKHOUSE_USER, CLICKHOUSE_PASSWORD (bearer) or OAuth/OIDC. chDB needs no separate auth — it queries files and URLs directly.
Tools
4 tools: run_query — runs SQL against the connected ClickHouse cluster; list_databases, list_tables — database and table structure; run_chdb_select_query — SQL via the embedded chDB engine, straight against local files or URLs (CSV, Parquet, etc.) with no ETL into the cluster.
Agent flow
"How many events per source in the last 24 hours?", "analyze this CSV from a link for anomalies", "show me the tables in the analytics database", "compare March and April sales in one query".
Pricing
The MCP server is free, open source (Apache-2.0). ClickHouse itself is free self-hosted; ClickHouse Cloud is billed per the vendor's plans.