clickhouse-mcp
Provides tools for interacting with ClickHouse databases, including listing databases, listing tables, and executing SQL queries (read-only or read-write depending on access mode).
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@clickhouse-mcplist databases"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ClickHouse MCP (stackblaze fork)
Fork of ClickHouse/mcp-clickhouse for the kubero chat feature MCP broker. See FORK.md for divergence notes.
One long-lived Deployment per workload cluster serves every ClickHouseInstallation
add-on — the connection target arrives per request via HTTP headers, not at boot.
Tools (namespaced ch__* in chat)
Tool | Mode | Description |
| read | List all databases |
| read | List tables in a database (paginated) |
| read/write | Execute SQL ( |
chDB tools (run_chdb_select_query) are disabled in the kubero Deployment (CHDB_ENABLED=false).
Related MCP server: clickhouse-mcp-server
Kubero headers
X-Kubero-DB-URI: clickhouse://user:pass@clickhouse-<instance>.<ns>.svc.cluster.local:9000[/db]
X-Kubero-Access-Mode: restricted | unrestrictedPort 9000 in the URI is the CHI native port; the MCP connects over HTTP on 8123 on the same Service.
Run locally (stdio, single cluster)
export CLICKHOUSE_HOST=localhost
export CLICKHOUSE_USER=default
export CLICKHOUSE_PASSWORD=
export CLICKHOUSE_SECURE=false
export CLICKHOUSE_PORT=8123
uv run mcp-clickhouseRun like kubero (HTTP, connection-from-request)
uv run mcp-clickhouse \
--transport streamable-http \
--connection-from-request \
--streamable-http-host 0.0.0.0 \
--streamable-http-port 3010Container
docker build -t ghcr.io/stackblaze/clickhouse-mcp:local .
docker run --rm -p 3010:3010 ghcr.io/stackblaze/clickhouse-mcp:local \
--transport streamable-http \
--connection-from-request \
--streamable-http-host 0.0.0.0 \
--streamable-http-port 3010Image: ghcr.io/stackblaze/clickhouse-mcp:<tag>
Upstream docs
For full upstream configuration (auth providers, chDB, middleware hooks), see the original README.
This server cannot be deployed
Maintenance
Related MCP Connectors
Multi-tenant database orchestration: isolated Postgres, MySQL, MongoDB, Redis tenants on demand.
Browse, query, and administer your managed WaveHouse + ClickHouse projects (schema, pipes, policy).
Safe, read-only Postgres and MySQL access for AI agents. Audit log + column-level controls.
Query 40 databases from Claude, ChatGPT, or Cursor — on any device. Read-only, encrypted, audited.
Related MCP Servers
AlicenseAqualityAmaintenanceClickHouse database integration with schema inspection and query capabilities3871Apache 2.0- AlicenseNot gradedqualityCmaintenanceEnables interaction with ClickHouse databases via MCP, providing tools to list databases and tables and execute safe SELECT, SHOW, and DESCRIBE queries.30 npmMIT
- AlicenseAqualityDmaintenanceEnables AI assistants to query and manage ClickHouse databases, supporting SELECT queries, DDL/DML statements, and metadata listing.55 npmMIT
- AlicenseAqualityCmaintenanceEnables querying ClickHouse databases using natural language with AI models, supporting multiple providers and access restrictions via per-call allow-lists.32MIT