dubin555
MCP Serverdubin555public

clickhouse_mcp_server

Clickhouse_mcp_server 是一个用于高效管理和与 ClickHouse 数据库交互的服务器实现,支持多种操作和集成。

Repository Info

8
Stars
4
Forks
8
Watchers
3
Issues
Python
Language
Apache License 2.0
License

About This Server

Clickhouse_mcp_server 是一个用于高效管理和与 ClickHouse 数据库交互的服务器实现,支持多种操作和集成。

Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.

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=default

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

What is the sales volume in each region? Which product is the best - selling?
Demo Screenshot

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!

  • GreptimeTeam/greptimedb-mcp-server
  • ktanaka101/mcp-server-duckdb
  • designcomputer/mysql_mcp_server)

Thanks!

Quick Start

1

Clone the repository

git clone https://github.com/dubin555/clickhouse_mcp_server
2

Install dependencies

cd clickhouse_mcp_server
npm install
3

Follow the documentation

Check the repository's README.md file for specific installation and usage instructions.

Repository Details

Ownerdubin555
Repoclickhouse_mcp_server
LanguagePython
LicenseApache License 2.0
Last fetched8/10/2025

Recommended MCP Servers

💬

Discord MCP

Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.

integrationsdiscordchat
🔗

Knit MCP

Connect AI agents to 200+ SaaS applications and automate workflows.

integrationsautomationsaas
🕷️

Apify MCP Server

Deploy and interact with Apify actors for web scraping and data extraction.

apifycrawlerdata
🌐

BrowserStack MCP

BrowserStack MCP Server for automated testing across multiple browsers.

testingqabrowsers

Zapier MCP

A Zapier server that provides automation capabilities for various apps.

zapierautomation