ClickHouse MCP Server

by ThomAub

Integrations

  • Enables seamless integration with ClickHouse databases, allowing listing of databases and tables, retrieving table schemas, and executing SELECT queries against ClickHouse data.

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

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.

-
security - not tested
A
license - permissive license
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

A Model Context Protocol server that enables Large Language Models to seamlessly interact with ClickHouse databases, supporting resource listing, schema retrieval, and query execution.

  1. Features
    1. Requirements
      1. Installation
        1. Usage
          1. Testing
            1. Contributing
              1. License

                Related MCP Servers

                • A
                  security
                  A
                  license
                  A
                  quality
                  A Model Context Protocol server that allows Large Language Models to interact with Astra DB databases, providing tools for managing collections and records through natural language commands.
                  Last updated -
                  10
                  115
                  12
                  TypeScript
                  Apache 2.0
                  • Apple
                • -
                  security
                  A
                  license
                  -
                  quality
                  A Model Context Protocol server that enables Large Language Models to interact with ClickUp workspace tasks and data, allowing creation and retrieval of tasks through natural language.
                  Last updated -
                  59
                  TypeScript
                  MIT License
                  • Apple
                • A
                  security
                  F
                  license
                  A
                  quality
                  A Model Context Protocol server that enables large language models to interact with Apache Superset databases through REST API, supporting database queries, table lookups, field information retrieval, and SQL execution.
                  Last updated -
                  4
                  3
                  TypeScript
                • -
                  security
                  F
                  license
                  -
                  quality
                  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.
                  Last updated -
                  TypeScript
                  • Apple

                View all related MCP servers

                ID: bdw529ct5w