Druid MCP Server
@christian-schlichtherle
An MCP server for comprehensive read-only access to one or more Apache Druid clusters for ad-hoc data analysis, monitoring, troubleshooting, and comparison.
概览
What is Druid MCP Server?
Druid MCP Server provides an MCP server for read-only access to one or more Apache Druid clusters. It enables AI applications to interact with Druid through the Model Context Protocol (MCP), allowing ad-hoc data analysis and comparison across multiple Druid clusters.
How to use Druid MCP Server?
Install dependencies with uv install or pip install -e ., then configure clusters via the DRUID_CLUSTERS environment variable (whitespace-separated key=value pairs). Run the server in development with mcp dev main.py or production with mcp run main.py. Integrate with Claude Desktop using mcp install main.py. All tools (except cluster management) require an explicit cluster parameter as the first argument.
Key features of Druid MCP Server
- Multi-cluster support: connect to and query multiple clusters simultaneously
- Query execution: SQL and native JSON queries
- Datasource management: list, explore, and inspect schemas
- Ingestion monitoring: supervisor and task status tracking
- Cluster operations: service health monitoring and segment analysis
- Lookup management: query and inspect lookup tables
- Smart analysis prompts: pre-built prompts for common analysis tasks
- Schema caching: 5-minute TTL for resource endpoints
Use cases of Druid MCP Server
- Compare datasource schemas and data distribution across development, staging, and production clusters
- Execute ad-hoc SQL or native queries on any configured Druid cluster
- Monitor ingestion health and task status across multiple environments simultaneously
- Perform cross-cluster data quality checks and time-period comparisons
- Explore datasource structure and content with AI-assisted prompts
FAQ from Druid MCP Server
What access mode does Druid MCP Server use?
Druid MCP Server provides read-only access to your Druid clusters. No write operations are supported.
What are the prerequisites for running Druid MCP Server?
Python 3.11+, access to an Apache Druid cluster, and an MCP-compatible client (e.g., Claude Desktop).
How does multi-cluster support work?
Configure multiple Druid clusters with the DRUID_CLUSTERS environment variable using name=url pairs. Each tool accepts an explicit cluster name parameter, enabling simultaneous queries to different clusters without hidden state.
Does Druid MCP Server support native Druid queries?
Yes, it supports both SQL queries via execute_sql_query and native JSON queries (timeseries, topN, groupBy, etc.) via execute_native_query.
Is there any caching for Druid API responses?
Schema caching is implemented with a 5-minute TTL for resource endpoints only, improving performance for repeated schema accesses.