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.
Power your agent
Perintah milik penerbit sendiri. Bukan endpoint PlugMCP.
Host a copy with our keys and logs.
npx -y @dockndevai/[email protected]Claude Code tidak punya tautan instal untuk perintah lokal. Salin perintah di bawah dan jalankan di 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.0Jalankan di 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 remote atau perintah di mesin Anda? Perbedaan kedua cara instal
Jalankan di 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.
BukaDari penerbit
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>" } } }}Tool
Belum ada daftar tool. Server remote mendapatkannya setelah pemeriksaan kesehatan pertama.
FAQ
Salin konfigurasi stdio untuk Cursor, Claude Desktop, Claude Code, atau VS Code di halaman ini. Konfigurasi ini memakai instalasi dari penerbit, bukan proxy PlugMCP.
Penerbit mencantumkan variabel lingkungan berikut: CLICKHOUSE_URL, CLICKHOUSE_USER, CLICKHOUSE_PASSWORD, CLICKHOUSE_MODE.
MCP Clickhouse berjalan secara lokal melalui stdio.
Terakhir diperiksa 2026-11-09. ClickHouse query & management for AI agents — SQL-classified read/write/destructive gating.