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.
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:
--host
the database host--port
the database port--user
the database username--password
the database password--database
the database name
Usage
Fake some data in clickhouse
Check the SQL in dev_contribute.md for details.
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
uv
package manager - ClickHouse 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!
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Tools
A Model Context Protocol server that enables AI assistants to securely interact with ClickHouse databases, supporting table exploration and SQL query execution through a controlled interface.
Related MCP Servers
- -securityAlicense-qualityA Model Context Protocol server that enables secure and structured interaction with Microsoft SQL Server databases, allowing AI assistants to list tables, read data, and execute SQL queries with controlled access.Last updated -39PythonMIT License
- -securityAlicense-qualityA Model Context Protocol server that enables Large Language Models to seamlessly interact with ClickHouse databases, supporting resource listing, schema retrieval, and query execution.Last updated -1PythonMIT License
- AsecurityAlicenseAqualityA Model Context Protocol server that enables secure interaction with Microsoft SQL Server databases, allowing AI assistants to list tables, read data, and execute SQL queries through a controlled interface.Last updated -1185PythonMIT License
- -securityAlicense-qualityA Model Context Protocol server implementation that enables AI assistants to execute SQL queries and interact with SQLite databases through a structured interface.Last updated -7TypeScriptMIT License