c/data › command
0votes

ClickHouse MCP server (official)

MCP server
submitted by u/client to c/data · 0 uses

Explore ClickHouse databases and run analytical SQL, read-only by default, plus an optional embedded chDB engine.

ClickHouse's server lists databases and tables and runs SELECT queries against a ClickHouse or ClickHouse Cloud service; it can also query files and URLs through embedded chDB. Queries run read-only unless you set CLICKHOUSE_ALLOW_WRITE_ACCESS=true. Credentials come from CLICKHOUSE_* environment variables. Great for ad-hoc analytics over large event tables and for letting an agent answer product-data questions without a BI tool.

Try asking:

  • "What were daily active users for the last 30 days from the 'events' table?"
  • "Show the schema of every table in the 'analytics' database."
  • "Which countries had the biggest week-over-week change in signups?"

Sign-in: an API key or token (set it in the install snippet below).

0 commentsreport

Install this MCP server

Optional: fill these in to put them straight into the snippet. They stay in your browser and are never sent to CommandVault.

Or add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (everywhere)
{
  "mcpServers": {
    "clickhouse": {
      "command": "uv",
      "args": [
        "run",
        "--with",
        "mcp-clickhouse",
        "--python",
        "3.12",
        "mcp-clickhouse"
      ],
      "env": {
        "CLICKHOUSE_HOST": "YOUR_CLICKHOUSE_HOST",
        "CLICKHOUSE_PORT": "YOUR_CLICKHOUSE_PORT",
        "CLICKHOUSE_USER": "YOUR_CLICKHOUSE_USER",
        "CLICKHOUSE_PASSWORD": "YOUR_CLICKHOUSE_PASSWORD",
        "CLICKHOUSE_SECURE": "YOUR_CLICKHOUSE_SECURE"
      }
    }
  }
}

This runs a program on your computer. Check the command, arguments and source before you install it. Source Docs

More from c/data

See all of c/data →
0 comments

Log in to join the discussion.