
ClickHouse MCP Server
An MCP server for ClickHouse.
Installation
Installing for Claude Desktop
Option 1: One-Command Installation
npx mcpbar@latest install iskakaushik/mcp-clickhouse -c claude
This command will automatically install and configure the ClickHouse MCP Server MCP server for your selected client.
Option 2: Manual Configuration
Run the command below to open your configuration file:
npx mcpbar@latest edit -c claude
After opening your configuration file, copy and paste this configuration:
View JSON configuration
{
"mcpServers": {
"ClickHouse MCP Server": {
"command": "uvx",
"args": [
"mcp-clickhouse"
],
"env": {
"CLICKHOUSE_HOST": "${input:clickhouse_host}",
"CLICKHOUSE_PORT": "${input:clickhouse_port}",
"CLICKHOUSE_USER": "${input:clickhouse_user}",
"CLICKHOUSE_PASS": "${input:clickhouse_pass}"
}
}
}
}
ClickHouse MCP Server
Migrated to https://github.com/ClickHouse/mcp-clickhouse
An MCP server for ClickHouse.
Features
Tools
-
run_select_query
- Execute SQL queries on your ClickHouse cluster.
- Input:
sql
(string): The SQL query to execute. - All ClickHouse queries are run with
readonly = 1
to ensure they are safe.
-
list_databases
- List all databases on your ClickHouse cluster.
-
list_tables
- List all tables in a database.
- Input:
database
(string): The name of the database.
Configuration
Note: This is a temporary configuration process that will be significantly improved once the package is published.
-
Run
uv sync
to install the dependencies. To installuv
follow the instructions here. Then dosource .venv/bin/activate
. -
Setup the
.env.production
file with the ClickHouse credentials.
CLICKHOUSE_HOST=<CLICKHOUSE_HOST>
CLICKHOUSE_PORT=<CLICKHOUSE_PORT>
CLICKHOUSE_USER=<CLICKHOUSE_USER>
CLICKHOUSE_PASSWORD=<CLICKHOUSE_PASSWORD>
-
Run
fastmcp install mcp_clickhouse/mcp_server.py -f .env.production
to install the server. -
Restart Claude Desktop.
Development
-
In
test-services
directory rundocker compose up -d
to start the ClickHouse cluster. -
Add the following variables to a
.env
file in the root of the repository.
CLICKHOUSE_HOST=localhost
CLICKHOUSE_PORT=8123
CLICKHOUSE_USER=default
CLICKHOUSE_PASSWORD=clickhouse
-
Run
uv sync
to install the dependencies. To installuv
follow the instructions here. Then dosource .venv/bin/activate
. -
For easy testing, you can run
fastmcp dev mcp_clickhouse/mcp_server.py
to start the MCP server.
Stars
3Forks
5Last commit
6 months agoRepository age
6 monthsLicense
Apache-2.0
Auto-fetched from GitHub .
MCP servers similar to ClickHouse MCP Server:

Stars
Forks
Last commit

Stars
Forks
Last commit

Stars
Forks
Last commit