MCP server
ClickHouse MCP Server
- Maintainer
- Official · ClickHouse
- Runs
- Local (stdio)
- GitHub
- ★ 892, last push 2026-10-21 (checked 2026-10-24)
- License
- Apache-2.0
- Registry
- io.github.ClickHouse/mcp-clickhouse
- Connects to
- ClickHouse
Install the ClickHouse MCP Server
Pick your client. Each tab starts the same local command. Config shapes checked against each client's docs on 2026-10-25.
Needs CLICKHOUSE_HOST, CLICKHOUSE_USER (replace the ... with your value).
Run in a terminal. Everything after -- is the command that starts the server. docs
claude mcp add --transport stdio --env CLICKHOUSE_HOST=... --env CLICKHOUSE_USER=... clickhouse -- uvx mcp-clickhouse
Claude Desktop only: Settings > Developer > Edit Config opens claude_desktop_config.json. Add this, save and restart the app. docs
{
"mcpServers": {
"clickhouse": {
"command": "uvx",
"args": [
"mcp-clickhouse"
],
"env": {
"CLICKHOUSE_HOST": "...",
"CLICKHOUSE_USER": "..."
}
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project), or use the install button. docs
{
"mcpServers": {
"clickhouse": {
"command": "uvx",
"args": [
"mcp-clickhouse"
],
"env": {
"CLICKHOUSE_HOST": "...",
"CLICKHOUSE_USER": "..."
}
}
}
}Add to .vscode/mcp.json (note the "servers" key and the type), or use the install button. Command Palette > "MCP: Open User Configuration" for all workspaces. docs
{
"servers": {
"clickhouse": {
"type": "stdio",
"command": "uvx",
"args": [
"mcp-clickhouse"
],
"env": {
"CLICKHOUSE_HOST": "...",
"CLICKHOUSE_USER": "..."
}
}
}
}Run codex mcp add --env CLICKHOUSE_HOST=... --env CLICKHOUSE_USER=... clickhouse -- uvx mcp-clickhouse, or add this to ~/.codex/config.toml. docs
[mcp_servers.clickhouse] command = "uvx" args = ["mcp-clickhouse"] [mcp_servers.clickhouse.env] CLICKHOUSE_HOST = "..." CLICKHOUSE_USER = "..."
Run in a terminal (-s user adds it for all projects; the default is this project). docs
gemini mcp add -s user -e CLICKHOUSE_HOST=... -e CLICKHOUSE_USER=... clickhouse uvx mcp-clickhouse
Run in a terminal; it writes ~/.copilot/mcp-config.json. docs
copilot mcp add --env CLICKHOUSE_HOST=... --env CLICKHOUSE_USER=... clickhouse -- uvx mcp-clickhouse
Add to mcp_config.json: ~/.config/devin/mcp_config.json on macOS and Linux (older installs: ~/.codeium/windsurf/mcp_config.json), %APPDATA%\devin\ on Windows. docs
{
"mcpServers": {
"clickhouse": {
"command": "uvx",
"args": [
"mcp-clickhouse"
],
"env": {
"CLICKHOUSE_HOST": "...",
"CLICKHOUSE_USER": "..."
}
}
}
}Add to Zed's settings.json (or Settings > AI > MCP Servers > Add Server). Remote servers without an Authorization header sign in with OAuth. docs
{
"context_servers": {
"clickhouse": {
"command": "uvx",
"args": [
"mcp-clickhouse"
],
"env": {
"CLICKHOUSE_HOST": "...",
"CLICKHOUSE_USER": "..."
}
}
}
}Add to opencode.json in the project (or ~/.config/opencode/opencode.json). docs
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"clickhouse": {
"type": "local",
"command": [
"uvx",
"mcp-clickhouse"
],
"enabled": true,
"environment": {
"CLICKHOUSE_HOST": "...",
"CLICKHOUSE_USER": "..."
}
}
}
}Add to ~/.kiro/settings/mcp.json (all projects) or .kiro/settings/mcp.json (this project). docs
{
"mcpServers": {
"clickhouse": {
"command": "uvx",
"args": [
"mcp-clickhouse"
],
"env": {
"CLICKHOUSE_HOST": "...",
"CLICKHOUSE_USER": "..."
}
}
}
}MCP Servers > Configure > Configure MCP Servers opens cline_mcp_settings.json; add this entry. docs
{
"mcpServers": {
"clickhouse": {
"command": "uvx",
"args": [
"mcp-clickhouse"
],
"env": {
"CLICKHOUSE_HOST": "...",
"CLICKHOUSE_USER": "..."
}
}
}
}Security notes
- The local server runs with your user's permissions (uvx downloads it from PyPI on first run).
- Needs CLICKHOUSE_HOST and CLICKHOUSE_USER.
- Connect it to a development database or a read-only user first: the model can run writes and deletes if the credentials allow them.
Alternatives
- MCP Toolbox for Databasesofficial · ★ 17k
One server for Postgres, MySQL, SQL Server, BigQuery, AlloyDB, Spanner and more, with tools you define in YAML.
- Convexofficial · ★ 13k
Read tables, run functions and inspect logs of a Convex deployment.
- Firebaseofficial · ★ 4.5k
Firestore, Auth, Data Connect, Storage and Remote Config tools, built into the Firebase CLI.
- Supabaseofficial · ★ 3k
Query Postgres, manage tables, migrations, edge functions and branches in your Supabase projects.
- Qdrantofficial · ★ 1.6k
Store and search memories in a Qdrant vector collection.
- SQL MCP Server (Data API builder)official · ★ 1.5k
Self-hosted server that exposes chosen SQL tables, views and procedures as safe CRUD tools.
- MongoDBofficial · ★ 1.2k
Query and manage MongoDB databases and Atlas clusters.
- Neo4jofficial · ★ 989
Run Cypher queries, model graph data and store agent memory in Neo4j.
FAQ
What does the ClickHouse MCP Server do?+
Run read-only SQL against ClickHouse and list databases and tables.
Is the ClickHouse MCP server official?+
Official: built and maintained by ClickHouse.
How do I add ClickHouse to Claude Code?+
Run: claude mcp add --env CLICKHOUSE_HOST=... --env CLICKHOUSE_USER=... --transport stdio clickhouse -- uvx mcp-clickhouse. Add --scope project to share it with your team through .mcp.json.
How do I use the ClickHouse MCP server in Cursor or VS Code?+
Open the Cursor or VS Code tab above: it has the mcp.json entry and a one-click install link. Cursor uses the "mcpServers" key; VS Code uses "servers" and needs a type ("stdio").
Does ClickHouse work in ChatGPT and claude.ai?+
No: it runs locally over stdio, and ChatGPT and claude.ai only connect to remote servers. Use it in Claude Desktop, Claude Code, Cursor, VS Code or another client that can start a local process.
What are the alternatives to the ClickHouse MCP server?+
Other database MCP servers: MCP Toolbox for Databases, Convex, Firebase, Supabase and Qdrant.