Query ClickHouse databases from AI assistants, read-only by default with opt-in writes.
Maintain this server? Claim it
This server only runs locally, from a package. Install it with the instructions on this page to try it.
Pick your client. Values in capitals, like YOUR_TOKEN, are yours to fill in.
Run in a terminal
claude mcp add clickhouse-mcp-server \ -e CLICKHOUSE_HOST=YOUR_CLICKHOUSE_HOST \ -- uvx clickhouse-mcp-server==0.2.0
Environment
CLICKHOUSE_HOST (required): ClickHouse host name or IP address, without scheme or port.CLICKHOUSE_PORT (optional, not in the config above): HTTP(S) port; 8123, or 8443 when CLICKHOUSE_SECURE is true.CLICKHOUSE_USER (optional, not in the config above): User name; use a dedicated user with SELECT grants only.CLICKHOUSE_PASSWORD (optional, not in the config above): Password of the ClickHouse user.CLICKHOUSE_DATABASE (optional, not in the config above): Default database for unqualified table names.CLICKHOUSE_SECURE (optional, not in the config above): Connect over HTTPS.CLICKHOUSE_VERIFY (optional, not in the config above): Verify the server's TLS certificate.CLICKHOUSE_ALLOW_WRITE (optional, not in the config above): Offer the clickhouse_execute tool, which can change data and schema.CLICKHOUSE_QUERY_TIMEOUT (optional, not in the config above): Seconds before ClickHouse stops a statement.CLICKHOUSE_MAX_ROWS (optional, not in the config above): Most rows clickhouse_query returns.We don't run packages, so we can't list this server's tools.