ClickHouse

io.github.ClickHouse/mcp-clickhouse

About ClickHouse

ClickHouse is an MCP server published by the GitHub account ClickHouse. Official ClickHouse MCP server for querying and exploring ClickHouse clusters and chDB.

It runs on your own machine: your AI client starts it from the PyPI package mcp-clickhouse at version 0.7.0.

It asks for one secret: CLICKHOUSE_PASSWORD. Give it a key with the least access that still works.

It also needs CLICKHOUSE_HOST and CLICKHOUSE_USER set before it starts.

Version 0.7.0 was published on 21 September 2026, and the source code is public, so you can read it before installing.

Written from the registry entry. 9 automated checks on the registry entry and the package code: 7 pass, 0 warn, 0 fail, 2 info. How we check.

What it asks for

VariableRequiredSecretDescription
CLICKHOUSE_HOSTYesNoHostname of the ClickHouse server
CLICKHOUSE_USERYesNoUsername for ClickHouse authentication
CLICKHOUSE_PASSWORDNoYesPassword for ClickHouse authentication. Required unless a client certificate uses the default or mutual TLS mode
CLICKHOUSE_PORTNoNoClickHouse HTTP(S) port. Defaults to 8443 when CLICKHOUSE_SECURE=true, 8123 otherwise
CLICKHOUSE_SECURENoNoUse HTTPS to connect to ClickHouse
CLICKHOUSE_VERIFYNoNoVerify SSL certificates
CLICKHOUSE_CA_CERTNoNoPath to a PEM CA bundle for ClickHouse server certificate verification
CLICKHOUSE_CLIENT_CERTNoNoPath to a PEM client certificate for the ClickHouse HTTPS connection
CLICKHOUSE_CLIENT_CERT_KEYNoNoPath to the PEM private key for CLICKHOUSE_CLIENT_CERT
CLICKHOUSE_TLS_MODENoNoClient certificate mode: mutual, proxy, or strict
CLICKHOUSE_DATABASENoNoDefault database to use
CLICKHOUSE_ROLENoNoClickHouse role to activate for the session
CLICKHOUSE_ALLOW_WRITE_ACCESSNoNoAllow write operations (DDL and DML). Queries run read-only by default
CLICKHOUSE_ALLOW_DROPNoNoAllow destructive operations (DROP, TRUNCATE, DELETE, UPDATE, REPLACE, CLEAR, and DETACH PERMANENTLY) when write access is also enabled
CLICKHOUSE_MCP_QUERY_TIMEOUTNoNoQuery tool timeout in seconds
CLICKHOUSE_MCP_MAX_WORKERSNoNoMaximum query worker thread pool size

Checks

CheckResultDetail
Source repository linkedPasshttps://github.com/ClickHouse/mcp-clickhouse
Version pinnedPassEvery package has an explicit version
Secrets requestedInfoAsks for 1 secret: CLICKHOUSE_PASSWORD
Known package registryPassAll packages come from npm, PyPI, OCI, NuGet or MCPB
Namespace ownershipInfoName verified via GitHub account ClickHouse
Registry text aimed at the AIPassDescription and settings contain no hidden characters or instructions to the AI
Install scriptsPassmcp-clickhouse 0.7.0 has no setup.py; nothing runs at install
Code red flagsPassRead 59 files in mcp-clickhouse 0.7.0: no obfuscation, encoded execution, credential reads or data-collection endpoints found
Text aimed at the AIPassNo hidden characters or instructions to the AI in 59 files, including comments and the README

Code review: Pass, with notes

We read all 4,092 lines in 17 files of mcp-clickhouse 0.7.0 on 2026-10-31, without running it.

Lets an AI list and query your ClickHouse databases. It only talks to the ClickHouse server you configure, has no telemetry, and is read-only by default with the database itself enforcing it. Its startup instructions suggest the AI install ClickHouse's 'agent skills' with an npx command, which you may not want an agent to run on its own. The optional chDB engine can read files and websites from your computer, so enable it only if you need it.

