
ClickHouse MCP Server
by clickhouseio.github.ClickHouse/mcp-clickhousev0.7.0
Official ClickHouse MCP server for querying and exploring ClickHouse clusters and chDB.
context tax
~791 tok/turn3 tools
security
97/100
cold start
5622 ms
freshness
Active29d ago
Our reading of ClickHouse, from the data
ClickHouse is a database MCP server from clickhouse, listed in the official MCP Registry.
Its 3 tools add about 791 tokens to every model turn, lighter than the database median of 1,925 tokens across 101 measured servers (measured 2026-10-23).
Maintenance is active: the last public signal was 29 days ago (2026-10-15). For comparison, 63% of database servers are active or maintained.
With 889 GitHub stars it ranks #32 of 1,397 database servers we index.
It runs locally on your machine over stdio and needs one secret (CLICKHOUSE_PASSWORD); use a scoped, least-privilege key.
Install ClickHouse MCP server
Install in Claude Code
claude mcp add clickhouse -e CLICKHOUSE_HOST='<clickhouse-host>' -e CLICKHOUSE_USER='<clickhouse-user>' -e CLICKHOUSE_PASSWORD='<clickhouse-password>' -- uvx mcp-clickhouseInstall in Cursor
{
"mcpServers": {
"clickhouse": {
"command": "uvx",
"args": [
"mcp-clickhouse"
],
"env": {
"CLICKHOUSE_HOST": "<clickhouse-host>",
"CLICKHOUSE_USER": "<clickhouse-user>",
"CLICKHOUSE_PASSWORD": "<clickhouse-password>"
}
}
}
}Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (project).
Install in Claude Desktop
{
"mcpServers": {
"clickhouse": {
"command": "uvx",
"args": [
"mcp-clickhouse"
],
"env": {
"CLICKHOUSE_HOST": "<clickhouse-host>",
"CLICKHOUSE_USER": "<clickhouse-user>",
"CLICKHOUSE_PASSWORD": "<clickhouse-password>"
}
}
}
}Settings → Developer → Edit Config (claude_desktop_config.json), then restart.
Install in VS Code
{
"servers": {
"clickhouse": {
"type": "stdio",
"command": "uvx",
"args": [
"mcp-clickhouse"
],
"env": {
"CLICKHOUSE_HOST": "<clickhouse-host>",
"CLICKHOUSE_USER": "<clickhouse-user>",
"CLICKHOUSE_PASSWORD": "<clickhouse-password>"
}
}
}
}Add to .vscode/mcp.json in your workspace.
Install in Windsurf
{
"mcpServers": {
"clickhouse": {
"command": "uvx",
"args": [
"mcp-clickhouse"
],
"env": {
"CLICKHOUSE_HOST": "<clickhouse-host>",
"CLICKHOUSE_USER": "<clickhouse-user>",
"CLICKHOUSE_PASSWORD": "<clickhouse-password>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json.
Try it in a sandbox first: this installs it with scripts off and starts it with no network, then lists its tools and token cost. How it works
npx mcpskillhub test ghcr.io/clickhouse/mcp-clickhouse:0.7.0 --env CLICKHOUSE_HOST --env CLICKHOUSE_USER
Configuration
| Variable | Required | Secret | Description |
|---|---|---|---|
| CLICKHOUSE_HOST | yes | — | Hostname of the ClickHouse server |
| CLICKHOUSE_USER | yes | — | Username for ClickHouse authentication |
| CLICKHOUSE_PASSWORD | — | yes | 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 |
Context tax
Connecting this server adds ~791 tokens of tool definitions to every model turn (lean, 3 tools). Measured 2026-10-23 via a sandboxed run; o200k tokenizer, worst case for clients that load all tools up front. How we measure
| Model | Per 1,000 turns | With prompt caching |
|---|---|---|
| Claude Opus 5.5 | $3.16 | $0.158 |
| Claude Sonnet 5.5 | $1.58 | $0.158 |
| Claude Haiku 5.5 | $0.079 | — |
Input prices as of 2026-10-06. Excludes your own prompt and output.
Tools (3)
run_query390 tokExecute SQL queries in ClickHouse. Queries run in read-only mode by default. Bind optional params by name with {name:Type} placeholders, such as {name:String} or {vector:Array(Float32)}. Values may be JSON scalars, nulls, or arrays. Pass exact large integers as decimal strings. JSON lists and objects cannot bind to Tuple and Map types. Python percent formatting and $name$ raw binary parameters are not supported. Parameter values stay out of the MCP server's normal SQL log lines, but may appear in errors and backend logs. Set CLICKHOUSE_ALLOW_WRITE_ACCESS=true to allow DDL and DML operations. S
list_tables307 tokList available ClickHouse tables in a database, including schema, comment, row count, and column count. Integers outside [-9007199254740991, 9007199254740991] in table metadata are returned as decimal strings. Pagination tokens are single-use and retained for up to one hour.
list_databases31 tokList available ClickHouse databases
Security signals
97/100 — no known issues found as of 2026-10-23, from the checks below. This is not a guarantee of safety; review what a server can do before connecting it.
Deductions
- No security policy (SECURITY.md)-3
Checks
- ✓Repository hygiene (archived, activity, license, security policy)
- ✓Tool descriptions (prompt-injection and hidden-text heuristics)
- ○Package metadata (install scripts, provenance) — pending
- ○Source scan (secrets, CVEs, risky code) by vectra-guard — pending
Scan it yourself before installing with vectra-guard, the open-source agent security CLI (made by NavyaAI, which also runs MCPSkillHub). Scoring rules
Freshness
Active — last maintenance signal 29d ago. The newest of the signals below sets the band.
Last commit (default branch)
2026-10-15 · 29d ago · GitHub
Latest release
2026-09-21 · 53d ago · GitHub · v0.7.0
Package published
no data · npm/PyPI
Registry entry updated
2026-09-21 · 53d ago · official registry · v0.7.0
How it compares in Database
Against the most-starred database servers we index. Token cost is per model turn, measured from each server's live tool list.
| Server | Stars | Tools | Tokens / turn | Freshness | Runs |
|---|---|---|---|---|---|
| ClickHouse (this) | 889 | 3 | 791 | Active | local |
| Screenpipe | 21,982 | — | not measured | Active | — |
| Genai Toolbox | 16,679 | — | not measured | Active | hosted |
| Convex Backend | 12,716 | — | not measured | Active | — |
| Kubeshark | 12,100 | — | not measured | Active | local |
| Baserow | 6,174 | — | not measured | Active | — |
FAQ
›How do I install the ClickHouse MCP server in Claude Code?
Run: claude mcp add clickhouse -e CLICKHOUSE_HOST='<clickhouse-host>' -e CLICKHOUSE_USER='<clickhouse-user>' -e CLICKHOUSE_PASSWORD='<clickhouse-password>' -- uvx mcp-clickhouse. For Cursor, VS Code, Claude Desktop and Windsurf, use the install tabs above.
›Does ClickHouse require an API key?
Yes. It expects CLICKHOUSE_HOST, CLICKHOUSE_USER, CLICKHOUSE_PASSWORD, of which 1 is a secret.
›Can I use ClickHouse as a remote (hosted) MCP server?
No hosted endpoint is published; it runs locally over stdio.
›Is ClickHouse in the official MCP registry?
Yes, as io.github.ClickHouse/mcp-clickhouse.
›How many tokens does ClickHouse add to my context?
Its tool definitions total about 791 tokens, resent on every turn.
Sources and method
- Official MCP Registry entry
- updated 2026-09-21
- GitHub repository
- fetched 2026-10-19
- Package registry (npm / PyPI)
- listed
- Tool list (tools/list), measured by us
- 2026-10-23
- Security signals, computed by us
- 2026-10-23
- Last checked against all sources
- 2026-10-19
The description, packages and links come from the maintainer's own published metadata. Token cost, security signals, freshness and the reading above are MCPSkillHub's own measurements; see the methodology. Editorial standards are owned by Ramachandra Vikas Chamarthi, Founder & AI HPC Architect. Spot an error? Request a correction or claim the listing.
Alternatives to ClickHouse
Other database MCP servers.