Enables seamless integration with ClickHouse databases, allowing listing of databases and tables, retrieving table schemas, and executing SELECT queries against ClickHouse data.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ClickHouse MCP Servershow me the top 10 customers by total sales"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
Clone the repository:
git clone https://github.com/ThomAub/clickhouse_mcp_server.git cd clickhouse_mcp_serverInstall the required packages:
uv sync --all-extrasSet up your ClickHouse connection details in environment variables or update the
get_clickhouse_clientfunction inserver.py.
Usage
Run the server:
The server will start and listen for MCP requests.
Testing
Run the tests using pytest:
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License.