
This profile is part of our MCP server directory, within The MCP Guide. Profiles are checked against each vendor's own documentation. Need a server built? See MCP development.
The ClickHouse MCP server lets an AI app list databases and tables and run SQL on a ClickHouse cluster. It can also query files and URLs through chDB, ClickHouse's embedded engine. ClickHouse publishes it as an open-source Python package, and its MCP docs link setup guides for Claude Code, Claude Desktop, Codex, ChatGPT, Cursor and Windsurf (now Devin Desktop).
Checked against: ClickHouse MCP Server README on 28 October 2026. eSEOspace did not install or test this server.
Key Takeaways
run_queryruns in read-only mode by default, withCLICKHOUSE_ALLOW_WRITE_ACCESS=false.- Writes need
CLICKHOUSE_ALLOW_WRITE_ACCESS=true; destructive statements such asDROPandTRUNCATEalso needCLICKHOUSE_ALLOW_DROP=true. - Over HTTP or SSE, authentication is required by default, with a bearer token or OAuth through FastMCP.
- The README says the server implements MCP
2026-07-28, the latest spec version, and still accepts older clients. - Query parameters keep values out of the SQL text, but ClickHouse says this "is not a privacy feature."
At a glance
| Item | Detail |
|---|---|
| Publisher | ClickHouse |
| Official? | Yes |
| Hosting | Local package (mcp-clickhouse on PyPI); can also run as an HTTP service you host |
| Transport | stdio (default), Streamable HTTP, SSE |
| Sign-in | ClickHouse user and password to the database; bearer token or OAuth/OIDC for HTTP |
| Read or write | Read-only by default; writes and drops are opt-in |
| Price | No separate MCP price listed |
| Source code | ClickHouse/mcp-clickhouse |
| Status | Not stated |
What it can do
The README lists these tools:
run_query: runs SQL on your cluster. It accepts an optionalparamsobject for ClickHouse{name:Type}placeholders. It also runsDESCRIBE (<query>)to check result columns andEXPLAIN ESTIMATEto see how many rows a query would read.list_databases: lists all databases.list_tables: lists tables in a database, with paging,LIKEfilters and optional column details.run_chdb_select_query: runs SQL in chDB against files, URLs or databases without loading the data first. It needs the optionalchdbextra.
A /health endpoint is available when the server runs over HTTP or SSE.
How to connect it
For Claude Desktop, the README gives this config, run with uv:
{
"mcpServers": {
"mcp-clickhouse": {
"command": "uv",
"args": [
"run",
"--with",
"mcp-clickhouse",
"--python",
"3.12",
"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 supports Python 3.10 to 3.14 and recommends 3.12. The README also has a config for the public ClickHouse SQL Playground, which is handy for a first look.
If you run the server over HTTP for a team, clients connect to its URL with a bearer token header. The README shows a client config with "Authorization": "Bearer your-generated-token".
Security notes
ClickHouse's defaults are cautious. In its words, the server "enforces read-only queries so that accidental mutations cannot happen during exploration."
There are two separate switches:
| Setting | Allows |
|---|---|
CLICKHOUSE_ALLOW_WRITE_ACCESS=true | Non-destructive DDL and DML, such as CREATE, INSERT and ALTER ADD COLUMN |
CLICKHOUSE_ALLOW_DROP=true | Destructive statements: DROP, TRUNCATE, DELETE, UPDATE, REPLACE and similar |
The server stays read-only if the ClickHouse instance itself disallows writes. That means a read-only database user is a second layer of protection. Use the CLICKHOUSE_ROLE setting to run as a narrow role. See least privilege for MCP.
HTTP authentication. Over HTTP or SSE, auth is required by default. You choose a static bearer token, OAuth/OIDC through FastMCP providers such as Entra ID, Google or GitHub, or disabled auth. ClickHouse says to disable auth for "local development only." Never expose an unauthenticated server on a network. Read exposed local MCP servers.
Health check. The /health endpoint is intentionally unauthenticated. To confirm auth works, ClickHouse says to call the MCP endpoint itself without a token and check for a 401.
Parameters are not private. Parameter values stay out of the server's own SQL logs. But ClickHouse says they still appear in tool arguments and may show in ClickHouse system logs. More in the MCP security hub.
Alternatives
- Google BigQuery MCP Server: a Google-hosted server with a read-only SQL tool.
- Snowflake MCP Server: a managed server with a read-only SQL option.
- Elastic MCP Server: search and analytics through Agent Builder.
More profiles are in the MCP server directory.
Next step
Keep both write flags off and connect as a read-only ClickHouse role. Add write access only for a named task. If you plan to host the server for a team, our MCP development team can set up OAuth in front of it.
Frequently asked questions
Is the ClickHouse MCP server read-only?
Yes, by default. run_query runs read-only unless you set CLICKHOUSE_ALLOW_WRITE_ACCESS=true. Destructive statements need CLICKHOUSE_ALLOW_DROP=true as well.
Does ClickHouse host the MCP server for me?
The README documents a package you run yourself, locally or as an HTTP service. It does not describe a ClickHouse-hosted endpoint.
What is chDB in this server?
chDB is ClickHouse's embedded engine. The run_chdb_select_query tool uses it to query files, URLs and databases directly. You install it with the optional chdb extra.
Which MCP versions does it support?
The README says it implements MCP 2026-07-28 and supports legacy handshakes from 2024-11-05 through 2025-11-25. See the 2026-07-28 spec changes.











