Mcp Clickhouse banner
ClickHouse ClickHouse

Mcp Clickhouse

AI community

Description

Connect ClickHouse to your AI assistants.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

ClickHouse MCP Server

[![PyPI - Version](https://img.shields.io/pypi/v/mcp-clickhouse)](https://pypi.org/project/mcp-clickhouse)

An MCP server for ClickHouse.

mcp-clickhouse MCP server

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): Apply LIKE or NOT LIKE filters to table names.
      • page_token (string): Token returned by a previous call for fetching the next page.
      • page_size (int, default 50): Number of tables returned per page.
      • include_detailed_columns (bool, default true): When false, omits column metadata for lighter responses while keeping the full create_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, or null when there are no more tables.
      • total_tables: Total count of tables that match the supplied filters.

chDB Tools

  • run_chdb_select_query
    • Execute SQL queries using chDB's embedded ClickHouse engine.
    • Input: query (string): The SQL query to execute.
    • Query data directly from various sources (files, URLs, databases) without ETL processes.
    • Requires the optional chdb extra: pip install 'mcp-clickhouse[chdb]'

Health Check Endpoint

When running with HTTP or SSE transport, a