Skip to content
mcp/skillhub

ClickHouse MCP Server

by clickhouseio.github.ClickHouse/mcp-clickhousev0.7.0

Official ClickHouse MCP server for querying and exploring ClickHouse clusters and chDB.

889Pythonstdioofficial registry

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-clickhouse

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

VariableRequiredSecretDescription
CLICKHOUSE_HOSTyes—Hostname of the ClickHouse server
CLICKHOUSE_USERyes—Username for ClickHouse authentication
CLICKHOUSE_PASSWORD—yesPassword 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

ModelPer 1,000 turnsWith 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 tok

    Execute 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 tok

    List 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 tok

    List 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.

  1. Last commit (default branch)

    2026-10-15 · 29d ago · GitHub

  2. Latest release

    2026-09-21 · 53d ago · GitHub · v0.7.0

  3. Package published

    no data · npm/PyPI

  4. 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.

ServerStarsToolsTokens / turnFreshnessRuns
ClickHouse (this)8893791Activelocal
Screenpipe21,982—not measuredActive—
Genai Toolbox16,679—not measuredActivehosted
Convex Backend12,716—not measuredActive—
Kubeshark12,100—not measuredActivelocal
Baserow6,174—not measuredActive—
All database MCP servers

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
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.

View all