Database Design
Security scan passedEquips your coding agent with a database architect, a SQL specialist and a PostgreSQL table-design skill.

Lets your agent explore your ClickHouse databases, inspect table schemas and run SQL queries, read-only unless you allow writes.
by clickhouse· DatabasesUnclaimed · Yours? Claim it
4 images
About
ClickHouse's own MCP server. It runs on your machine and lets your agent discover databases and tables, inspect schemas and run SQL against your ClickHouse service, whether that's ClickHouse Cloud or a server you run yourself. Queries are read-only unless you turn writes on. What you can do with it - List the databases on your cluster, and page through the tables in one, with their columns and CREATE TABLE statements - Run SQL queries, with named parameters for the values - Check a query before running it: DESCRIBE shows the columns it returns, and EXPLAIN ESTIMATE shows how many rows it would read - Query files, URLs and other sources in place with chDB, ClickHouse's embedded engine, when you turn it on How it connects It's a Python package, mcp-clickhouse, that runs with uv (for example uv run --with mcp-clickhouse --python 3.10 mcp-clickhouse). It talks to ClickHouse's HTTP interface with the details you give it: CLICKHOUSE_HOST and CLICKHOUSE_USER, plus CLICKHOUSE_PASSWORD, which you need unless you sign in with a client certificate. For ClickHouse Cloud it uses HTTPS on port 8443. For a self-managed server on plain HTTP, also set CLICKHOUSE_SECURE=false, and CLICKHOUSE_PORT=8123 if needed. To try it without your own data, point it at the public ClickHouse SQL Playground: host sql-clickhouse.clickhouse.com, user demo and an empty password. Read-only unless you say so - Queries run read-only by default. - CLICKHOUSE_ALLOW_WRITE_ACCESS=true allows inserts, CREATE and ALTER ADD COLUMN. - Destructive statements such as DROP, TRUNCATE, DELETE and UPDATE also need CLICKHOUSE_ALLOW_DROP=true. - ClickHouse recommends a dedicated database user with only the permissions your agent needs, never a default or admin user: that user's grants are the real limit. Good to know - You need uv installed. If your agent can't find it, use its full path. - ClickHouse documents setup for Claude Code, Claude Desktop, Codex, ChatGPT's desktop app, Cursor and Windsurf. For ChatGPT on the web, ClickHouse Cloud has a separate remote MCP server. - Queries time out after 30 seconds by default; CLICKHOUSE_MCP_QUERY_TIMEOUT changes that.
Once it’s added
“List the databases available in ClickHouse, then show me the tables in one of them.”
“Show me the columns of every table in the analytics database.”
“Total spend per user in events over the last 30 days.”
“Before running it, estimate how many rows this query would read.”
“Query this Parquet file with chDB.”
Before you add it
Reads only
Databases, tables and their schemas · Query results · Query output columns and estimated reads
Makes changes · your agent can ask first
Nothing by default: queries run read-only · With write access on: inserts, CREATE and ALTER ADD COLUMN · With drops also allowed: DROP, TRUNCATE, DELETE and UPDATE
From people who use it
Step by step
Nothing new reaches your agent until a person has looked at it.
Scanned on every change, and again when our rules improve.
Plugins people install alongside ClickHouse MCP Server.
Runs on your machine.
claude_desktop_config.json{
"mcpServers": {
"clickhouse-mcp-server": {
"command": "uvx",
"args": [
"mcp-clickhouse==0.7.0"
],
"env": {
"CLICKHOUSE_HOST": "<CLICKHOUSE_HOST>",
"CLICKHOUSE_USER": "<CLICKHOUSE_USER>"
}
}
}
}Runs on your machine.
Add to VS Codecode --add-mcp '{"name":"clickhouse-mcp-server","command":"uvx","args":["mcp-clickhouse==0.7.0"],"env":{"CLICKHOUSE_HOST":"<CLICKHOUSE_HOST>","CLICKHOUSE_USER":"<CLICKHOUSE_USER>"}}'copilot mcp add clickhouse-mcp-server --env CLICKHOUSE_HOST=<CLICKHOUSE_HOST> --env CLICKHOUSE_USER=<CLICKHOUSE_USER> -- uvx mcp-clickhouse==0.7.0
Runs on your machine.
Add to Cursor.cursor/mcp.json{
"mcpServers": {
"clickhouse-mcp-server": {
"command": "uvx",
"args": [
"mcp-clickhouse==0.7.0"
],
"env": {
"CLICKHOUSE_HOST": "<CLICKHOUSE_HOST>",
"CLICKHOUSE_USER": "<CLICKHOUSE_USER>"
}
}
}
}Runs on your machine.
claude mcp add -e CLICKHOUSE_HOST=<CLICKHOUSE_HOST> -e CLICKHOUSE_USER=<CLICKHOUSE_USER> clickhouse-mcp-server -- uvx mcp-clickhouse==0.7.0
Runs on your machine.
codex mcp add --env CLICKHOUSE_HOST=<CLICKHOUSE_HOST> --env CLICKHOUSE_USER=<CLICKHOUSE_USER> clickhouse-mcp-server -- uvx mcp-clickhouse==0.7.0
Runs on your machine.
~/.gemini/config/mcp_config.json{
"mcpServers": {
"clickhouse-mcp-server": {
"command": "uvx",
"args": [
"mcp-clickhouse==0.7.0"
],
"env": {
"CLICKHOUSE_HOST": "<CLICKHOUSE_HOST>",
"CLICKHOUSE_USER": "<CLICKHOUSE_USER>"
}
}
}
}Runs on your machine.
gemini mcp add -e CLICKHOUSE_HOST=<CLICKHOUSE_HOST> -e CLICKHOUSE_USER=<CLICKHOUSE_USER> clickhouse-mcp-server uvx mcp-clickhouse==0.7.0
Runs on your machine.
Runs on your machine.
opencode mcp add clickhouse-mcp-server --env CLICKHOUSE_HOST=<CLICKHOUSE_HOST> --env CLICKHOUSE_USER=<CLICKHOUSE_USER> -- uvx mcp-clickhouse==0.7.0
Runs on your machine.
~/.hermes/config.yaml{
"mcp_servers": {
"clickhouse-mcp-server": {
"command": "uvx",
"args": [
"mcp-clickhouse==0.7.0"
],
"env": {
"CLICKHOUSE_HOST": "<CLICKHOUSE_HOST>",
"CLICKHOUSE_USER": "<CLICKHOUSE_USER>"
}
}
}
}CLICKHOUSE_HOSTRequiredHostname of the ClickHouse serverCLICKHOUSE_USERRequiredUsername for ClickHouse authenticationCLICKHOUSE_PASSWORDOptionalSecretPassword for ClickHouse authentication. Required unless a client certificate uses the default or mutual TLS modeCLICKHOUSE_PORTOptionalClickHouse HTTP(S) port. Defaults to 8443 when CLICKHOUSE_SECURE=true, 8123 otherwiseCLICKHOUSE_SECUREOptionalUse HTTPS to connect to ClickHouseCLICKHOUSE_VERIFYOptionalVerify SSL certificatesCLICKHOUSE_CA_CERTOptionalPath to a PEM CA bundle for ClickHouse server certificate verificationCLICKHOUSE_CLIENT_CERTOptionalPath to a PEM client certificate for the ClickHouse HTTPS connectionCLICKHOUSE_CLIENT_CERT_KEYOptionalPath to the PEM private key for CLICKHOUSE_CLIENT_CERTCLICKHOUSE_TLS_MODEOptionalClient certificate mode: mutual, proxy, or strictCLICKHOUSE_DATABASEOptionalDefault database to useCLICKHOUSE_ROLEOptionalClickHouse role to activate for the sessionCLICKHOUSE_ALLOW_WRITE_ACCESSOptionalAllow write operations (DDL and DML). Queries run read-only by defaultCLICKHOUSE_ALLOW_DROPOptionalAllow destructive operations (DROP, TRUNCATE, DELETE, UPDATE, REPLACE, CLEAR, and DETACH PERMANENTLY) when write access is also enabledCLICKHOUSE_MCP_QUERY_TIMEOUTOptionalQuery tool timeout in secondsCLICKHOUSE_MCP_MAX_WORKERSOptionalMaximum query worker thread pool sizeReplace each <NAME> placeholder with your own value.
Scanned and passed · checked 6 h ago
Security scan
Passed
Safe to install in every agent it supports. Runs on your machine.
Plugins people install alongside ClickHouse MCP Server.
Equips your coding agent with a database architect, a SQL specialist and a PostgreSQL table-design skill.
Let your agent explore schemas and query your databases, from Postgres and MySQL to BigQuery, AlloyDB and Spanner.
Let your agent work with your Firebase projects: Firestore data, Auth users, security rules, Crashlytics and deploys.
Supabase's own MCP server: your agent manages tables, runs SQL and migrations, checks logs and deploys Edge Functions in your projects.
Nobody has shared how they use ClickHouse MCP Server yet.
No reviews yet. Used ClickHouse MCP Server? Say how it went.
Write a review