ClickHouse MCP server
Read-only MCP server for ClickHouse metadata, parameterized queries, and plan analysis.
0 stars44 downloads/wk
Reviews
Write oneNobody has reviewed ClickHouse yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
ClickHouse tools (3, 1 write)
write = sends, deletes, buys or postsRead from the package source without running it. The installed server may list more.
analyze_query[ClickHouse] Explain read-only SELECT.
list_profiles[ClickHouse] List configured connection profiles.
run_querywrite action[ClickHouse] Execute read-only SELECT or SHOW.
Public scan report
scanner v0.1.10 · 2026-10-02 · same rubric, same numbers if you re-run it
- Code scan11 source files scanned25/25
- –Live reliabilityno gateway calls yet and no remote to proben/a
- –Tool poisoningtools not inspected (local package is not executed); not countedn/a
- Auth qualitystatic API keys via environment variables6/15
- Maintenancelast push 10 days ago15/15
- Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
How ClickHouse compares
Against every graded Databases MCP server, from our own scans and uptime checks. Updated after each scan run.
- Safety score
- 83/100
- higher than 60% of 802 Databases servers
- Tools
- 3
- the typical Databases server has 8
- Tools that change things
- 33%
- typical: 10%. Fewer write tools means less an agent can break
- Downloads a week
- 44
- more than 31% of 328 Databases servers with a package
What its tools let an agent do: 2 read · 1 run or deploy
Release history: 2 versions in the registry since 2026-09-17, latest 2026-09-20, typically one every 3 days.
Install ClickHouse in Claude Code, Cursor or VS Code
claude mcp add mcp-clickhousex -- uvx mcp-clickhousex
What the publisher says
From the ClickHouse repository's README, as published. We do not edit it. Read it on GitHub
MCP ClickHouse Tool
<!-- mcp-name: io.github.alyiox/mcp-clickhousex -->
A read-only-by-default Model Context Protocol (MCP) server for ClickHouse that provides schema discovery, read-only queries, execution-plan analysis, opt-in writes, and profile-based access to multiple servers from a single toolset deployment.
Read-only is enforced by the engine, not by SQL text matching: every client carries ClickHouse's readonly=1, so writes, external table functions and query-level SETTINGS are refused by the server being queried. There is no write tool to opt into.
Requirements: Python 3.13+, a running ClickHouse instance, and connection details via environment variables or a config file.
Quick start
Set a DSN and run the server with MCP Inspector:
# Option 1: Run directly with uvx (no clone needed)
export MCP_CLICKHOUSE_DSN="http://default:@localhost:8123/default"
npx -y @modelcontextprotocol/inspector@latest uvx mcp-clickhousex# Option 2: Run from source (clone repo, then)
export MCP_CLICKHOUSE_DSN="http://default:@localhost:8123/default"
npx -y @modelcontextprotocol/inspector@latest uv run mcp-clickhousexConfiguration
A profile is one ClickHouse connection: a DSN plus the row and timeout caps that apply to it. A profile named default always exists; every tool takes an optional profile to reach another, and list_profiles reports what is configured.
Settings come from three sources, merged field by field, later winning:
- the user-scoped config.json — any number of profiles;
- MCPCLICKHOUSEPROFILES__ environment variables — any number of profiles;
- flat MCPCLICKHOUSE environment variables — the default profile only.
Because the merge is per field rather than per profile, a config.json can carry the full set while a flat MCPCLICKHOUSEDSN repoints the default profile at a local server, leaving its other fields intact. With none of the three present, default falls back to http://default:@localhost:8123/default.
Each setting has one field name, spelled three ways — MCPCLICKHOUSE, MCPCLICKHOUSEPROFILES__, or the field lowercased as a JSON key:
Caps are per profile. A value above its ceiling is clamped at startup; a value that is not an integer falls back to the default.
Single connection: flat environment variables are the shortest path.
# Connection DSN.
export MCP_CLICKHOUSE_DSN="http://user:password@host:8123/database"
# Optional description for the default profile (tooling/AI discovery).
export MCP_CLICKHOUSE_DESCRIPTION="Primary cluster"
# Optional caps, defaults shown.
export MCP_CLICKHOUSE_QUERY_MAX_ROWS="500"
export MCP_CLICKHOUSE_QUERY_COMMAND_TIMEOUT_SECONDS="30"
export MCP_CLICKHOUSE_SNAPSHOT_MAX_ROWS="10000"
export MCP_CLICKHOUSE_SNAPSHOT_COMMAND_TIMEOUT_SECONDS="120"Multiple connections: use the user-scoped config.json, which keeps credentials out of the host's process environment.
- Unix-like: ~/.config/mcp-clickhousex/config.json
- Windows: %USERPROFILE%\.config\mcp-clickhousex\config.json
Shortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
Grade history
- 2026-09-19downgradeA → Bscore 83
ClickHouse: common questions
- Is ClickHouse MCP server safe?
- Mostly: it is graded B (83/100). Read the ClickHouse safety report
- How do I install ClickHouse?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
- Does ClickHouse need an API key?
- Yes. The registry entry asks for
MCP_CLICKHOUSE_DSN. - Is ClickHouse maintained?
- The last commit was 42 days ago (2026-09-23). The latest release is v0.11.0.
- What can I use instead of ClickHouse?
- Servers from other publishers that do the same job: GoSQLX MCP server, Kubeshark MCP server and MOFi MCP server.
- How does ClickHouse compare with other Databases MCP servers?
- safety score 83/100 (higher than 60% of 802 Databases servers); tools 3 (the typical Databases server has 8); tools that change things 33% (typical: 10%. Fewer write tools means less an agent can break). Full comparison.
Alternatives to ClickHouse
Same job from other publishers: the closest match first, then the best rated.
- GoSQLXSQL validation, formatting, parsing, metadata extraction, linting, and security analysis.not reviewedGrowingA
- KubesharkReal-time Kubernetes network traffic visibility and API analysis for HTTP, gRPC, Redis, Kafka, DNS.not reviewedEstablishedA
- MOFiQuery MOF database survey metadata and connect a bounded MOFi scientific workspace.not reviewedGrowingA