ClickHouse
Official ClickHouse MCP server for querying and exploring ClickHouse clusters and chDB.
- Pricing
- Open source
- Runs
- Locally
- Version
- 0.7.0
- Listing updated
- 4 days ago
About ClickHouse
ClickHouse is an open-source MCP server for databases. It runs locally on your machine and is started by your AI client.
Install
Run in a terminal
claude mcp add mcp-clickhouse --env CLICKHOUSE_HOST='<CLICKHOUSE_HOST>' --env CLICKHOUSE_USER='<CLICKHOUSE_USER>' --env CLICKHOUSE_PASSWORD='<CLICKHOUSE_PASSWORD>' -- uvx mcp-clickhouseAdd to claude_desktop_config.json
{
"mcpServers": {
"mcp-clickhouse": {
"command": "uvx",
"args": [
"mcp-clickhouse"
],
"env": {
"CLICKHOUSE_HOST": "<CLICKHOUSE_HOST>",
"CLICKHOUSE_USER": "<CLICKHOUSE_USER>",
"CLICKHOUSE_PASSWORD": "<CLICKHOUSE_PASSWORD>"
}
}
}
}Add to ~/.cursor/mcp.json
{
"mcpServers": {
"mcp-clickhouse": {
"command": "uvx",
"args": [
"mcp-clickhouse"
],
"env": {
"CLICKHOUSE_HOST": "<CLICKHOUSE_HOST>",
"CLICKHOUSE_USER": "<CLICKHOUSE_USER>",
"CLICKHOUSE_PASSWORD": "<CLICKHOUSE_PASSWORD>"
}
}
}
}Add to .vscode/mcp.json
{
"servers": {
"mcp-clickhouse": {
"type": "stdio",
"command": "uvx",
"args": [
"mcp-clickhouse"
],
"env": {
"CLICKHOUSE_HOST": "<CLICKHOUSE_HOST>",
"CLICKHOUSE_USER": "<CLICKHOUSE_USER>",
"CLICKHOUSE_PASSWORD": "<CLICKHOUSE_PASSWORD>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"mcp-clickhouse": {
"command": "uvx",
"args": [
"mcp-clickhouse"
],
"env": {
"CLICKHOUSE_HOST": "<CLICKHOUSE_HOST>",
"CLICKHOUSE_USER": "<CLICKHOUSE_USER>",
"CLICKHOUSE_PASSWORD": "<CLICKHOUSE_PASSWORD>"
}
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"mcp-clickhouse": {
"command": "uvx",
"args": [
"mcp-clickhouse"
],
"env": {
"CLICKHOUSE_HOST": "<CLICKHOUSE_HOST>",
"CLICKHOUSE_USER": "<CLICKHOUSE_USER>",
"CLICKHOUSE_PASSWORD": "<CLICKHOUSE_PASSWORD>"
}
}
}
}Configuration
CLICKHOUSE_HOSTHostname of the ClickHouse serverRequiredCLICKHOUSE_USERUsername for ClickHouse authenticationRequiredCLICKHOUSE_PASSWORDPassword for ClickHouse authentication. Required unless a client certificate uses the default or mutual TLS modeCLICKHOUSE_PORTClickHouse HTTP(S) port. Defaults to 8443 when CLICKHOUSE_SECURE=true, 8123 otherwiseCLICKHOUSE_SECUREUse HTTPS to connect to ClickHouseCLICKHOUSE_VERIFYVerify SSL certificatesCLICKHOUSE_CA_CERTPath to a PEM CA bundle for ClickHouse server certificate verificationCLICKHOUSE_CLIENT_CERTPath to a PEM client certificate for the ClickHouse HTTPS connectionCLICKHOUSE_CLIENT_CERT_KEYPath to the PEM private key for CLICKHOUSE_CLIENT_CERTCLICKHOUSE_TLS_MODEClient certificate mode: mutual, proxy, or strictCLICKHOUSE_DATABASEDefault database to useCLICKHOUSE_ROLEClickHouse role to activate for the sessionCLICKHOUSE_ALLOW_WRITE_ACCESSAllow write operations (DDL and DML). Queries run read-only by defaultCLICKHOUSE_ALLOW_DROPAllow destructive operations (DROP, TRUNCATE, DELETE, UPDATE, REPLACE, CLEAR, and DETACH PERMANENTLY) when write access is also enabledCLICKHOUSE_MCP_QUERY_TIMEOUTQuery tool timeout in secondsCLICKHOUSE_MCP_MAX_WORKERSMaximum query worker thread pool sizeCLICKHOUSE_HOSTHostname of the ClickHouse serverRequiredCLICKHOUSE_USERUsername for ClickHouse authenticationRequiredCLICKHOUSE_PASSWORDPassword for ClickHouse authentication. Required unless a client certificate uses the default or mutual TLS modeCLICKHOUSE_PORTClickHouse HTTP(S) port. Defaults to 8443 when CLICKHOUSE_SECURE=true, 8123 otherwiseCLICKHOUSE_SECUREUse HTTPS to connect to ClickHouseCLICKHOUSE_VERIFYVerify SSL certificatesCLICKHOUSE_CA_CERTPath to a PEM CA bundle for ClickHouse server certificate verificationCLICKHOUSE_CLIENT_CERTPath to a PEM client certificate for the ClickHouse HTTPS connectionCLICKHOUSE_CLIENT_CERT_KEYPath to the PEM private key for CLICKHOUSE_CLIENT_CERTCLICKHOUSE_TLS_MODEClient certificate mode: mutual, proxy, or strictCLICKHOUSE_DATABASEDefault database to useCLICKHOUSE_ROLEClickHouse role to activate for the sessionCLICKHOUSE_ALLOW_WRITE_ACCESSAllow write operations (DDL and DML). Queries run read-only by defaultCLICKHOUSE_ALLOW_DROPAllow destructive operations (DROP, TRUNCATE, DELETE, UPDATE, REPLACE, CLEAR, and DETACH PERMANENTLY) when write access is also enabledCLICKHOUSE_MCP_QUERY_TIMEOUTQuery tool timeout in secondsCLICKHOUSE_MCP_MAX_WORKERSMaximum query worker thread pool size
Pricing
Open source
Prices change. Check clickhouse.com before you buy.
ClickHouse FAQ
Is ClickHouse free?
Yes. ClickHouse is open source, so you can use and self-host it for free.
How do I add ClickHouse to Claude Code?
Run this command in your terminal: claude mcp add mcp-clickhouse --env CLICKHOUSE_HOST='<CLICKHOUSE_HOST>' --env CLICKHOUSE_USER='<CLICKHOUSE_USER>' --env CLICKHOUSE_PASSWORD='<CLICKHOUSE_PASSWORD>' -- uvx mcp-clickhouse
What are the best alternatives to ClickHouse?
The closest alternatives to ClickHouse are Midplane, PlatypusDB, Lorebase, Sovaria and model2data studio.
Alternatives to ClickHouse

Midplane
MCP serverPostgres gateway for AI agents with table grants, column masking and approval for writes
Runs locally- Open source
- 5 GitHub stars
- Databases

PlatypusDB
MCP serverGives MCP clients access to your PlatypusDB database connections, scoped per agent
Runs locally- Open source
- Databases

Lorebase
MCP serverLets agents read and change a governed, versioned Postgres knowledge graph
Runs locally- Open source
- Knowledge and memory
Sovaria
MCP serverManage a Sovaria backend (Postgres, auth, storage, functions) from an AI assistant
Not checked yet- 4 tools
- Remote
- Freemium
- Databases

model2data studio
MCP serverGenerate realistic connected test data, dbt projects and dashboards from a schema
- Remote
- Freemium
- Databases

semlayer
MCP serverInfers a semantic layer from your data warehouse and serves it to agents
Runs locally- Free
- Databases