Tool connections (MCP)
ClickHouse MCP
Let an assistant inspect ClickHouse tables and query analytical data.
Install
Cursor MCP settingsConfiguration to paste
- Install uv, the Python package manager, before running this command.
- Prepare the database connection and grant only the permissions you need.
- Replace the placeholder values below before running or saving.
- Merge into the existing configuration; keep other tools and settings.
- Save the configuration, then restart or reload your assistant or editor.
Cursor MCP settings
Configuration file ~/.cursor/mcp.json
Replace these values: YOUR_CLICKHOUSE_HOST · YOUR_CLICKHOUSE_USER · YOUR_CLICKHOUSE_PASSWORD
{
"mcpServers": {
"mcp-clickhouse": {
"command": "uv",
"args": [
"run",
"--with",
"mcp-clickhouse",
"--python",
"3.12",
"mcp-clickhouse"
],
"env": {
"CLICKHOUSE_HOST": "YOUR_CLICKHOUSE_HOST",
"CLICKHOUSE_PORT": "8443",
"CLICKHOUSE_USER": "YOUR_CLICKHOUSE_USER",
"CLICKHOUSE_PASSWORD": "YOUR_CLICKHOUSE_PASSWORD",
"CLICKHOUSE_SECURE": "true",
"CLICKHOUSE_VERIFY": "true",
"CLICKHOUSE_CONNECT_TIMEOUT": "30"
}
}
}
}Requirements, costs and detailed steps
ClickHouse MCP setup documentation
Setup requirements have not been reviewed yet. Check the project’s setup guide.
Based on public documentation; not individually installed and tested here.
What is ClickHouse MCP?
ClickHouse's official MCP lists databases and tables and executes SQL for analysis or troubleshooting. It requires a reachable ClickHouse instance and database credentials, and runs as a Python package. Queries are read-only by default; writes require explicit configuration and database privileges. Optional chDB support is available for local analysis. Database hosting and runtime costs remain separate.
ClickHouse MCP use cases
- List databases and inspect table schemas
- Run queries in the default read-only mode
- Optionally use local chDB analysis
Official project & documentation
Alternatives to ClickHouse MCP for similar tasks
Compare plugins for similar tasks and check their setup requirements.
- DBHub — Connect an assistant to PostgreSQL, MySQL, SQLite and other SQL databases.
- Datasette MCP — Give an assistant read-only access to databases in an existing Datasette instance.
- Neon MCP Server — Explore and manage Neon Postgres databases from your coding assistant.