What we found

  • Note Server instructions sent to every client suggest the AI run 'npx -y skills add clickhouse/agent-skills --all', which downloads and executes code from GitHub. It is phrased as 'consider' and points at the vendor's own repo, but an agent with shell access might act on it without asking the user. mcp_clickhouse/skills_advisor.py:3-10
  • Note Opt-in chDB tool (CHDB_ENABLED=true) runs any SQL in-process with no read-only setting. Its table functions (file, url, s3, postgresql, mysql) can read/write local files and reach any network host from the user's machine. mcp_clickhouse/chdb_backend.py:46-66
  • Note run_query runs arbitrary SQL by design. Read-only is the default and is properly enforced server-side by sending readonly=1 with every query unless CLICKHOUSE_ALLOW_WRITE_ACCESS=true. With writes on, the DROP/DELETE gate is a regex that the code itself calls best-effort; real protection is the ClickHouse user's grants. mcp_clickhouse/clients.py:418-470; queries.py:106-136
  • Info Full query text is logged at INFO to stderr (bound parameter values are kept out of these log lines). mcp_clickhouse/queries.py:316,364; chdb_backend.py:70
  • Info truststore.inject_into_ssl() switches all Python TLS in the process to the OS certificate store (disable with MCP_CLICKHOUSE_TRUSTSTORE_DISABLE=1). CLICKHOUSE_VERIFY=false can turn off certificate verification (opt-in only). mcp_clickhouse/__init__.py:18-23; mcp_env.py:261-266
  • Info HTTP/SSE mode is well protected: it refuses to start without an auth mode, binds 127.0.0.1 by default, and validates Host and Origin headers. /health is intentionally unauthenticated and returns only OK/error. mcp_clickhouse/auth.py:420-477; http_security.py; transport.py
  • Info MCP_MIDDLEWARE_MODULE lets the operator load arbitrary Python into the server. Expected for an extension hook, but anyone who controls the env controls the process. mcp_clickhouse/mcp_middleware_hook.py:10-17
  • Info pyproject.toml was not among the reviewed files; dependencies listed come from imports. Line counts use the manifest convention (newline count + 1 per file, i.e. the empty segment after a final newline is counted); every line of every file was read with the Read tool. (package)
