clickhouse_mcp_server
Documentation
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:
CLICKHOUSE_HOST=localhost
CLICKHOUSE_PORT=8123
CLICKHOUSE_USER=default
CLICKHOUSE_PASSWORD=CHANGE_TO_YOUR_PASSWORD
CLICKHOUSE_DATABASE=defaultOr 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
What is the sales volume in each region? Which product is the best - selling?CLINE
Configure the MCP server in VSCode, Cline extension, or other MCP client.:
Example:
{
"mcpServers": {
"clickhouse": {
"command": "uv",
"args": [
"--directory",
"/path/to/clickhouse_mcp_server",
"run",
"-m",
"clickhouse_mcp_server.server"
],
"env": {
"CLICKHOUSE_HOST": "localhost",
"CLICKHOUSE_PORT": "8123",
"CLICKHOUSE_USER": "default",
"CLICKHOUSE_PASSWORD": "CHANGE_TO_YOUR_PASSWORD",
"CLICKHOUSE_DATABASE": "default"
}
}
}
}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!
Frequently asked questions
What is clickhouse_mcp_server?
clickhouse_mcp_server is a Model Context Protocol (MCP) server listed in the TrackMCP directory.
How do I install clickhouse_mcp_server?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is clickhouse_mcp_server open source?
Yes — it is hosted on GitHub at https://github.com/dubin555/clickhouse_mcp_server and has 8 stars.
Related MCP tools
Damn Vulnerable MCP Server Python-based implementation. Trusted by 1200+ developers. Trusted by 1200+ developers. Trusted by 1200+ developers.
A Model Context Protocol (MCP) server that enables secure interaction with MySQL databases Python-based implementation. Trusted by 900+ developers.
Query MCP enables end-to-end management of Supabase via chat interface: read & write query executions, management API support, automatic migration versioning...
Model Context Protocol with Neo4j Python-based implementation. Trusted by 700+ developers. Trusted by 700+ developers. Trusted by 700+ developers.
An MCP server that provides control over Android devices via adb Python-based implementation. Trusted by 500+ developers.
A Model Context Protocol (MCP) server for PostgreSQL databases with enhanced capabilities for AI agents. Python-based implementation.
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP