An MCP server that lets AI agents safely query a ClickHouse database with read-only access controls.
Server has 4 well-named tools with clear descriptions and proper input schemas using Zod. All tools are read-only with security annotations. However, output schemas are not formally documented, responses are returned as text/JSON without explicit schema declarations. Parameter descriptions are present but some lack detail on constraints (e.g., 'interval' enum values not explained in description). Error handling is present but generic; recovery guidance is minimal. Tool composition is sound (each does one thing), but the aggregate tool's optional parameters create complexity that could be better documented.
Build and run a time-windowed aggregation query without writing raw SQL. Specify a table, metric column, aggregation function, and optional time column with interval for grouping.
Get the schema of a specific ClickHouse table: column names, types, default expressions, and a sample of up to 3 rows.
List all tables in the connected ClickHouse database with their engine type and row count.
Execute a read-only SQL query against ClickHouse. Only SELECT, WITH (CTE), SHOW, DESCRIBE, EXISTS, and EXPLAIN statements are allowed. Results are cached for 60s. A maximum row limit of 1000 is enforced (or lower if scoped).
Output schemas not formally documented. Tools return text/JSON responses without explicit schema declarations. LLMs cannot reliably parse or chain results.
aggregate tool has 6 parameters with 2 optional and interdependent (timeColumn + interval). Dependencies not explicitly documented; LLMs may pass timeColumn without interval or vice versa.
Error messages are generic ('Query error:', 'Validation error:') without actionable recovery guidance. LLMs cannot determine if error is retryable or requires user intervention.
Parameter descriptions lack format/constraint details. E.g., 'interval' enum values (minute, hour, day, week, month) are in schema but not explained in description text. LLMs may not understand when each is appropriate.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 58 | <=2025-11-25 | v2 |
run_query description mentions '1000 row limit' but does not explain what happens when limit is exceeded (truncation? error?). Behavior is ambiguous to LLMs.