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.
Усильте агента
Собственная команда издателя. Не эндпоинт PlugMCP.
Host a copy with our keys and logs.
npx -y @dockndevai/[email protected]У Claude Code нет ссылки для установки локальной команды. Скопируйте команду ниже и выполните её в терминале.
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.0Выполните в терминале.
{ "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 или команда на вашем компьютере? Чем различаются два способа установки
Запустить на 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.
ЗапускОт издателя
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>" } } }}Инструменты
Списка инструментов пока нет. У удалённых серверов он появляется после первой проверки состояния.
FAQ
Скопируйте на этой странице конфигурацию stdio для Cursor, Claude Desktop, Claude Code или VS Code. Она использует установку издателя, а не прокси PlugMCP.
Издатель указывает следующие переменные окружения: CLICKHOUSE_URL, CLICKHOUSE_USER, CLICKHOUSE_PASSWORD, CLICKHOUSE_MODE.
MCP Clickhouse работает локально через stdio.
Последняя проверка: 2026-11-09. ClickHouse query & management for AI agents — SQL-classified read/write/destructive gating.