ClickHouse

v0.8.0
io.github.ClickHouse/mcp-clickhouse Checked 15 hours ago Published 1 day ago

Official ClickHouse MCP server for querying and exploring ClickHouse clusters and chDB.

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

list_databases List Databases

List available ClickHouse databases

list_tables List Tables

List available ClickHouse tables in a database, including schema, comment, row count, and column count. Integers outside [-9007199254740991, 9007199254740991] in table metadata are returned as decimal strings. Pagination tokens are single-use and retained for up to one hour.

ParameterTypeDescription
database *stringThe database to list tables from
include_detailed_columnsbooleanWhether to include detailed column metadata (default: True). When False, the columns array will be empty but create_table_query still contains all column information. This reduces payload size for lar…
likeOptional LIKE pattern to filter table names
not_likeOptional NOT LIKE pattern to exclude table names
page_sizeintegerNumber of tables to return per page (default: 50, must be greater than 0)
page_tokenSingle-use token from a previous call, retained for up to one hour

run_query Run Query

Execute SQL queries in ClickHouse. Queries run in read-only mode by default. Bind optional params by name with {name:Type} placeholders, such as {name:String} or {vector:Array(Float32)}. Values may be JSON scalars, nulls, or arrays. Pass exact large integers as decimal strings. JSON lists and objects cannot bind to Tuple and Map types. Python percent formatting and $name$ raw binary parameters are not supported. Parameter values stay out of the MCP server's normal SQL log lines, but may appear in errors and backend logs. Set CLICKHOUSE_ALLOW_WRITE_ACCESS=true to allow DDL and DML operations. S…

ParameterTypeDescription
query *string
params