mcp-clickhouse
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| CLICKHOUSE_URL | Yes | The URL of the ClickHouse server, e.g. http://clickhouse:8123 | |
| CLICKHOUSE_MODE | No | Access mode: read-only, read-write, or admin | read-only |
| CLICKHOUSE_USER | Yes | The username for the ClickHouse connection | |
| CLICKHOUSE_DRY_RUN | No | When true, write/destructive statements are validated and logged but not executed | false |
| CLICKHOUSE_MAX_ROWS | No | Hard cap on the number of rows returned to the model | 1000 |
| CLICKHOUSE_PASSWORD | Yes | The password for the ClickHouse connection | |
| CLICKHOUSE_AUDIT_LOG | No | Emits a JSON audit line to stderr for each guarded operation | true |
| CLICKHOUSE_ALLOW_DELETE | No | Whether destructive SQL statements (DROP, TRUNCATE, DELETE) are allowed | false |
| CLICKHOUSE_DATABASE_ALLOWLIST | No | Comma-separated list of databases that the server is allowed to operate on | |
| CLICKHOUSE_PROTECTED_DATABASES | No | Comma-separated list of databases that are read-only and can never be mutated | system,information_schema |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_databasesA | List databases and their engines. |
| list_tablesB | List tables in a database with engine, row count, and size. |
| describe_tableA | Column names, types, defaults, and comments for a table. |
| show_create_tableB | Return the full CREATE TABLE statement (schema, engine, settings) for a table. |
| table_statsB | Part count, row count, on-disk size, and time range from system.parts. |
| running_queriesA | Currently executing queries from system.processes (id, user, elapsed, memory). |
| server_metricsA | Non-zero metrics from system.metrics (connections, merges, memory, etc.). |
| cluster_infoA | Cluster topology from system.clusters (shards, replicas, hosts). |
| queryA | Run a SELECT/SHOW/DESCRIBE query and return rows. Non-read statements are refused here — use |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 9 tools
Each tool targets a fairly distinct area: table listing, column metadata, DDL, stats, and system introspection. The main overlap is that `query` can also run SHOW/DESCRIBE and thus partially duplicates `describe_table`, `show_create_table`, `list_databases`, and `list_tables`, though dedicated tools provide clearer structured output.
All names are snake_case, but the conventions are mixed: verb_noun forms (`list_tables`, `describe_table`, `show_create_table`), noun phrases (`table_stats`, `cluster_info`, `running_queries`, `server_metrics`), and a lone verb (`query`). Readable but not a predictable pattern.
Nine tools is well-scoped for a ClickHouse introspection and query server. Each tool has a clear place, and there is no obvious bloat or missing category within the read-oriented surface.
Read-side coverage is solid (databases, tables, schema, stats, queries, cluster, metrics). However, the `query` description explicitly says non-read statements must use an `execute` tool, which is absent, leaving writes/DDL as a dead end and creating an inconsistent tool surface.