Talks tothe configured ClickHouse server (CLICKHOUSE_HOST:CLICKHOUSE_PORT over HTTP/HTTPS): SQL queries and bound params, username/password or client certificate, client_name mcp_clickhouse, plus SHOW GRANTS once when writes are enabled and drops are not (lazily on tool calls (list_databases, list_tables, run_query) and on the /health route in HTTP mode; client cached afterwards)
OAuth/OIDC provider configured via FASTMCP_SERVER_AUTH (Auth0, Azure, GitHub, Google, WorkOS, etc.): provider client ID/secret and token verification requests (FastMCP dependency behaviour) (only in HTTP/SSE mode with that auth option, when clients authenticate)
any URL/S3/database named in chDB SQL: requests chosen by the query, made from the user's machine (only if CHDB_ENABLED=true and the model's SQL uses url()/s3()/postgresql()/mysql() table functions)
Keys and settingsCLICKHOUSE_HOST, CLICKHOUSE_PORT, CLICKHOUSE_USER, CLICKHOUSE_PASSWORD, CLICKHOUSE_ROLE, CLICKHOUSE_DATABASE, CLICKHOUSE_PROXY_PATH, CLICKHOUSE_SERVER_HOST_NAME: the configured ClickHouse server
CLICKHOUSE_SECURE, CLICKHOUSE_VERIFY, CLICKHOUSE_CA_CERT, CLICKHOUSE_CLIENT_CERT, CLICKHOUSE_CLIENT_CERT_KEY, CLICKHOUSE_TLS_MODE: local TLS settings (client cert presented to ClickHouse)
CLICKHOUSE_ALLOW_WRITE_ACCESS, CLICKHOUSE_ALLOW_DROP, CLICKHOUSE_ENABLED, CLICKHOUSE_CONNECT_TIMEOUT, CLICKHOUSE_SEND_RECEIVE_TIMEOUT: not sent; local switches
CLICKHOUSE_MCP_AUTH_TOKEN: not sent; used locally to verify bearer tokens on the HTTP transport
FASTMCP_SERVER_AUTH and FASTMCP_SERVER_AUTH_<PROVIDER>_* (client secrets): the chosen OAuth provider
CLICKHOUSE_MCP_SERVER_TRANSPORT, CLICKHOUSE_MCP_BIND_HOST/PORT, CLICKHOUSE_MCP_ALLOWED_HOSTS/ORIGINS, CLICKHOUSE_MCP_TRUSTED_PROXIES, CLICKHOUSE_MCP_AUTH_DISABLED, CLICKHOUSE_MCP_QUERY_TIMEOUT, CLICKHOUSE_MCP_MAX_WORKERS, CHDB_ENABLED, CHDB_DATA_PATH, MCP_CLICKHOUSE_TRUSTSTORE_DISABLE, MCP_MIDDLEWARE_MODULE: not sent; local settings
Files on your machineLoads .env from the package directory upward (auth.py:213-248) and from the working directory (auth.py:266). Reads the TLS certificate files configured by the user. With chDB enabled, keeps chDB data at CHDB_DATA_PATH (default in-memory), and chDB SQL can read and write local files via file() and sqlite(). No other file access.
Runs programsNo shell or eval. Operator-controlled dynamic imports: MCP_MIDDLEWARE_MODULE imports any named Python module (mcp_middleware_hook.py:10-17), and FASTMCP_SERVER_AUTH imports a class path (auth.py:358). Neither is reachable from tool input.
TelemetryNone. The client identifies itself to the user's ClickHouse server as client_name=mcp_clickhouse.
Toolslist_databases, list_tables, run_query, run_chdb_select_query (only with CHDB_ENABLED=true)
Tool descriptionsTool descriptions are clean and unusually candid (they say the drop gate is 'not a security boundary'). Server instructions (skills_advisor.py:3-10) recommend the AI install ClickHouse Agent Skills by running 'npx -y skills add clickhouse/agent-skills --all'. That nudges the agent to download and run third-party code, though the text is visible and points at ClickHouse's own GitHub repo. The opt-in chdb_initial_prompt tells the AI to fall back to downloading data with Python and to show only key results. No hidden or invisible text.

This covers the package's own code only, not the 11 packages it depends on (fastmcp, mcp, clickhouse-connect, python-dotenv, pydantic, cachetools, simplejson, starlette, uvicorn, truststore, chdb (optional extra)). A new version drops this review until we read it again.

Popularity & health: 90 / 100

Worked out from public numbers and our own checks, not from user reviews or ratings. It says how used and how looked-after a server is, not whether it is safe.

Popularity32 / 40

899 GitHub stars, 88,727 downloads last week, 3 Hacker News posts (4 points). Best two of the three, each on a log scale.

Activity23 / 25

Last push 2026-10-27, last release 2026-09-21, 28 commits in 90 days.

Issue health14 / 15

62 closed of 66 issues.

Our checks20 / 20

0 warnings, each costing a fifth.

210 forks, 94 merged pull requests. Sources: GitHub, npm, PyPI (pypistats.org) and Hacker News (Algolia), fetched 2026-10-31.

What people say

3 Hacker News threads linking to the source code. We link to them and copy nothing.

Look further: search Reddit, search Hacker News, read its GitHub issues. These are not reviews we checked.

Facts

Registry nameio.github.ClickHouse/mcp-clickhouse
PublisherGitHub account ClickHouse
How the name is verifiedName verified via GitHub account ClickHouse. The registry ties the name prefix to that account or domain; it does not check the code.
TypeLocal: runs on your machine from a package
Packagespypi mcp-clickhouse 0.7.0 (stdio)
oci ghcr.io/clickhouse/mcp-clickhouse:0.7.0 no version given (stdio)
Version0.7.0
Published
Last updated
Source repositoryhttps://github.com/ClickHouse/mcp-clickhouse
Websitehttps://clickhouse.com
CategoryDatabases & data (assigned by keyword rule, not by hand)

Related servers in Databases & data