Skip to main content
Glama
donald-ada

clickhouse

by donald-ada

ClickHouse MCP Server

一个用于 ClickHouseModel Context Protocol (MCP) 服务器,让 Claude 等 AI 助手能够直接查询和管理 ClickHouse 数据库。

功能

提供 5 个工具:

工具

描述

list_databases

列出所有数据库

list_tables

列出指定数据库的所有表

describe_table

查看表的列信息和建表语句

query

执行 SELECT 查询,返回 JSON 结果

execute

执行 DDL / DML 语句(CREATE、ALTER、DROP、INSERT 等)

Related MCP server: ClickHouse MCP Server

快速开始

安装依赖

npm install

配置环境变量

复制 .env.example 并填写你的 ClickHouse 连接信息:

cp .env.example .env
CLICKHOUSE_HOST=http://your-clickhouse-host:8123
CLICKHOUSE_USER=default
CLICKHOUSE_PASSWORD=your_password
CLICKHOUSE_DATABASE=default

构建

npm run build

在 Claude Desktop 中使用

编辑 ~/Library/Application Support/Claude/claude_desktop_config.json(macOS):

{
  "mcpServers": {
    "clickhouse": {
      "command": "node",
      "args": ["/path/to/clickhouse/dist/index.js"],
      "env": {
        "CLICKHOUSE_HOST": "http://your-clickhouse-host:8123",
        "CLICKHOUSE_USER": "default",
        "CLICKHOUSE_PASSWORD": "your_password",
        "CLICKHOUSE_DATABASE": "default"
      }
    }
  }
}

在 Claude Code 中使用

claude mcp add clickhouse node /path/to/clickhouse/dist/index.js \
  -e CLICKHOUSE_HOST=http://your-clickhouse-host:8123 \
  -e CLICKHOUSE_USER=default \
  -e CLICKHOUSE_PASSWORD=your_password \
  -e CLICKHOUSE_DATABASE=default

开发

# 直接运行(无需构建)
npm run dev

技术栈

License

MIT

A
license - permissive license
-
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/donald-ada/clickhouse'

If you have feedback or need assistance with the MCP directory API, please join our Discord server