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_PORT": "<YOUR_VALUE>",
"CLICKHOUSE_SECURE": "<YOUR_VALUE>",
"CLICKHOUSE_VERIFY": "<YOUR_VALUE>",
"CLICKHOUSE_CA_CERT": "<YOUR_VALUE>",
"CLICKHOUSE_CLIENT_CERT": "<YOUR_VALUE>",
"CLICKHOUSE_CLIENT_CERT_KEY": "<YOUR_VALUE>",
"CLICKHOUSE_TLS_MODE": "<YOUR_VALUE>",
"CLICKHOUSE_DATABASE": "<YOUR_VALUE>",
"CLICKHOUSE_ROLE": "<YOUR_VALUE>",
"CLICKHOUSE_ALLOW_WRITE_ACCESS": "<YOUR_VALUE>",
"CLICKHOUSE_ALLOW_DROP": "<YOUR_VALUE>",
"CLICKHOUSE_MCP_QUERY_TIMEOUT": "<YOUR_VALUE>",
"CLICKHOUSE_MCP_MAX_WORKERS": "<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 ghcr.io/clickhouse/mcp-clickhouse:0.7.0
Or add to your MCP client config:
{
"mcpServers": {
"mcp-clickhouse": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/clickhouse/mcp-clickhouse:0.7.0"
],
"env": {
"CLICKHOUSE_HOST": "<YOUR_VALUE>",
"CLICKHOUSE_USER": "<YOUR_VALUE>",
"CLICKHOUSE_PASSWORD": "<YOUR_VALUE>",
"CLICKHOUSE_PORT": "<YOUR_VALUE>",
"CLICKHOUSE_SECURE": "<YOUR_VALUE>",
"CLICKHOUSE_VERIFY": "<YOUR_VALUE>",
"CLICKHOUSE_CA_CERT": "<YOUR_VALUE>",
"CLICKHOUSE_CLIENT_CERT": "<YOUR_VALUE>",
"CLICKHOUSE_CLIENT_CERT_KEY": "<YOUR_VALUE>",
"CLICKHOUSE_TLS_MODE": "<YOUR_VALUE>",
"CLICKHOUSE_DATABASE": "<YOUR_VALUE>",
"CLICKHOUSE_ROLE": "<YOUR_VALUE>",
"CLICKHOUSE_ALLOW_WRITE_ACCESS": "<YOUR_VALUE>",
"CLICKHOUSE_ALLOW_DROP": "<YOUR_VALUE>",
"CLICKHOUSE_MCP_QUERY_TIMEOUT": "<YOUR_VALUE>",
"CLICKHOUSE_MCP_MAX_WORKERS": "<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
Related servers
MCP Toolbox for Databases
MCP Toolbox for Databases enables your agent to connect to your database.
baserow
Baserow database integration with table search, list, and row create, read, update, and delete capabilities.
postgres-mcp
All-in-one MCP server for Postgres development and operations, with tools for performance analysis, tuning, and health checks
Supabase
MCP server for interacting with the Supabase platform
mcp-server-mysql
MySQL database integration in NodeJS with configurable access controls and schema inspection
mcp-server-qdrant
A Qdrant MCP server
Listed in punkpeye/awesome-mcp-servers (MIT)
Listed in wong2/awesome-mcp-servers (MIT)
Data from the Official MCP Registry