ClickHouse MCP Server
An MCP server for ClickHouse.
Features
ClickHouse Tools
run_query- Execute SQL queries on your ClickHouse cluster.
- Input:
query(string): The SQL query to execute. - Queries run in read-only mode by default (
CLICKHOUSE_ALLOW_WRITE_ACCESS=false), but writes can be enabled explicitly if needed.
list_databases- List all databases on your ClickHouse cluster.
list_tables- List tables in a database with pagination.
- Required input:
database(string). - Optional inputs:
like/not_like(string): ApplyLIKEorNOT LIKEfilters to table names.page_token(string): Token returned by a previous call for fetching the next page.page_size(int, default50): Number of tables returned per page.include_detailed_columns(bool, defaulttrue): Whenfalse, omits column metadata for lighter responses while keeping the fullcreate_table_query.
- Response shape:
tables: Array of table objects for the current page.next_page_token: Pass this value back to fetch the next page, ornullwhen there are no more tables.total_tables: Total count of tables that match the supplied filters.






