Skip to main content
Glama
ClickHouse MCP Server

ClickHouse MCP Server

by ThomAub

ClickHouse MCP Server

This project implements a Model Context Protocol (MCP) server for ClickHouse, allowing seamless integration of ClickHouse databases with Large Language Models (LLMs) and other AI applications.

Features

  • List ClickHouse databases and tables as resources

  • Retrieve table schemas

  • Execute SELECT queries on ClickHouse databases

  • Secure and efficient communication using the MCP protocol

Related MCP server: ClickHouse MCP Server

Requirements

  • Python 3.10+

  • ClickHouse server

Installation

  1. Clone the repository:

    git clone https://github.com/ThomAub/clickhouse_mcp_server.git
    cd clickhouse_mcp_server
  2. Install the required packages:

    uv sync --all-extras
  3. Set up your ClickHouse connection details in environment variables or update the get_clickhouse_client function in server.py.

Usage

Run the server:

python clickhouse_mcp_server/server.py

The server will start and listen for MCP requests.

Testing

Run the tests using pytest:

pytest tests/

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      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.
      2
      23 PyPI
      2
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      A Model Context Protocol server that enables Large Language Models to access and interact with database connections, including viewing schemas and performing CRUD operations on connected databases.
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      A Model Context Protocol server that enables LLMs like Claude to interact with SQLite and SQL Server databases, allowing for schema inspection and SQL query execution.
      782 npm
      391
      MIT