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
Inputs: database (required).
execute_queryC
Execute ClickHouse queries
Inputs: query (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
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
Related MCP Connectors
Hosted SQL Server MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Hosted PostgreSQL MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Hosted MySQL MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Hosted BigQuery MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
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.19Apache 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 gradedqualityBmaintenanceProduction-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.39-