Back to Browse

Clickhouse MCP Server

Data & AnalyticsModerate7.0MCP RegistryLocal
Free

Server data from the Official MCP Registry

DataOps ClickHouse MCP server with query optimization and pipeline monitoring

About

DataOps ClickHouse MCP server with query optimization and pipeline monitoring

Security Report

7.0
Moderate7.0Low Risk

Valid MCP server (1 strong, 4 medium validity signals). 3 known CVEs in dependencies (0 critical, 3 high severity) Package registry verified. Imported from the Official MCP Registry.

12 files analyzed · 4 issues found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

What You'll Need

Set these up before or after installing:

ClickHouse HTTP hostOptional

Environment variable: CLICKHOUSE_HOST

ClickHouse HTTP portOptional

Environment variable: CLICKHOUSE_PORT

ClickHouse passwordRequired

Environment variable: CLICKHOUSE_PASSWORD

How to Install

Add this to your MCP configuration file:

{
  "mcpServers": {
    "io-github-aguantar-clickhouse-dataops-mcp": {
      "env": {
        "CLICKHOUSE_HOST": "your-clickhouse-host-here",
        "CLICKHOUSE_PORT": "your-clickhouse-port-here",
        "CLICKHOUSE_PASSWORD": "your-clickhouse-password-here"
      },
      "args": [
        "clickhouse-dataops-mcp"
      ],
      "command": "uvx"
    }
  }
}

Documentation

View on GitHub

From the project's GitHub README.

clickhouse-dataops-mcp

mcp-name: io.github.Aguantar/clickhouse-dataops-mcp

A DataOps-focused MCP server for ClickHouse with query optimization, pipeline latency analysis, and data quality monitoring.

Features

Unlike generic ClickHouse MCP servers that only run queries, this server acts as a query optimization advisor:

  • ch_query — Execute SELECT with automatic partition pruning warnings
  • ch_explain_query — EXPLAIN-based analysis with optimization suggestions
  • ch_table_schema — Comprehensive table metadata (columns, keys, partitions, samples)
  • ch_pipeline_latency — CDC pipeline per-segment latency (p50/p95/p99)
  • ch_data_quality — Null/duplicate/gap detection with market coverage checks
  • ch_slow_queries — Slow query detection with root cause diagnosis
  • ch_disk_usage — Disk analysis with TTL and optimization recommendations
  • ch_list_tables — Table catalog with built-in descriptions

Safety

All queries are read-only. DDL/DML operations are blocked at the SQL validation layer:

  • Blocked: DROP, TRUNCATE, DELETE, ALTER, INSERT, UPDATE, CREATE, etc.
  • Multi-statement queries blocked (; separator)
  • Comment-based bypass prevented (comments stripped before validation)
  • System tables restricted to allowlist
  • Query timeout: 30 seconds
  • Row limit enforcement

Installation

pip install clickhouse-dataops-mcp

Usage with Claude Code

Add to your .mcp.json:

{
  "mcpServers": {
    "clickhouse": {
      "command": "clickhouse-mcp-server",
      "env": {
        "CLICKHOUSE_HOST": "localhost",
        "CLICKHOUSE_PORT": "8123",
        "CLICKHOUSE_DATABASE": "cdc_pipeline"
      }
    }
  }
}

Environment Variables

VariableDefaultDescription
CLICKHOUSE_HOSTlocalhostClickHouse HTTP host
CLICKHOUSE_PORT8123ClickHouse HTTP port
CLICKHOUSE_USERdefaultClickHouse username
CLICKHOUSE_PASSWORD(empty)ClickHouse password
CLICKHOUSE_DATABASEcdc_pipelineDefault database
CLICKHOUSE_QUERY_TIMEOUT30Query timeout in seconds

License

MIT

Reviews

No reviews yet

Be the first to review this server!