ClickHouse MCP Server
@bjpadhy
关于 ClickHouse MCP Server
A Model Context Protocol (MCP) server that connects to ClickHouse databases and allows LLMs like Claude to explore and analyze data through natural language queries.
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"clickhouse-analytics": {
"command": "node",
"args": [
"/absolute/path/to/clickhouse-mcp-server/dist/index.js"
],
"env": {
"CLICKHOUSE_URL": "",
"CLICKHOUSE_USERNAME": "",
"CLICKHOUSE_PASSWORD": "",
"CLICKHOUSE_DATABASE": ""
}
}
}
}工具
2Run a read-only SQL query against the database
Ask questions about your data in natural language
概览
What is ClickHouse MCP Server?
ClickHouse MCP Server is a Model Context Protocol (MCP) server that connects to ClickHouse databases and enables LLMs like Claude to explore and analyze data through natural language queries.
How to use ClickHouse MCP Server?
Clone the repository, install dependencies with npm install, configure environment variables in a .env file (using a read-only database user), and build with npm run build. Run locally with npm start, or integrate with Claude Desktop by adding the server configuration to claude_desktop_config.json.
Key features of ClickHouse MCP Server
- Connects to ClickHouse databases
- Exposes table schemas as resources
- Runs SQL queries from natural language instructions
- Executes only read-only SQL queries
- Works with Claude Desktop for macOS
- Provides sample data (5 rows) for any table
Use cases of ClickHouse MCP Server
- Explore database schemas and sample data through LLMs
- Ask natural language questions about your data without writing SQL
- Perform read-only analytical queries against ClickHouse
FAQ from ClickHouse MCP Server
What type of queries does ClickHouse MCP Server allow?
The server only allows read-only SQL queries and performs basic validation to prevent DDL or DML statement execution.
What databases can I connect to?
It connects to any ClickHouse database configured via environment variables (CLICKHOUSE_URL, CLICKHOUSE_USERNAME, CLICKHOUSE_PASSWORD, CLICKHOUSE_DATABASE).
How do I integrate with Claude Desktop?
Add the server configuration to your Claude Desktop config file at ~/Library/Application Support/Claude/claude_desktop_config.json with the command node and absolute path to the built index.js.
What resources and tools are available?
Resources: db://info, table://{tableName}/schema, table://{tableName}/sample. Tools: execute-sql (read-only query) and natural-language-query.
Is there any security guidance?
Always use a read-only database user, store credentials in environment variables, and review query requests before execution.
数据库 分类下的更多 MCP 服务器

PostgreSQL
modelcontextprotocolModel Context Protocol Servers
Neon MCP Server
neondatabaseMCP server for interacting with Neon Management API and databases
MCP MongoDB Server
kiliczshA Model Context Protocol Server for MongoDB
Chroma MCP Server
chroma-coreA Model Context Protocol (MCP) server implementation that provides database capabilities for Chroma
mcp-server-qdrant: A Qdrant MCP server
qdrantAn official Qdrant Model Context Protocol (MCP) server implementation
评论