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.
Public tool metadata for what this MCP can expose to an agent.
get_clickpipeReturns the specified ClickPipe.3 paramsReturns the specified ClickPipe.
serviceIdstringclickPipeIdstringorganizationIdstringget_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 paramsExecutes 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.
querystringserviceIdstringtimeoutSecondsintegerlist_databasesRetrieves all databases available in a ClickHouse service.1 paramsRetrieves all databases available in a ClickHouse service.
serviceIdstringlist_tablesRetrieves a comprehensive list of tables in a ClickHouse database, including columns.4 paramsRetrieves a comprehensive list of tables in a ClickHouse database, including columns.
likestringnotLikestringdatabasestringserviceIdstringget_services_listRetrieves all services in a ClickHouse Cloud organization.1 paramsRetrieves all services in a ClickHouse Cloud organization.
organizationIdstringget_organization_detailsReturns details of a single organization. The auth key must belong to the organization.1 paramsReturns details of a single organization. The auth key must belong to the organization.
organizationIdstringget_service_detailsReturns a service that belongs to the organization.2 paramsReturns a service that belongs to the organization.
serviceIdstringorganizationIdstringlist_clickpipesRetrieves all ClickPipes configured for a specific service.2 paramsRetrieves all ClickPipes configured for a specific service.
serviceIdstringorganizationIdstringlist_service_backupsReturns a list of all backups for the service. The most recent backups comes first in the list.2 paramsReturns a list of all backups for the service. The most recent backups comes first in the list.
serviceIdstringorganizationIdstringget_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 paramsRetrieves 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).
to_datestringfrom_datestringorganizationIdstringget_service_backup_detailsReturns a single backup info.3 paramsReturns a single backup info.
backupIdstringserviceIdstringorganizationIdstringget_service_backup_configurationReturns the service backup configuration.2 paramsReturns the service backup configuration.
serviceIdstringorganizationIdstringmcp-name: io.github.Aguantar/clickhouse-dataops-mcp
A DataOps-focused MCP server for ClickHouse with query optimization, pipeline latency analysis, and data quality monitoring.
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 warningsch_explain_query — EXPLAIN-based analysis with optimization suggestionsch_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 checksch_slow_queries — Slow query detection with root cause diagnosisch_disk_usage — Disk analysis with TTL and optimization recommendationsch_list_tables — Table catalog with built-in descriptionsAll queries are read-only. DDL/DML operations are blocked at the SQL validation layer:
DROP, TRUNCATE, DELETE, ALTER, INSERT, UPDATE, CREATE, etc.; separator)pip install clickhouse-dataops-mcp
Add to your .mcp.json:
{
"mcpServers": {
"clickhouse": {
"command": "clickhouse-mcp-server",
"env": {
"CLICKHOUSE_HOST": "localhost",
"CLICKHOUSE_PORT": "8123",
"CLICKHOUSE_DATABASE": "cdc_pipeline"
}
}
}
}
| 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 |
MIT
CLICKHOUSE_HOSTClickHouse HTTP host
CLICKHOUSE_PORTClickHouse HTTP port
CLICKHOUSE_PASSWORDsecretClickHouse password
explorium-ai/vibeprospecting-mcp
io.github.compuute/lead-enrichment
dev.workers.selbyventurecap.cf-worker/apollo-salesforce-mapper
io.github.br0ski777/company-enrichment
com.mcparmory/apollo
mambalabsdev/mcp-gtm-tech-stack-signal-scraper