
ClickHouse
The ClickHouse MCP server enables AI models to interact with ClickHouse databases and the embedded chDB engine through tools for executing SQL queries, listing databases and tables with filtering and pagination support, and performing health checks. It provides read-only query execution by default with optional write access, pagination for large result sets, and includes authentication mechanisms for HTTP/SSE transports. This server solves the problem of integrating ClickHouse data access and analysis capabilities directly into Claude and other AI applications without requiring manual database connections.
- GitHub stars
- 903
- tools
- 4
- auth
- Secret needed
- transport
- STDIO
- env vars
- 16
- last updated
- Sep 21, 2026
Tools
4 toolsPublic tool metadata for what this MCP can expose to an agent.
run_queryExecute SQL queries on your ClickHouse cluster.
Execute SQL queries on your ClickHouse cluster.
No parameter schema in public metadata yet.
list_databasesList all databases on your ClickHouse cluster.
List all databases on your ClickHouse cluster.
No parameter schema in public metadata yet.
list_tablesList tables in a database with pagination.
List tables in a database with pagination.
No parameter schema in public metadata yet.
run_chdb_select_queryExecute SQL queries using chDB's embedded ClickHouse engine.
Execute SQL queries using chDB's embedded ClickHouse engine.
No parameter schema in public metadata yet.
Sponsors
Configuration
CLICKHOUSE_HOST*Hostname of the ClickHouse server
CLICKHOUSE_USER*Username for ClickHouse authentication
CLICKHOUSE_PASSWORDsecretPassword for ClickHouse authentication. Required unless a client certificate uses the default or mutual TLS mode
CLICKHOUSE_PORTClickHouse HTTP(S) port. Defaults to 8443 when CLICKHOUSE_SECURE=true, 8123 otherwise
CLICKHOUSE_SECUREdefault: trueUse HTTPS to connect to ClickHouse
CLICKHOUSE_VERIFYdefault: trueVerify SSL certificates
CLICKHOUSE_CA_CERTPath to a PEM CA bundle for ClickHouse server certificate verification
CLICKHOUSE_CLIENT_CERTPath to a PEM client certificate for the ClickHouse HTTPS connection
CLICKHOUSE_CLIENT_CERT_KEYPath to the PEM private key for CLICKHOUSE_CLIENT_CERT
CLICKHOUSE_TLS_MODEClient certificate mode: mutual, proxy, or strict
CLICKHOUSE_DATABASEDefault database to use
CLICKHOUSE_ROLEClickHouse role to activate for the session
CLICKHOUSE_ALLOW_WRITE_ACCESSdefault: falseAllow write operations (DDL and DML). Queries run read-only by default
CLICKHOUSE_ALLOW_DROPdefault: falseAllow destructive operations (DROP, TRUNCATE, DELETE, UPDATE, REPLACE, CLEAR, and DETACH PERMANENTLY) when write access is also enabled
CLICKHOUSE_MCP_QUERY_TIMEOUTdefault: 30Query tool timeout in seconds
CLICKHOUSE_MCP_MAX_WORKERSdefault: 10Maximum query worker thread pool size
Readme
ClickHouse MCP Server
An MCP server for ClickHouse.
The server implements MCP 2026-07-28 and supports legacy initialize handshakes from
2024-11-05 through 2025-11-25. Modern clients use sessionless requests and
server/discover. Existing clients can continue to negotiate the legacy protocol.
[!NOTE] HTTP requests without
MCP-Protocol-Versionare routed through legacy handling so clients from before2025-06-18can continue to connect. MCP2026-07-28permits this behavior on servers that support those clients. Modern clients should send the header on every POST request.
Features
ClickHouse Tools
Details
- Repository
- github.com/clickhouse/mcp-clickhouse
- Website
- clickhouse.com
- Category
- Databases
- Package
mcp-clickhouse- Transport
- STDIO
- Auth
- Required
- Registry
- MCP registry, active