mcp-clickhouse

v0.3.0
io.github.dockndevai/mcp-clickhouse Checked 51 minutes ago Published 2 months ago

ClickHouse query & management for AI agents — SQL-classified read/write/destructive gating.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_databases List databases

List databases and their engines.

list_tables List tables

List tables in a database with engine, row count, and size.

ParameterTypeDescription
database *stringDatabase name

describe_table Describe table

Column names, types, defaults, and comments for a table.

ParameterTypeDescription
database *stringDatabase name
table *stringTable name

show_create_table Show CREATE TABLE

Return the full CREATE TABLE statement (schema, engine, settings) for a table.

ParameterTypeDescription
database *stringDatabase name
table *stringTable name

table_stats Table stats

Part count, row count, on-disk size, and time range from system.parts.

ParameterTypeDescription
database *stringDatabase name
table *stringTable name

running_queries Running queries

Currently executing queries from system.processes (id, user, elapsed, memory).

server_metrics Server metrics

Non-zero metrics from system.metrics (connections, merges, memory, etc.).

cluster_info Cluster info

Cluster topology from system.clusters (shards, replicas, hosts).

query Run a read-only query

Run a SELECT/SHOW/DESCRIBE query and return rows. Non-read statements are refused here — use `execute` (read-write mode) for those. Results are capped at CLICKHOUSE_MAX_ROWS.

ParameterTypeDescription
sql *stringA single read-only SQL statement