Home › Databases & Data › ClickHouse
ClickHouse
Official ClickHouse MCP server for querying and exploring ClickHouse clusters and chDB.
Topics: Databases
Connect
Review any command before running it. Package names and URLs come from the server's own registry entry.
Package (pypi 0.7.0)
uvx mcp-clickhouse
Or add to your MCP client config:
{
"mcpServers": {
"mcp-clickhouse": {
"command": "uvx",
"args": [
"mcp-clickhouse"
],
"env": {
"CLICKHOUSE_HOST": "<YOUR_VALUE>",
"CLICKHOUSE_USER": "<YOUR_VALUE>",
"CLICKHOUSE_PASSWORD": "<YOUR_VALUE>"
}
}
}
}
CLICKHOUSE_HOSTrequired — Hostname of the ClickHouse serverCLICKHOUSE_USERrequired — Username for ClickHouse authenticationCLICKHOUSE_PASSWORDsecret — Password for ClickHouse authentication. Required unless a client certificate uses the default or mutual TLS modeCLICKHOUSE_PORT— ClickHouse HTTP(S) port. Defaults to 8443 when CLICKHOUSE_SECURE=true, 8123 otherwiseCLICKHOUSE_SECURE— Use HTTPS to connect to ClickHouseCLICKHOUSE_VERIFY— Verify SSL certificatesCLICKHOUSE_CA_CERT— Path to a PEM CA bundle for ClickHouse server certificate verificationCLICKHOUSE_CLIENT_CERT— Path to a PEM client certificate for the ClickHouse HTTPS connectionCLICKHOUSE_CLIENT_CERT_KEY— Path to the PEM private key for CLICKHOUSE_CLIENT_CERTCLICKHOUSE_TLS_MODE— Client certificate mode: mutual, proxy, or strictCLICKHOUSE_DATABASE— Default database to useCLICKHOUSE_ROLE— ClickHouse role to activate for the sessionCLICKHOUSE_ALLOW_WRITE_ACCESS— Allow write operations (DDL and DML). Queries run read-only by defaultCLICKHOUSE_ALLOW_DROP— Allow destructive operations (DROP, TRUNCATE, DELETE, UPDATE, REPLACE, CLEAR, and DETACH PERMANENTLY) when write access is also enabledCLICKHOUSE_MCP_QUERY_TIMEOUT— Query tool timeout in secondsCLICKHOUSE_MCP_MAX_WORKERS— Maximum query worker thread pool size
Package (oci)
docker run -i --rm -e CLICKHOUSE_HOST=<YOUR_VALUE> -e CLICKHOUSE_USER=<YOUR_VALUE> -e CLICKHOUSE_PASSWORD=<YOUR_VALUE> ghcr.io/clickhouse/mcp-clickhouse:0.7.0
Or add to your MCP client config:
{
"mcpServers": {
"mcp-clickhouse": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"CLICKHOUSE_HOST=<YOUR_VALUE>",
"-e",
"CLICKHOUSE_USER=<YOUR_VALUE>",
"-e",
"CLICKHOUSE_PASSWORD=<YOUR_VALUE>",
"ghcr.io/clickhouse/mcp-clickhouse:0.7.0"
]
}
}
}
CLICKHOUSE_HOSTrequired — Hostname of the ClickHouse serverCLICKHOUSE_USERrequired — Username for ClickHouse authenticationCLICKHOUSE_PASSWORDsecret — Password for ClickHouse authentication. Required unless a client certificate uses the default or mutual TLS modeCLICKHOUSE_PORT— ClickHouse HTTP(S) port. Defaults to 8443 when CLICKHOUSE_SECURE=true, 8123 otherwiseCLICKHOUSE_SECURE— Use HTTPS to connect to ClickHouseCLICKHOUSE_VERIFY— Verify SSL certificatesCLICKHOUSE_CA_CERT— Path to a PEM CA bundle for ClickHouse server certificate verificationCLICKHOUSE_CLIENT_CERT— Path to a PEM client certificate for the ClickHouse HTTPS connectionCLICKHOUSE_CLIENT_CERT_KEY— Path to the PEM private key for CLICKHOUSE_CLIENT_CERTCLICKHOUSE_TLS_MODE— Client certificate mode: mutual, proxy, or strictCLICKHOUSE_DATABASE— Default database to useCLICKHOUSE_ROLE— ClickHouse role to activate for the sessionCLICKHOUSE_ALLOW_WRITE_ACCESS— Allow write operations (DDL and DML). Queries run read-only by defaultCLICKHOUSE_ALLOW_DROP— Allow destructive operations (DROP, TRUNCATE, DELETE, UPDATE, REPLACE, CLEAR, and DETACH PERMANENTLY) when write access is also enabledCLICKHOUSE_MCP_QUERY_TIMEOUT— Query tool timeout in secondsCLICKHOUSE_MCP_MAX_WORKERS— Maximum query worker thread pool size
Related servers
MCP Toolbox for Databases
MCP Toolbox for Databases enables your agent to connect to your database.
convex-backend
Convex database integration to introspect tables and functions and run one-off queries.
Nhost
Let your users work with their own data through an AI assistant, limited to what they can see.
baserow/baserow
Baserow database integration: search and list tables, and create, read, update and delete rows.
crystaldba/postgres-mcp
Postgres development and operations: performance analysis, tuning and health checks.
Supabase
MCP server for interacting with the Supabase platform
Listed in punkpeye/awesome-mcp-servers (MIT)
Listed in wong2/awesome-mcp-servers (MIT)
Data from the Official MCP Registry