clickhouse avatar

ClickHouse

clickhouse/mcp-clickhouseOfficial

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 tools

Public 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_PASSWORDsecret

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_SECUREdefault: true

Use HTTPS to connect to ClickHouse

CLICKHOUSE_VERIFYdefault: true

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_ACCESSdefault: false

Allow write operations (DDL and DML). Queries run read-only by default

CLICKHOUSE_ALLOW_DROPdefault: false

Allow destructive operations (DROP, TRUNCATE, DELETE, UPDATE, REPLACE, CLEAR, and DETACH PERMANENTLY) when write access is also enabled

CLICKHOUSE_MCP_QUERY_TIMEOUTdefault: 30

Query tool timeout in seconds

CLICKHOUSE_MCP_MAX_WORKERSdefault: 10

Maximum query worker thread pool size

Readme

ClickHouse MCP Server

PyPI - Version

An MCP server for ClickHouse.

mcp-clickhouse MCP server

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-Version are routed through legacy handling so clients from before 2025-06-18 can continue to connect. MCP 2026-07-28 permits this behavior on servers that support those clients. Modern clients should send the header on every POST request.

Features

ClickHouse Tools


View the full README on GitHub

Details

Repository
github.com/clickhouse/mcp-clickhouse
Website
clickhouse.com
Category
Databases
Package
mcp-clickhouse
Transport
STDIO
Auth
Required
Registry
MCP registry, active

Related Databases MCP servers

View all
1alexander-zuev avatarSupabasealexander-zuev/supabase-mcp-serverQuery MCP enables end-to-end management of Supabase via chat interface: read & write query executions, management API support, automatic migration versioning, a821stars
2timescale avatarTiger MCPtimescale/tiger-cliProvides programmatic access to Tiger Cloud services, databases, and documentation.127stars
3wgong avatarWgong Sqlite Mcp Serverwgong/sqlite-mcp-serverExplore, query, and inspect SQLite databases with ease. List tables, preview results, and view det…1stars
4rosch100 avatarMcp Encrypted Sqliterosch100/mcp-encrypted-sqliteMCP server for encrypted SQLite databases (SQLCipher 4) - Works with MoneyMoney, KeePass and more0stars
5supabase avatarSupabasesupabase/mcpMCP server for interacting with the Supabase platform0stars
6mongodb-js avatarMongodb Mcp Servermongodb-js/mongodb-mcp-serverMongoDB Model Context Protocol Server1.2Kstars