mcp-clickhouse
A Model Context Protocol server for . It lets an MCP-capable client (Claude Desktop, Claude Code, etc.) explore schemas, run analytical queries, and manage the database — with behaviour controlled entirely by flags.
Potencia tu agente
El comando propio del publicador. No es un endpoint de PlugMCP.
Host a copy with our keys and logs.
npx -y @dockndevai/[email protected]Claude Code no tiene enlace de instalación para un comando local. Copia el comando de abajo y ejecútalo en una terminal.
CLICKHOUSE_URL=<value> CLICKHOUSE_USER=<value> CLICKHOUSE_PASSWORD=<secret> CLICKHOUSE_MODE=<value> claude mcp add io.github.dockndevai-mcp-clickhouse -- npx -y @dockndevai/mcp-clickhouse@0.3.0Ejecútalo en una terminal.
{ "mcpServers": { "io.github.dockndevai-mcp-clickhouse": { "command": "npx", "args": [ "-y", "@dockndevai/[email protected]" ], "env": { "CLICKHOUSE_URL": "<value>", "CLICKHOUSE_USER": "<value>", "CLICKHOUSE_PASSWORD": "<secret>", "CLICKHOUSE_MODE": "<value>" } } }}claude_desktop_config.json
¿URL remota o un comando en tu máquina? En qué se diferencian las dos instalaciones
Ejecutar en PlugMCP
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
AbrirDel publicador
A Model Context Protocol server for . It lets an MCP-capable client (Claude Desktop, Claude Code, etc.) explore schemas, run analytical queries, and manage the database — with behaviour controlled entirely by flags.
ClickHouse query & management for AI agents — SQL-classified read/write/destructive gating.
The security model is statement-aware: every SQL statement is classified as read, write, or destructive, and gated against the current access mode. Read-only mode additionally runs queries under ClickHouse's own readonly=1 setting.
SHOW CREATE, table stats (parts/rows/bytes), running queries, server metrics, cluster topology.query tool that only accepts read statements, capped at CLICKHOUSE_MAX_ROWS.execute tool for INSERT/CREATE/ALTER (read-write) and DROP/TRUNCATE/DELETE (admin), each gated by classification.read-only → read-write → admin, layered so a mode never exposes statements above its level.Statement classification lives in src/sql.ts and is fail-safe: ALTER … DELETE/UPDATE counts as destructive, and anything unparseable is treated as destructive.
Read (read-only+): list_databases, list_tables, describe_table, show_create_table, table_stats, running_queries, server_metrics, cluster_info, query
Write/Admin (read-write+): execute — runs a single statement after classifying it; writes need read-write mode, destructive statements need admin mode + CLICKHOUSE_ALLOW_DELETE.
Published on npm as @dockndevai/mcp-clickhouse. No clone or build needed — your MCP client runs it on demand with npx. Start in read-only mode; see .env.example for every variable and docs/CLIENTS.md for the full per-client guide.
Claude Code (CLI)
claude mcp add clickhouse -e CLICKHOUSE_URL="http://localhost:8123" -e CLICKHOUSE_USER="default" -e CLICKHOUSE_MODE="read-only" -- npx -y @dockndevai/mcp-clickhouse
Claude Desktop · Cursor · Windsurf — same block in claude_desktop_config.json, .cursor/mcp.json, or ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"clickhouse": {
"command": "npx",
"args": [
"-y",
"@dockndevai/mcp-clickhouse"
],
"env": {
"CLICKHOUSE_URL": "http://localhost:8123",
"CLICKHOUSE_USER": "default",
"CLICKHOUSE_MODE": "read-only"
}
}
}
}
OpenAI Codex CLI — in ~/.codex/config.toml:
[mcp_servers.clickhouse]
command = "npx"
args = ["-y", "@dockndevai/mcp-clickhouse"]
env = { CLICKHOUSE_URL = "http://localhost:8123", CLICKHOUSE_USER = "default", CLICKHOUSE_MODE = "read-only" }
VS Code (GitHub Copilot, Agent mode) — in .vscode/mcp.json:
{
"servers": {
"clickhouse": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@dockndevai/mcp-clickhouse"
],
"env": {
"CLICKHOUSE_URL": "http://localhost:8123",
"CLICKHOUSE_USER": "default",
"CLICKHOUSE_MODE": "read-only"
}
}
}
}
analytics database?"events and run a query for daily counts this week."Prefer the published package above. To run from a clone:
npm install
npm run build
node dist/index.js # with the environment variables set
npm run dev
npm test # SQL classification + security policy (30 tests)
npm run typecheck
This server ships a server.json for the official MCP registry and an mcpName for npm ownership validation. See PUBLISHING.md for publishing to npm and listing on the MCP registry, Smithery, Glama, Cursor, and PulseMCP.
MIT
ClickHouse query & management for AI agents — SQL-classified read/write/destructive gating.
{ "mcpServers": { "io.github.dockndevai-mcp-clickhouse": { "command": "npx", "args": [ "-y", "@dockndevai/[email protected]" ], "env": { "CLICKHOUSE_URL": "<value>", "CLICKHOUSE_USER": "<value>", "CLICKHOUSE_PASSWORD": "<secret>", "CLICKHOUSE_MODE": "<value>" } } }}Herramientas
Aún no hay lista de herramientas. Los servidores remotos la reciben tras la primera comprobación de estado.
Preguntas frecuentes
Copia en esta página la configuración stdio para Cursor, Claude Desktop, Claude Code o VS Code. Usa la instalación del publicador, no un proxy de PlugMCP.
El publicador indica estas variables de entorno: CLICKHOUSE_URL, CLICKHOUSE_USER, CLICKHOUSE_PASSWORD, CLICKHOUSE_MODE.
MCP Clickhouse se ejecuta localmente por stdio.
Última comprobación: 2026-11-09. ClickHouse query & management for AI agents — SQL-classified read/write/destructive gating.