Run high-performance analytical queries, manage tables, and analyze large datasets in ClickHouse directly from Claude Code.
ClickHouse is an open-source column-oriented OLAP database optimized for real-time analytics on massive datasets. The ClickHouse MCP connects Claude Code to your ClickHouse instance, enabling it to write and execute analytical queries, inspect table schemas, manage materialized views, and help you build efficient data pipelines — orders of magnitude faster than a traditional row-store database.
mcpizy install clickhouse
Provide your ClickHouse connection details (host, port, database, username, password) during setup. ClickHouse Cloud connections with TLS are fully supported.
Compute daily active users over the last 30 days:
SELECT
toDate(event_time) AS date,
uniqExact(user_id) AS dau
FROM events
WHERE event_time >= now() - INTERVAL 30 DAY
GROUP BY date
ORDER BY date;
Claude writes and runs this query, then suggests adding a materialized view to pre-compute it for dashboards.
uniqExact() for approximate distinct counts on very large datasets — much faster with minimal error.