ClickHouse

Official registry Data and databases

Query ClickHouse databases from AI assistants, read-only by default with opt-in writes.

Install

Add this to your client's MCP configuration (Claude Desktop: claude_desktop_config.json; Cursor: .cursor/mcp.json; VS Code and others use the same "mcpServers" shape).

PYPI package clickhouse-mcp-server
Claude Code
claude mcp add clickhouse -e 'CLICKHOUSE_HOST=<CLICKHOUSE_HOST>' -e 'CLICKHOUSE_PORT=<CLICKHOUSE_PORT>' -e 'CLICKHOUSE_USER=default' -e 'CLICKHOUSE_PASSWORD=<your clickhouse_password>' -e 'CLICKHOUSE_DATABASE=<CLICKHOUSE_DATABASE>' -e 'CLICKHOUSE_SECURE=false' -e 'CLICKHOUSE_VERIFY=true' -e 'CLICKHOUSE_ALLOW_WRITE=false' -e 'CLICKHOUSE_QUERY_TIMEOUT=30' -e 'CLICKHOUSE_MAX_ROWS=1000' -- uvx clickhouse-mcp-server==0.2.0
JSON configuration (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "clickhouse": {
            "command": "uvx",
            "args": [
                "clickhouse-mcp-server==0.2.0"
            ],
            "env": {
                "CLICKHOUSE_HOST": "<CLICKHOUSE_HOST>",
                "CLICKHOUSE_PORT": "<CLICKHOUSE_PORT>",
                "CLICKHOUSE_USER": "default",
                "CLICKHOUSE_PASSWORD": "<your clickhouse_password>",
                "CLICKHOUSE_DATABASE": "<CLICKHOUSE_DATABASE>",
                "CLICKHOUSE_SECURE": "false",
                "CLICKHOUSE_VERIFY": "true",
                "CLICKHOUSE_ALLOW_WRITE": "false",
                "CLICKHOUSE_QUERY_TIMEOUT": "30",
                "CLICKHOUSE_MAX_ROWS": "1000"
            }
        }
    }
}

Environment variables

  • CLICKHOUSE_HOST required ClickHouse host name or IP address, without scheme or port.
  • CLICKHOUSE_PORT HTTP(S) port; 8123, or 8443 when CLICKHOUSE_SECURE is true.
  • CLICKHOUSE_USER User name; use a dedicated user with SELECT grants only.
  • CLICKHOUSE_PASSWORD secret Password of the ClickHouse user.
  • CLICKHOUSE_DATABASE Default database for unqualified table names.
  • CLICKHOUSE_SECURE Connect over HTTPS.
  • CLICKHOUSE_VERIFY Verify the server's TLS certificate.
  • CLICKHOUSE_ALLOW_WRITE Offer the clickhouse_execute tool, which can change data and schema.
  • CLICKHOUSE_QUERY_TIMEOUT Seconds before ClickHouse stops a statement.
  • CLICKHOUSE_MAX_ROWS Most rows clickhouse_query returns.

Frequently asked questions

What is ClickHouse?

Query ClickHouse databases from AI assistants, read-only by default with opt-in writes.

How do I install ClickHouse?

It runs on your machine. In Claude Code: claude mcp add clickhouse -e 'CLICKHOUSE_HOST=<CLICKHOUSE_HOST>' -e 'CLICKHOUSE_PORT=<CLICKHOUSE_PORT>' -e 'CLICKHOUSE_USER=default' -e 'CLICKHOUSE_PASSWORD=<your clickhouse_password>' -e 'CLICKHOUSE_DATABASE=<CLICKHOUSE_DATABASE>' -e 'CLICKHOUSE_SECURE=false' -e 'CLICKHOUSE_VERIFY=true' -e 'CLICKHOUSE_ALLOW_WRITE=false' -e 'CLICKHOUSE_QUERY_TIMEOUT=30' -e 'CLICKHOUSE_MAX_ROWS=1000' -- uvx clickhouse-mcp-server==0.2.0. For other clients, paste the JSON configuration from this page into their MCP settings.

Does ClickHouse need an API key?

Yes. It expects CLICKHOUSE_HOST, CLICKHOUSE_PASSWORD, which you set in its configuration.

Is ClickHouse open source?

Its code is public on GitHub, but the repository does not declare a standard license.

Who maintains ClickHouse?

It is published by burakdirin. AI.tn lists it but does not maintain or endorse it.

From the official MCP Registry. Listing is not an endorsement: review a server's code and permissions before giving it access to your data.