Summary
Two tools, and the important one is the read-only flag.
execute_query runs whatever SQL you hand it, so the boundary is the ClickHouse user in your config plus CLICKHOUSE_READONLY, which is off by default. Switching database mid-session is a tool call rather than a restart.
What it is
A ClickHouse server with two tools: connect to a database, and execute queries against it.
What you get
- A named database connected to on demand, with a confirmation when it succeeds (connect_database)
- SQL executed and results returned as JSON (execute_query)
- Several statements in one call when separated by semicolons
- Connection settings from the environment — host, user and password, plus a default database if you want one
- A read-only mode through CLICKHOUSE_READONLY, off unless you turn it on
Requirements
A reachable ClickHouse server, and the package installed with uv pip install clickhouse-mcp-server or pip. Host defaults to localhost and user to root.
Setup effort
One command — uv pip install clickhouse-mcp-server
