mcp-clickhouse

Connect ClickHouse to your AI assistants.

GitHub Stars

515

User Rating

Not Rated

Favorites

0

Views

182

Forks

105

Issues

25

Installation
Difficulty
Intermediate
Estimated Time
10-20 minutes

Installation

Installation

Prerequisites

Required software and versions:
Python: 3.10 or higher
ClickHouse: Latest version

Installation Steps

1. Clone Repository

bash
git clone https://github.com/ClickHouse/mcp-clickhouse.git
cd mcp-clickhouse

2. Install Dependencies

bash
pip install -r requirements.txt

3. Configure Claude Desktop

Edit claude_desktop_config.json to add the MCP server:
json
{
  "mcpServers": {
    "mcp-clickhouse": {
      "command": "uv",
      "args": ["run", "--with", "mcp-clickhouse", "--python", "3.10", "mcp-clickhouse"],
      "env": {
        "CLICKHOUSE_HOST": "",
        "CLICKHOUSE_PORT": "",
        "CLICKHOUSE_USER": "",
        "CLICKHOUSE_PASSWORD": "",
        "CLICKHOUSE_SECURE": "true",
        "CLICKHOUSE_VERIFY": "true",
        "CLICKHOUSE_CONNECT_TIMEOUT": "30",
        "CLICKHOUSE_SEND_RECEIVE_TIMEOUT": "30"
      }
    }
  }
}

4. Start Server

bash
uv run --with mcp-clickhouse --python 3.10 mcp-clickhouse

Troubleshooting

Common Issues

Issue: Server won't start Solution: Check Python version and reinstall dependencies.

Additional Resources