ClickHouse MCP Server

by iskakaushik

Integrations

  • Allows querying and interacting with ClickHouse databases, providing tools for executing SQL select queries, listing databases, and viewing tables within a database.

ClickHouse MCP Server

Migrated to https://github.com/ClickHouse/mcp-clickhouse

An MCP server for ClickHouse.

Features

Tools

  • run_select_query
    • Execute SQL queries on your ClickHouse cluster.
    • Input: sql (string): The SQL query to execute.
    • All ClickHouse queries are run with readonly = 1 to ensure they are safe.
  • list_databases
    • List all databases on your ClickHouse cluster.
  • list_tables
    • List all tables in a database.
    • Input: database (string): The name of the database.

Configuration

Note: This is a temporary configuration process that will be significantly improved once the package is published.

  1. Run uv sync to install the dependencies. To install uv follow the instructions here. Then do source .venv/bin/activate.
  2. Setup the .env.production file with the ClickHouse credentials.
CLICKHOUSE_HOST=<CLICKHOUSE_HOST> CLICKHOUSE_PORT=<CLICKHOUSE_PORT> CLICKHOUSE_USER=<CLICKHOUSE_USER> CLICKHOUSE_PASSWORD=<CLICKHOUSE_PASSWORD>
  1. Run fastmcp install mcp_clickhouse/mcp_server.py -f .env.production to install the server.
  2. Restart Claude Desktop.

Development

  1. In test-services directory run docker compose up -d to start the ClickHouse cluster.
  2. Add the following variables to a .env file in the root of the repository.
CLICKHOUSE_HOST=localhost CLICKHOUSE_PORT=8123 CLICKHOUSE_USER=default CLICKHOUSE_PASSWORD=clickhouse
  1. Run uv sync to install the dependencies. To install uv follow the instructions here. Then do source .venv/bin/activate.
  2. For easy testing, you can run fastmcp dev mcp_clickhouse/mcp_server.py to start the MCP server.

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

An MCP server for ClickHouse.

  1. Migrated to https://github.com/ClickHouse/mcp-clickhouse
    1. Features
    2. Configuration
    3. Development

Related MCP Servers

  • A
    security
    A
    license
    A
    quality
    MCP Server for the ClickUp API,
    Last updated -
    4
    7
    1
    TypeScript
    MIT License
  • -
    security
    A
    license
    -
    quality
    An MCP server implementation that enables Claude AI to interact with Clickhouse databases. Features include secure database connections, query execution, read-only mode support, and multi-query capabilities.
    Last updated -
    Python
    MIT License
    • Apple
  • -
    security
    A
    license
    -
    quality
    A MCP server that provides browser automation tools, allowing users to navigate websites, take screenshots, click elements, fill forms, and execute JavaScript through Playwright.
    Last updated -
    Python
    Apache 2.0
    • Apple

View all related MCP servers

ID: 9292900sx1