A Model Context Protocol server for ClickHouse database queries, schema exploration, and documentation search with vector embeddings
ClickHouse MCP has 9 tools with mixed quality. Tool names start with action verbs (good), but descriptions vary significantly in completeness. Most tools have schemas with typed parameters and descriptions, but output schemas are not documented. Error handling is minimal, there are no recovery guides or error classification patterns. Several tools accept free-form strings where enums would be safer. The server demonstrates basic competence but lacks production-grade polish expected at 70+.
Explain a ClickHouse query using multiple optional EXPLAIN types (PLAN, PIPELINE, ESTIMATE) and return the combined results.
Get the schema of a ClickHouse table including table name, columns, their types, and whether they allow NULL.
Get the list of tables from a specific database or all databases. Use the database parameter to specify a database (default is 'default') or set databases='all' to query tables from all available databases (default, benchmark, misc).
Get the ClickHouse query by its name. Also optionally return the list of parameters from params.json and the performance samples from the ClickHouse system table.
Get the list of slow queries from the ClickHouse system table. Returns query text, execution time, rows read, and bytes read for slow queries.
Output schemas not documented. Tools return results but LLM has no formal specification of response structure (field names, types, nesting). Forces LLMs to infer output shape from examples or discover by trial.
No error handling guidance. Code catches exceptions and returns messages like 'Clickhouse error' but does not classify errors as retryable/user-fixable/fatal or suggest recovery actions. LLM cannot determine what to do next on failure.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 57 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 39 | - | v1 |
Lint a ClickHouse SQL query using SQLFluff.
Returns a guide on how to use the ClickHouse tools.
Runs a ClickHouse query and returns the result as a JSON (and optionally a file).
Perform a semantic search over ClickHouse documentation.
explain_types parameter accepts free-form array without constraint validation. Accepts enum ['PLAN', 'PIPELINE', 'ESTIMATE'] but does not validate; LLM could pass invalid types like ['INVALID', 'PLAN']. Should either enforce enum in schema or return clear error on invalid input.
run_clickhouse_query description does not warn about state-modifying queries. Tool name suggests read-only but could execute INSERT, UPDATE, DELETE without warning. Description should clarify: 'WARNING: Runs arbitrary ClickHouse queries, including mutations. Use only for SELECT queries unless you intend to modify data.'
get_clickhouse_tables description mentions 'databases=all' parameter but schema shows 'database' (singular). Mismatch between doc and actual parameter name will confuse LLM and cause failures.
semantic_search_docs has minimal description (32 chars). Does not explain what 'semantic' means, what documentation is indexed, expected latency, or when to use this vs other tools. Too brief to guide LLM selection.
No pagination support. Tools like get_clickhouse_tables and get_query_execution_stats return lists but do not document limits or pagination. If a table list is large, response could exhaust context window without LLM knowing it's truncated.
No input validation documented. Parameters accept arbitrary strings (database_name, query, query_name). No validation rules documented for format, length, or SQL injection prevention. LLM cannot know what constitutes valid input.