aguantar avatar

Clickhouse Dataops Mcp

aguantar/clickhouse-mcp-server

This server connects Claude to ClickHouse with a focus on query optimization and pipeline monitoring rather than just raw query execution. It exposes tools like ch_explain_query for EXPLAIN-based analysis with optimization suggestions, ch_pipeline_latency for CDC pipeline performance tracking, and ch_data_quality for null and duplicate detection. All operations are read-only with validation that blocks DDL, DML, and multi-statement queries. You'd reach for this when you need Claude to help diagnose slow queries, analyze data quality issues, or optimize ClickHouse table schemas. It includes built-in safeguards like 30-second timeouts and system table allowlists, making it safer for production database analysis.

tools
13
auth
Secret needed
transport
STDIO
env vars
3
last updated
Mar 19, 2026

Tools

13 tools

Public tool metadata for what this MCP can expose to an agent.

get_clickpipeReturns the specified ClickPipe.3 params

Returns the specified ClickPipe.

Parameters* required
clickPipeIdstring
ID of the requested ClickPipe
organizationIdstring
ID of the organization that owns the service
serviceIdstring
ID of the service that owns the ClickPipe
get_organizationsRetrieves all accessible ClickHouse Cloud organizations.

Retrieves all accessible ClickHouse Cloud organizations.

No parameter schema in public metadata yet.

run_select_queryExecutes a SELECT query against a ClickHouse service. Runs a read-only SELECT query on the specified ClickHouse service via the Query API endpoint. This function provides direct access to database content through SQL queries while ensuring that only read operations are permitted.3 params

Executes a SELECT query against a ClickHouse service. Runs a read-only SELECT query on the specified ClickHouse service via the Query API endpoint. This function provides direct access to database content through SQL queries while ensuring that only read operations are permitted.

Parameters* required
querystring
A valid ClickHouse SQL SELECT query string
serviceIdstring
The unique identifier of the ClickHouse service
timeoutSecondsinteger
Maximum time in seconds to wait for the query to complete. Defaults to 300 (5 minutes), maximum is 3600 (1 hour). Use lower values for simple queries and higher values for complex analytical queries.
list_databasesRetrieves all databases available in a ClickHouse service.1 params

Retrieves all databases available in a ClickHouse service.

Parameters* required
serviceIdstring
list_tablesRetrieves a comprehensive list of tables in a ClickHouse database, including columns.4 params

Retrieves a comprehensive list of tables in a ClickHouse database, including columns.

Parameters* required
databasestring
Name of the database to list tables from
likestring
Optional SQL LIKE pattern to filter tables by name (e.g., "events_%")
notLikestring
Optional SQL LIKE pattern to exclude tables by name
serviceIdstring
The unique identifier of the ClickHouse service
get_services_listRetrieves all services in a ClickHouse Cloud organization.1 params

Retrieves all services in a ClickHouse Cloud organization.

Parameters* required
organizationIdstring
ID of the organization whose services are to be listed
get_organization_detailsReturns details of a single organization. The auth key must belong to the organization.1 params

Returns details of a single organization. The auth key must belong to the organization.

Parameters* required
organizationIdstring
ID of the organization to retrieve
get_service_detailsReturns a service that belongs to the organization.2 params

Returns a service that belongs to the organization.

Parameters* required
organizationIdstring
ID of the organization
serviceIdstring
ID of the service to retrieve
list_clickpipesRetrieves all ClickPipes configured for a specific service.2 params

Retrieves all ClickPipes configured for a specific service.

Parameters* required
organizationIdstring
ID of the organization
serviceIdstring
ID of the service to list ClickPipes for
list_service_backupsReturns a list of all backups for the service. The most recent backups comes first in the list.2 params

Returns a list of all backups for the service. The most recent backups comes first in the list.

Parameters* required
organizationIdstring
ID of the organization
serviceIdstring
ID of the service to list backups for
get_organization_costRetrieves billing and usage cost data for a ClickHouse Cloud organization. Returns a grand total and a list of daily, per-entity organization usage cost records for the organization in the queried time period (maximum 31 days).3 params

Retrieves billing and usage cost data for a ClickHouse Cloud organization. Returns a grand total and a list of daily, per-entity organization usage cost records for the organization in the queried time period (maximum 31 days).

Parameters* required
from_datestring
Start date for the report, e.g. 2024-12-19 (YYYY-MM-DD)
organizationIdstring
The unique identifier of the organization
to_datestring
End date (inclusive) for the report, e.g. 2024-12-20 (YYYY-MM-DD). Cannot be more than 30 days after from_date.
get_service_backup_detailsReturns a single backup info.3 params

Returns a single backup info.

Parameters* required
backupIdstring
ID of the backup
organizationIdstring
ID of the organization that owns the service
serviceIdstring
ID of the service
get_service_backup_configurationReturns the service backup configuration.2 params

Returns the service backup configuration.

Parameters* required
organizationIdstring
ID of the organization that owns the service
serviceIdstring
ID of the service

Sponsors

Configuration

CLICKHOUSE_HOST

ClickHouse HTTP host

CLICKHOUSE_PORT

ClickHouse HTTP port

CLICKHOUSE_PASSWORDsecret

ClickHouse password

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:


View the full README on GitHub

Details

Repository
github.com/aguantar/clickhouse-mcp-server
Categories
Sales & Marketing, Databases, Automation & Workflows
Package
clickhouse-dataops-mcp
Transport
STDIO
Auth
Required
Registry
MCP registry, active

More from aguantar

Related Sales & Marketing MCP servers

View all
1argo-rpg-platform avatarArgo Mcpargo-rpg-platform/mcpMCP server for Argo RPG Platform — connects AI assistants to campaign data via OAuth20stars
2br0ski777 avatarKeyword Research APIbr0ski777/keyword-research-x402SEO keyword research with Google Suggest, intent scoring, long-tail discovery. x402.0stars
3incwo avatarIncwo MCPio.github.incwo/incwoSecure MCP server for exploring incwo CRM data, documents, and email workflows.0stars
4indotender avatarIndoTenderindotender/indotender-mcpIndonesian government procurement — LPSE tenders, Inaproc data, and company profiles.0stars
5introman2023 avatarTonzar B2B Russian Export Marketplaceintroman2023/tonzar-mcpSearch 160k+ Russian B2B products from 8,900+ verified manufacturers (EN/RU).0stars
6ivanolegvak avatarSONAR: KYB due diligenceivanolegvak/getsonar-mcpCompany register lookups and KYB checks: registries, sanctions, PEP, offshore leaks, adverse media.0stars