Official · by ClickHouse

ClickHouse MCP server

The ClickHouse MCP server lets an AI assistant run SQL queries and list databases on a ClickHouse cluster.

  • Runs locally
  • Apache-2.0 licence
  • ★ 889 on GitHub
  • Verified against its source 19 Oct 2026

What the ClickHouse MCP server does

An assistant can execute SQL queries on a ClickHouse cluster and list all databases on that cluster. It can also run SQL queries through chDB's embedded ClickHouse engine, which is a local option. The source quotes do not describe a remote connection method for the cluster tools.

Tools it gives your assistant

3 tools or toolsets, as its documentation lists them.

  • run_query Runs SQL queries on the ClickHouse cluster, read-only by default
  • list_databases Lists all databases on the cluster
  • run_chdb_select_query Runs SQL queries using the embedded chDB ClickHouse engine

How to install it

Run it locally

With pip

pip install 'mcp-clickhouse[chdb]'

What you need

In the ClickHouse documentation's own words:

  • “Python 3.10 through 3.14 are supported. Python 3.12 is recommended for local launches”
  • “Queries run in read-only mode by default (CLICKHOUSE_ALLOW_WRITE_ACCESS=false), but writes can be enabled explicitly if needed”

Commands and settings change between versions. Check the official instructions before you install.