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=default
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.
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
uvpackage 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!
Metadata
Release files for iflow-mcp_clickhouse-mcp-server 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| iflow_mcp_clickhouse_mcp_server-0.1.0.tar.gz | 201.7 kB | Without provenance | Details for iflow_mcp_clickhouse_mcp_server-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| iflow_mcp_clickhouse_mcp_server-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for iflow_mcp_clickhouse_mcp_server-0.1.0-py3-none-any.whl |
Total release size: 213.2 kB
Release files / iflow_mcp_clickhouse_mcp_server-0.1.0.tar.gz
| Download URL | iflow_mcp_clickhouse_mcp_server-0.1.0.tar.gz |
|---|---|
| Size | 201.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a3e8ba137127ae5f19084110ffbb973fa96bbdb9caa784340773af0b49d908e9
|
|
BLAKE2b-256 checksum How to use checksums |
d8110f4ca268b1d09d7725f76ff11cdc741f5acedd9615e15a0e7bb689f058e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.17
|
Release files / iflow_mcp_clickhouse_mcp_server-0.1.0-py3-none-any.whl
| Download URL | iflow_mcp_clickhouse_mcp_server-0.1.0-py3-none-any.whl |
|---|---|
| Size | 11.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6719d9fb7a66a467f64aecf25d62e2fa79df8477bd96a6634203667ae7c60009
|
|
BLAKE2b-256 checksum How to use checksums |
5d197f07edee8871e28fa49aa4128b05a399c0e589d620244c34baea1ae0c55d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.17
|
Security for iflow-mcp_clickhouse-mcp-server 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.