Skip to main content

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

Project description

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

Variable Default Description
CLICKHOUSE_HOST localhost ClickHouse HTTP host
CLICKHOUSE_PORT 8123 ClickHouse HTTP port
CLICKHOUSE_USER default ClickHouse username
CLICKHOUSE_PASSWORD (empty) ClickHouse password
CLICKHOUSE_DATABASE cdc_pipeline Default database
CLICKHOUSE_QUERY_TIMEOUT 30 Query timeout in seconds

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

clickhouse_dataops_mcp-0.1.1.tar.gz (15.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

clickhouse_dataops_mcp-0.1.1-py3-none-any.whl (20.4 kB view details)

Uploaded Python 3

File details

Details for the file clickhouse_dataops_mcp-0.1.1.tar.gz.

File metadata

  • Download URL: clickhouse_dataops_mcp-0.1.1.tar.gz
  • Upload date:
  • Size: 15.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for clickhouse_dataops_mcp-0.1.1.tar.gz
Algorithm Hash digest
SHA256 fe3ce0d718635bb8170f51b28e65b1e3ebd1dd484bec2ceae765d067e9f65064
MD5 3b8f59ec17f00343b62abc536c18dabe
BLAKE2b-256 3f6e62674467ca689f0c4d47763cc349e7c766bef465dcfc72074830d0185d3a

See more details on using hashes here.

File details

Details for the file clickhouse_dataops_mcp-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: clickhouse_dataops_mcp-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 20.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for clickhouse_dataops_mcp-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6ed6a48bc78ad65d9a73bacc462aebd6c83eeb083aecf5c95badc583a61725b1
MD5 9ea6c13a341eb02d2466c6ae351f9316
BLAKE2b-256 a7d65b83fc829d12dc401db0abfaceda8e2cf82b89c67e7e011b891357504cb4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page