Enables secure and structured exploration of ClickHouse databases, allowing AI assistants to list tables, read data, and execute SQL queries through a controlled interface.
The server implementation was inspired by and incorporates code from mcp-server-duckdb, suggesting potential DuckDB database connectivity capabilities.
The server implementation was inspired by and incorporates code from mysql_mcp_server, suggesting potential MySQL database connectivity capabilities.
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 products by sales last month"
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
A Model Context Protocal (MCP) server implement for ClickHouse.
This server provides AI assistants with a secure and structured way to explore and analyze databases. It enables them to list tables, read data, and execute SQL queries through a controlled interface, ensuring responsible database access.
Configuration
Set the following environment variables:
Or via command-line args:
--hostthe database host--portthe database port--userthe database username--passwordthe database password--databasethe database name
Usage
Fake some data in clickhouse
Check the SQL in dev_contribute.md for details.
Related MCP server: ClickHouse MCP Server
Post your question to AI assistant in Cline
CLINE
Configure the MCP server in VSCode, Cline extension, or other MCP client.: Example:
License
APACHE - See LICENSE file for details.
Contribute
See dev_contribute.md for details.
Prerequisites
Python with
uvpackage managerClickHouse installation
MCP server dependencies
Acknowledgement
This library's implementation was inspired by the following three repositories and incorporates their code, respect for the open-source spirit!
Thanks!