About
ClickHouse MCP Server is a database integration that connects AI assistants to ClickHouse analytics clusters and chDB embedded engines, enabling SQL query execution and schema exploration directly from the conversation. Key features of ClickHouse MCP Server: - Execute SQL queries on ClickHouse clusters with configurable read-only or write access. - List databases and browse tables with pagination, filtering by name patterns, and optional column metadata. - Query data via chDB's embedded ClickHouse engine without a server, supporting direct reads from files, URLs, and databases without ETL. - Built-in health check endpoint for monitoring ClickHouse connectivity. - Authentication support for HTTP/SSE transports to secure connections.
README
ClickHouse MCP Server
[](https://pypi.org/project/mcp-clickhouse)
An MCP server for ClickHouse.
Features
ClickHouse Tools
run_queryquery (string): The SQL query to execute.
* Queries run in read-only mode by default (CLICKHOUSE_ALLOW_WRITE_ACCESS=false), but writes can be enabled explicitly if needed.list_databaseslist_tablesdatabase (string).
* Optional inputs:
* like / not_like (string): Apply LIKE or NOT LIKE filters to table names.
* page_token (string): Token returned by a previous call for fetching the next page.
* page_size (int, default 50): Number of tables returned per page.
* include_detailed_columns (bool, default true): When false, omits column metadata for lighter responses while keeping the full create_table_query.
* Response shape:
* tables: Array of table objects for the current page.
* next_page_token: Pass this value back to fetch the next page, or null when there are no more tables.
* total_tables: Total count of tables that match the supplied filters.chDB Tools
run_chdb_select_queryquery (string): The SQL query to execute.
* Query data directly from various sources (files, URLs, databases) without ETL processes.Health Check Endpoint
When running with HTTP or SSE transport, a health check endpoint is available at /health. This endpoint:
200 OK with the ClickHouse version if the server is healthy and can connect to ClickHouse503 Service Unavailable if the server cannot connect to ClickHouseExample:
curl http://localhost:8000/health
Response: OK - Connected to ClickHouse 24.3.1
Security
Authentication for HTTP/SSE Transports
When using HTTP or SSE transport, authentication is required by default. The stdio transport (default) does not require authentication as it only communicates via standard input/output.
#### Setting Up Authentication
1. Generate a secure token (can be any random string):
# Using uuidgen (macOS/Linux)
uuidgen # Using openssl
openssl rand -hex 32
2. Configure the server with the token:
export CLICKHOUSE_MCP_AUTH_TOKEN="your-generated-token"
3. Configure your MCP client to include the token in requests:
For Claude Desktop with HTTP/SSE transport:
{
"mcpServers": {
"mcp-clickhouse": {
"url": "http://127.0.0.1:8000",
"headers": {
"Authorization": "Bearer your-generated-token"
}
}
}
}
For command-line tools:
curl -H "Authorization: Bearer your-generated-token" http://localhost:8000/health
#### Development Mode (Disabling Authentication)
For local development and testing only, you can disable authentication by setting:
export CLICKHOUSE_MCP_AUTH_DISABLED=true
WARNING: Only use this for local development. Do not disable authentication when the server is exposed to any network.
Configuration
This MCP server supports both ClickHouse and chDB. You can enable either or both depending on your needs.
1. Open the Claude Desktop configuration file located at:
* On macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
* On Windows: %APPDATA%/Claude/claude_desktop_config.json
2. Add the following:
{
"mcpServers": {
"mcp-clickhouse": {
"command": "uv",
"args": [
"run",
"--with",
"mcp-clickhouse",
"--python",
"3.10",
"mcp-clickhouse"
],
"env": {
"CLICKHOUSE_HOST": "",
"CLICKHOUSE_PORT": "",
"CLICKHOUSE_USER": "",
"CLICKHOUSE_PASSWORD": "",
"CLICKHOUSE_ROLE": "",
"CLICKHOUSE_SECURE": "true",
"CLICKHOUSE_VERIFY": "true",
"CLICKHOUSE_CONNECT_TIMEOUT": "30",
"CLICKHOUSE_SEND_RECEIVE_TIMEOUT": "30"
}
}
}
}
Update the environment variables to point to your own ClickHouse service.
Or, if you'd like to try it out with the ClickHouse SQL Playground, you can use the following config:
```json { "mcpServers": { "mcp-clickhouse": { "command": "uv", "args": [ "run", "--with", "mcp-clickhouse", "--python", "3.10", "mcp-clickhouse
Related MCP Servers
AI Research Assistant
hamid-vakilzadeh
AI Research Assistant provides comprehensive access to millions of academic papers through the Semantic Scholar and arXiv databases. This MCP server enables AI coding assistants to perform intelligent literature searches, citation network analysis, and paper content extraction without requiring an API key. Key features include: - Advanced paper search with multi-filter support by year ranges, citation thresholds, field of study, and publication type - Title matching with confidence scoring for finding specific papers - Batch operations supporting up to 500 papers per request - Citation analysis and network exploration for understanding research relationships - Full-text PDF extraction from arXiv and Wiley open-access content (Wiley TDM token required for institutional access) - Rate limits of 100 requests per 5 minutes with options to request higher limits through Semantic Scholar
Saju Insights
hjsh200219
Saju Insights provides personalized Korean traditional Four Pillars of Destiny (Saju) fortune-telling based on birth data. It calculates destiny charts using the eight characters (four heavenly stems and four earthly branches) derived from birth year, month, day, and hour. Key capabilities include: - Birth chart calculation with automatic True Solar Time adjustment (Jintaeyangsi -30min correction) - Fortune analysis covering personality, career, wealth, health, and love prospects - Relationship compatibility analysis comparing two people's Saju charts - 10-year luck cycle (Daewon) predictions for long-term planning - Yongsin (favorable element) guidance on lucky colors, directions, and career paths - Lunar-solar calendar conversion supporting 1900-2200 with leap month handling - Daily fortune readings and seasonal power calculations - Multiple interpretation schools including Ziping, DTS, and modern methodologies
Arch Linux [ Not Updated ]
nihalxkumar
Arch Linux MCP Server connects AI assistants to the Arch Linux ecosystem, enabling intelligent access to the Arch Wiki, AUR (Arch User Repository), and official package repositories. Key features: - Search and retrieve Arch Wiki documentation in markdown format via `archwiki://` URIs - Query package details from official repositories (`archrepo://`) and AUR (`aur://*/info`) - Analyze PKGBUILDs with built-in safety checks before installation (`aur://*/pkgbuild`) - Access system package state on Arch systems including installed packages, orphans, explicit packages, and package groups - Works on both Arch and non-Arch systems for documentation lookup and package research - Guided workflows for safe AUR installations and system troubleshooting