Integrations
Provides tools for connecting to a ClickHouse database and executing SQL queries, with support for multiple queries and JSON-formatted results.
Clickhouse MCP 服务器
Clickhouse 数据库 MCP 服务器项目。
安装
您可以使用uv
安装该软件包:
或者使用pip
:
成分
工具
服务器提供了两个工具:
connect_database
:连接到特定的 Clickhouse 数据库database
参数:要连接的数据库的名称(字符串)- 连接成功时返回确认消息
execute_query
Clickhouse 查询query
参数:要执行的 SQL 查询/查询(字符串)- 以 JSON 格式返回查询结果
- 可以发送多个查询,以分号分隔
配置
服务器使用以下环境变量:
CLICKHOUSE_HOST
:Clickhouse 服务器地址(默认:“localhost”)CLICKHOUSE_USER
:Clickhouse 用户名(默认值:“root”)CLICKHOUSE_PASSWORD
:Clickhouse 密码(默认值:“”)CLICKHOUSE_DATABASE
:初始数据库(可选)CLICKHOUSE_READONLY
:只读模式(设置为 1/true 以启用,默认值:false)
快速入门
安装
克劳德桌面
MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
通过 Smithery 安装
要通过Smithery自动为 Claude Desktop 安装 Clickhouse 数据库集成服务器:
发展
构建和发布
准备分发包:
- 同步依赖项并更新锁文件:
- 构建软件包分发版:
这将在dist/
目录中创建源和轮子分布。
- 发布到 PyPI:
注意:您需要通过环境变量或命令标志设置 PyPI 凭据:
- 令牌:
--token
或UV_PUBLISH_TOKEN
- 或用户名/密码:
--username
/UV_PUBLISH_USERNAME
和--password
/UV_PUBLISH_PASSWORD
调试
由于 MCP 服务器通过 stdio 运行,调试起来可能比较困难。为了获得最佳调试体验,我们强烈建议使用MCP Inspector 。
您可以使用以下命令通过npm
启动 MCP Inspector:
启动后,检查器将显示一个 URL,您可以在浏览器中访问该 URL 以开始调试。
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
一个 MCP 服务器实现,使 Claude AI 能够与 Clickhouse 数据库交互。功能包括安全的数据库连接、查询执行、只读模式支持和多查询功能。
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityAn MCP server for ClickHouse.Last updated -33PythonApache 2.0
Verodat MCP Serverofficial
-securityAlicense-qualityAn MCP server that integrates Verodat's data management capabilities with AI systems like Claude Desktop, enabling users to manage accounts, workspaces, and datasets, as well as perform AI-powered queries on their data.Last updated -1TypeScriptApache 2.0- AsecurityAlicenseAqualityClickUp MCP Server enables AI assistants to seamlessly interact with your ClickUp workspace. This powerful integration allows Claude to create and manage tasks, access documents, organize folders and lists, add comments, and handle checklists—all through natural conversation.Last updated -42594TypeScriptMIT License
- AsecurityFlicenseAqualityAn MCP server that enables AI clients like Cursor, Windsurf, and Claude Desktop to access web content in markdown format, providing web unblocking and searching capabilities.Last updated -21813JavaScript