HomeDatabases & Data › ClickHouse

ClickHouse

Official ClickHouse MCP server for querying and exploring ClickHouse clusters and chDB.

Official Python Cloud
★ 878 stars Last pushed 2026-09-21 License: Apache-2.0

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_HOST required — Hostname of the ClickHouse server
  • CLICKHOUSE_USER required — Username for ClickHouse authentication
  • CLICKHOUSE_PASSWORD secret — Password for ClickHouse authentication. Required unless a client certificate uses the default or mutual TLS mode
  • CLICKHOUSE_PORT — ClickHouse HTTP(S) port. Defaults to 8443 when CLICKHOUSE_SECURE=true, 8123 otherwise
  • CLICKHOUSE_SECURE — Use HTTPS to connect to ClickHouse
  • CLICKHOUSE_VERIFY — Verify SSL certificates
  • CLICKHOUSE_CA_CERT — Path to a PEM CA bundle for ClickHouse server certificate verification
  • CLICKHOUSE_CLIENT_CERT — Path to a PEM client certificate for the ClickHouse HTTPS connection
  • CLICKHOUSE_CLIENT_CERT_KEY — Path to the PEM private key for CLICKHOUSE_CLIENT_CERT
  • CLICKHOUSE_TLS_MODE — Client certificate mode: mutual, proxy, or strict
  • CLICKHOUSE_DATABASE — Default database to use
  • CLICKHOUSE_ROLE — ClickHouse role to activate for the session
  • CLICKHOUSE_ALLOW_WRITE_ACCESS — Allow write operations (DDL and DML). Queries run read-only by default
  • CLICKHOUSE_ALLOW_DROP — Allow destructive operations (DROP, TRUNCATE, DELETE, UPDATE, REPLACE, CLEAR, and DETACH PERMANENTLY) when write access is also enabled
  • CLICKHOUSE_MCP_QUERY_TIMEOUT — Query tool timeout in seconds
  • CLICKHOUSE_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_HOST required — Hostname of the ClickHouse server
  • CLICKHOUSE_USER required — Username for ClickHouse authentication
  • CLICKHOUSE_PASSWORD secret — Password for ClickHouse authentication. Required unless a client certificate uses the default or mutual TLS mode
  • CLICKHOUSE_PORT — ClickHouse HTTP(S) port. Defaults to 8443 when CLICKHOUSE_SECURE=true, 8123 otherwise
  • CLICKHOUSE_SECURE — Use HTTPS to connect to ClickHouse
  • CLICKHOUSE_VERIFY — Verify SSL certificates
  • CLICKHOUSE_CA_CERT — Path to a PEM CA bundle for ClickHouse server certificate verification
  • CLICKHOUSE_CLIENT_CERT — Path to a PEM client certificate for the ClickHouse HTTPS connection
  • CLICKHOUSE_CLIENT_CERT_KEY — Path to the PEM private key for CLICKHOUSE_CLIENT_CERT
  • CLICKHOUSE_TLS_MODE — Client certificate mode: mutual, proxy, or strict
  • CLICKHOUSE_DATABASE — Default database to use
  • CLICKHOUSE_ROLE — ClickHouse role to activate for the session
  • CLICKHOUSE_ALLOW_WRITE_ACCESS — Allow write operations (DDL and DML). Queries run read-only by default
  • CLICKHOUSE_ALLOW_DROP — Allow destructive operations (DROP, TRUNCATE, DELETE, UPDATE, REPLACE, CLEAR, and DETACH PERMANENTLY) when write access is also enabled
  • CLICKHOUSE_MCP_QUERY_TIMEOUT — Query tool timeout in seconds
  • CLICKHOUSE_MCP_MAX_WORKERS — Maximum query worker thread pool size

Related servers

Listed in punkpeye/awesome-mcp-servers (MIT)

Listed in wong2/awesome-mcp-servers (MIT)

Data from the Official MCP Registry