MCPdir β€” MCP Server Directory
πŸ‡¬πŸ‡§ πŸ‡ͺπŸ‡Έ

ClickHouse MCP

by ClickHouse

Query ClickHouse databases with natural language for real-time analytics and OLAP

database Python Intermediate Self-hostable Verified
⭐ 200 stars πŸ“… Updated: 1mo ago

Description

Official ClickHouse MCP server that gives LLMs direct access to ClickHouse databases for real-time analytics and OLAP queries. Connect your AI assistant to one of the fastest columnar databases in the world and explore billions of rows through natural language. Supports listing databases and tables, describing schemas, and executing read-only SQL queries β€” all through a secure, controlled interface. Ideal for data exploration, ad-hoc analytics, and building AI-powered dashboards that query ClickHouse in real time.

βœ… Best for

Teams using ClickHouse for analytics who want AI-assisted data exploration

⏭️ Skip if

You need write access to the database or use a different DBMS

πŸ’‘ Use cases

  • Exploring large analytical datasets through conversational queries
  • Running ad-hoc OLAP queries on ClickHouse without writing SQL manually
  • Building AI-driven dashboards that pull real-time metrics from ClickHouse
  • Investigating data quality issues by inspecting schemas and sample data

πŸ‘ Pros

  • βœ“ Official project maintained by the ClickHouse team
  • βœ“ Optimized for ClickHouse's columnar engine β€” fast queries on billions of rows
  • βœ“ Simple setup via pip install or uvx with environment variable configuration
  • βœ“ Read-only query execution ensures safe data exploration

πŸ‘Ž Cons

  • βœ— Requires a running ClickHouse instance with network access
  • βœ— Limited to read operations β€” no data insertion or schema modifications
  • βœ— Complex analytical queries may produce large result sets that consume context

πŸ”§ Exposed tools (4 tools)

ToolCategoryDescription
list_databasesdiscoveryList all available databases in the ClickHouse instance
list_tablesdiscoveryList all tables in a specific database
describe_tablediscoveryGet the schema and column details of a table
execute_queryqueryExecute a read-only SQL query against ClickHouse

⚑ Installation

Prerequisites:

  • β€’ python v3.10+
  • β€’ ClickHouse instance credentials (host, user, password)
  • β€’ API key required

Check Claude Code documentation to configure this MCP server.

πŸ’‘ Tips & tricks

Set CLICKHOUSE_HOST, CLICKHOUSE_USER, and CLICKHOUSE_PASSWORD as environment variables. For ClickHouse Cloud, use the secure connection string provided in your cloud console. Start with list_databases and list_tables to orient the LLM before running queries.

πŸ”„ Alternatives

Quick info

Author
ClickHouse
License
Apache-2.0
Runtime
Python 3.10+
Transport
stdio
Category
database
Difficulty
Intermediate
Self-hostable
βœ…
Auth
β€”
Docker
β€”
Version
latest
Updated
Feb 28, 2026

Client compatibility

  • βœ… Claude Code
  • βœ… Cursor
  • βœ… VS Code Copilot
  • ❓ Gemini CLI
  • βœ… Windsurf
  • βœ… Cline
  • ❓ JetBrains AI
  • ❓ Warp

Platforms

🍎 macOS 🐧 Linux πŸͺŸ Windows