Best for
- Teams already using ClickHouse who want AI assistants to access data directly.
- Scenarios requiring fast, read-only data queries and schema exploration.
Official MCP server with comprehensive features, but careful attention to permission configuration and security is needed.
Strongest · Security and permissions 18/20 Weakest · Reliability 12/20
Static review · not runListed 2026-08-07
Read the FMRS scoring method →Runtime:Python 3.10+ · Docker
CLICKHOUSE_HOST
Hostname of the ClickHouse server (database endpoint, not the MCP bind address); from your ClickHouse service or ClickHouse Cloud.
CLICKHOUSE_USER
ClickHouse authentication username, assigned by your database admin; avoid default or admin accounts.
CLICKHOUSE_PASSWORD
ClickHouse authentication password, assigned by your database admin; keep secret.
CLICKHOUSE_MCP_AUTH_TOKEN
Static bearer token for HTTP/SSE transports; generate yourself with uuidgen or openssl rand -hex 32.
CLICKHOUSE_PORT
ClickHouse HTTP interface port; defaults to 8443 (HTTPS) / 8123 (HTTP), usually not needed.
CLICKHOUSE_SECURE
Use HTTPS for the ClickHouse database connection; defaults to true.
CLICKHOUSE_VERIFY
Verify SSL certificates for the ClickHouse connection; defaults to true.
CLICKHOUSE_CONNECT_TIMEOUT
ClickHouse client connection timeout in seconds; defaults to 30.
CLICKHOUSE_SEND_RECEIVE_TIMEOUT
ClickHouse client send/receive timeout in seconds; defaults to 300, increase for long queries.
CLICKHOUSE_DATABASE
Optional default database name from your ClickHouse instance.
CLICKHOUSE_ROLE
Optional ClickHouse role to activate for the session; assigned by your database admin.
CLICKHOUSE_ALLOW_WRITE_ACCESS
Set to true to allow DDL/DML write operations; queries are read-only by default.
CLICKHOUSE_ALLOW_DROP
Set to true (with write access enabled) to allow destructive DROP/TRUNCATE operations.
CLICKHOUSE_MCP_QUERY_TIMEOUT
Query tool execution timeout in seconds; defaults to 30.
CLICKHOUSE_MCP_SERVER_TRANSPORT
MCP transport: stdio (default), http, or sse.
CLICKHOUSE_MCP_BIND_HOST
Bind address for the MCP HTTP/SSE server; defaults to 127.0.0.1.
CLICKHOUSE_MCP_BIND_PORT
Bind port for the MCP HTTP/SSE server; defaults to 8000.
CLICKHOUSE_MCP_AUTH_DISABLED
Set to true to disable HTTP/SSE authentication; local development only.
FASTMCP_SERVER_AUTH
Full class path of a FastMCP auth provider (e.g. Azure Entra) for OAuth/OIDC authentication.
CLICKHOUSE_SERVER_HOST_NAME
Optional SNI override and certificate validation hostname for proxies/load balancers.
CLICKHOUSE_PROXY_PATH
Optional URL path prefix for the ClickHouse HTTP endpoint behind a reverse proxy.
CLICKHOUSE_ENABLED
Enable/disable ClickHouse database tools; defaults to true; set false for chDB-only usage.
CHDB_ENABLED
Enable chDB embedded engine tools; defaults to false; requires the mcp-clickhouse[chdb] extra.
CHDB_DATA_PATH
Path to the chDB data directory; defaults to :memory: (in-memory).
MCP_MIDDLEWARE_MODULE
Python module name (without .py) containing custom middleware with a setup_middleware(mcp) function.
{
"mcpServers": {
"mcp-clickhouse": {
"command": "uv",
"args": [
"run",
"--with",
"mcp-clickhouse",
"--python",
"3.10",
"mcp-clickhouse"
],
"env": {
"CLICKHOUSE_HOST": "<clickhouse-host>",
"CLICKHOUSE_PORT": "<clickhouse-port>",
"CLICKHOUSE_USER": "<clickhouse-user>",
"CLICKHOUSE_PASSWORD": "<clickhouse-password>",
"CLICKHOUSE_ROLE": "<clickhouse-role>",
"CLICKHOUSE_SECURE": "true",
"CLICKHOUSE_VERIFY": "true",
"CLICKHOUSE_CONNECT_TIMEOUT": "30",
"CLICKHOUSE_SEND_RECEIVE_TIMEOUT": "30"
}
}
}
}
Shown for Claude Desktop. Other clients may use a different file or key (VS Code uses "servers") — the configurator below converts it.
{
"servers": {
"mcp-clickhouse": {
"command": "uv",
"args": [
"run",
"--with",
"mcp-clickhouse",
"--python",
"3.10",
"mcp-clickhouse"
],
"env": {
"CLICKHOUSE_HOST": "<clickhouse-host>",
"CLICKHOUSE_PORT": "<clickhouse-port>",
"CLICKHOUSE_USER": "<clickhouse-user>",
"CLICKHOUSE_PASSWORD": "<clickhouse-password>",
"CLICKHOUSE_ROLE": "<clickhouse-role>",
"CLICKHOUSE_SECURE": "true",
"CLICKHOUSE_VERIFY": "true",
"CLICKHOUSE_CONNECT_TIMEOUT": "30",
"CLICKHOUSE_SEND_RECEIVE_TIMEOUT": "30"
}
}
}
}
Goes in your project's .vscode/mcp.json (VS Code uses a "servers" key).
claude mcp add mcp-clickhouse -e 'CLICKHOUSE_HOST=<clickhouse-host>' -e 'CLICKHOUSE_PORT=<clickhouse-port>' -e 'CLICKHOUSE_USER=<clickhouse-user>' -e 'CLICKHOUSE_PASSWORD=<clickhouse-password>' -e 'CLICKHOUSE_ROLE=<clickhouse-role>' -e CLICKHOUSE_SECURE=true -e CLICKHOUSE_VERIFY=true -e CLICKHOUSE_CONNECT_TIMEOUT=30 -e CLICKHOUSE_SEND_RECEIVE_TIMEOUT=30 -- uv run --with mcp-clickhouse --python 3.10 mcp-clickhouse
Run it in a terminal; replace any <…> placeholders with your own values first.
Confirm that run_query, list_databases, list_tables (and optionally run_chdb_select_query) appear in the client's tool list, then ask the assistant to run a query like SELECT 1; a returned result proves the connection works.
Once connected, you can ask your AI assistant things like:
No matching tools
Listed from the project's documentation, not tested by this site.
Official ClickHouse MCP server for querying and exploring ClickHouse clusters and chDB. Provides SQL query, database and table listing tools via MCP.
Unofficial MCP server providing advanced access to the ChEMBL chemical database
Google's official database MCP toolbox — define AI-accessible database tools via config
Bytebase's official, minimalist two-tool database MCP server
Connect Supabase to your AI assistants
Source revision d21fe75a6f09 Data synced 2026-10-11 Read the FMRS scoring method