clickhouse-mcp-server
클릭하우스 MCP 서버
Clickhouse 데이터베이스 MCP 서버 프로젝트.
설치
uv 사용하여 패키지를 설치할 수 있습니다:
지엑스피1
또는 pip 사용하면:
pip install clickhouse-mcp-serverRelated MCP server: ClickHouse MCP Server
구성 요소
도구
서버는 두 가지 도구를 제공합니다.
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
윈도우: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"clickhouse-mcp-server": {
"command": "uv",
"args": [
"--directory",
"/Users/burakdirin/Projects/clickhouse-mcp-server",
"run",
"clickhouse-mcp-server"
],
"env": {
"CLICKHOUSE_HOST": "localhost",
"CLICKHOUSE_USER": "root",
"CLICKHOUSE_PASSWORD": "password",
"CLICKHOUSE_DATABASE": "[optional]",
"CLICKHOUSE_READONLY": "true"
}
}
}
}{
"mcpServers": {
"clickhouse-mcp-server": {
"command": "uvx",
"args": [
"clickhouse-mcp-server"
],
"env": {
"CLICKHOUSE_HOST": "localhost",
"CLICKHOUSE_USER": "root",
"CLICKHOUSE_PASSWORD": "password",
"CLICKHOUSE_DATABASE": "[optional]",
"CLICKHOUSE_READONLY": "true"
}
}
}
}Smithery를 통해 설치
Smithery를 통해 Claude Desktop용 Clickhouse Database Integration Server를 자동으로 설치하려면:
npx -y @smithery/cli install @burakdirin/clickhouse-mcp-server --client claude개발
건축 및 출판
배포를 위해 패키지를 준비하려면:
종속성 동기화 및 잠금 파일 업데이트:
uv sync패키지 배포 빌드:
uv build이렇게 하면 dist/ 디렉토리에 소스와 휠 배포판이 생성됩니다.
PyPI에 게시:
uv publish참고: 환경 변수나 명령 플래그를 통해 PyPI 자격 증명을 설정해야 합니다.
토큰:
--token또는UV_PUBLISH_TOKEN또는 사용자 이름/비밀번호:
--username/UV_PUBLISH_USERNAME및--password/UV_PUBLISH_PASSWORD
디버깅
MCP 서버는 stdio를 통해 실행되므로 디버깅이 어려울 수 있습니다. 최상의 디버깅 환경을 위해서는 MCP Inspector 사용을 강력히 권장합니다.
다음 명령을 사용하여 npm 통해 MCP Inspector를 시작할 수 있습니다.
npx @modelcontextprotocol/inspector uv --directory /Users/burakdirin/Projects/clickhouse-mcp-server run clickhouse-mcp-serverInspector를 실행하면 브라우저에서 접근하여 디버깅을 시작할 수 있는 URL이 표시됩니다.
Available Tools
2 toolsconnect_databaseC
Connect to a specific ClickHouse database
| Name | Required | Description | Default |
|---|---|---|---|
| database | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It only says 'Connect', omitting details about side effects, authentication requirements, or state changes (e.g., establishing a session).
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, clear sentence with no unnecessary words. It is effectively concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's role as a connection setter, the description lacks information on prerequisites, return values, or how it interacts with 'execute_query'. It is incomplete for operational context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0% and the description adds no additional meaning beyond the parameter name 'database'. It does not explain valid values or expected format.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Connect to a specific ClickHouse database', using a specific verb and resource. It effectively distinguishes from the sibling tool 'execute_query' which presumably runs queries.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus the sibling 'execute_query' or any prerequisites. The description merely states functionality without usage context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
execute_queryC
Execute ClickHouse queries
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided. The description does not disclose whether queries are read-only, safe, or have side effects. Important behavioral details like result handling or error behavior are missing.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence, which is concise but at the expense of necessary detail for a query execution tool. It is too minimal to be considered well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With one parameter and no output schema, the description fails to explain what the tool returns or if it just executes. Lacks context about execution environment and limitations.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, and the description adds no information about the 'query' parameter beyond its name. Does not specify expected format (e.g., SQL dialect) or constraints.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action (Execute) and resource (ClickHouse queries). It distinguishes from the sibling tool connect_database, which implies connection setup vs query execution.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives. Does not mention prerequisites like a prior connection or whether it is for read or write operations.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
2 tool updates
v1.0.0- First observed
connect_database - First observed
execute_query
TDQS
The two tools have clearly distinct purposes: one for establishing a database connection, the other for executing queries. There is no overlap or ambiguity.
Both tool names follow a consistent verb_noun pattern (connect_database, execute_query), making them predictable and easy to understand.
With only 2 tools, the set is minimal but still covers the essential operations for a database query server. It is slightly thin but reasonable for a focused scope.
The tools cover connection and query execution, but lack disconnect, schema inspection, or database management operations. This leaves notable gaps for a full database interaction workflow.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
Query your warehouse or a CSV with Claude/ChatGPT over MCP, governed by table-level ACL + audit.
Cloud-hosted MCP server for secure AI access to enterprise data sources via CData Connect AI.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables Large Language Models to seamlessly interact with ClickHouse databases, supporting resource listing, schema retrieval, and query execution.2MIT
- AlicenseBqualityDmaintenanceA Model Context Protocol server that enables AI assistants to securely interact with ClickHouse databases, supporting table exploration and SQL query execution through a controlled interface.18Apache 2.0
- AlicenseNot gradedqualityDmaintenanceAn MCP server implementation that enables Claude to execute read-only queries against MariaDB databases and explore database schemas through natural language.20MIT

Altinity MCPofficial
FlicenseNot gradedqualityAmaintenanceProduction-ready MCP server designed to empower AI agents and LLMs to interact seamlessly with ClickHouse. It exposes your ClickHouse database as a set of standardized tools and resources that adhere to the MCP protocol, making it easy for agents built on OpenAI, Claude, or other platforms to query, explore, and analyse your data.37-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/burakdirin/clickhouse-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server