druid
A comprehensive Model Context Protocol (MCP) server for Apache Druid that provides extensive tools, resources, and AI-assisted prompts for managing and analyzing Druid clusters. Built with Spring Boot and Spring AI, this server enables seamless integration between AI assistants and Apache Druid through standardized MCP protocol.
claude mcp add --transport stdio iunera-druid-mcp-server java -jar target/druid-mcp-server-1.8.1.jar \ --env SPRING_PROFILES_ACTIVE="http to enable HTTP/Streamable HTTP transport (optional)" \ --env DRUID_MCP_SECURITY_OAUTH2_ENABLED="true by default; set to false to disable OAuth2 security"
How to use
This Druid MCP Server exposes a feature-based MCP implementation for managing and analyzing an Apache Druid cluster. It automatically discovers tools, resources, and prompts for data management, ingestion, monitoring, and health checks, organized into distinct features. You can connect to the server using standard MCP transports (STDIO by default or Streamable HTTP when you enable the http profile) and interact with the MCP Inspector to browse available tools, resources, and prompts. Tools are executable functions that perform operations on Druid; resources provide data access; prompts offer AI-assisted guidance templates for tasks such as data ingestion planning, query optimization, and health checks. The server emphasizes a tool-based architecture with automatic JSON schema generation and real-time streaming support via SSE, alongside secure OAuth 2.0 transport when enabled.
How to install
Prerequisites:
- Java 24 JRE/JDK
- Maven 3.6+
- A running Apache Druid cluster (router on port 8888 and coordinator on 8081 as referenced by the examples)
Build and Run
- Build the application:
mvn clean package -DskipTests
- Run the application:
java -jar target/druid-mcp-server-1.8.1.jar
The server will start on port 8080 by default. If you want HTTP/Streamable HTTP access (exposes /mcp), you can run with the http profile as described in the quick start:
-Dspring.profiles.active=http
For alternative deployment approaches, such as using pre-built jars or Docker, see the README for details like the Maven Central download path or Docker usage examples.
Additional notes
Tips and notes:
- The MCP server supports multiple transport modes: STDIO (default), SSE, and Streamable HTTP. OAuth 2.0 is enabled by default for HTTP/SSE transports; supply a valid Bearer token when connecting.
- Environment variables:
- DRUID_MCP_SECURITY_OAUTH2_ENABLED: true by default; set to false to disable OAuth2 (not recommended for production).
- SPRING_PROFILES_ACTIVE: http to enable the Streamable HTTP /mcp endpoint; omit for stdio default.
- If you need to run in Docker, use the image iunera/druid-mcp-server with the appropriate environment vars to enable http or stdio modes, as shown in the Docker examples.
- The MCP Inspector is available to browse tools, resources, and prompts once connected; some tools may be read-only depending on the mode.
- For production use, consider enabling enterprise security features and proper token management via your OAuth provider.
Related MCP Servers
api2mcp4j
This is a revolutionary AI MCP plugin with excellent pluggable and encapsulated features. With just a few lines of configuration, it can easily integrate into your Spring boot web program and give it MCP capabilities,inheriting the powerful engineering capabilities of the Spring series framework
boilerplate
TypeScript Model Context Protocol (MCP) server boilerplate providing IP lookup tools/resources. Includes CLI support and extensible structure for connecting AI systems (LLMs) to external data sources like ip-api.com. Ideal template for creating new MCP integrations via Node.js.
mcp-java-sdk-examples
A collection of MCP server examples developed by various Java SDKs
penpot
MCP server for Penpot - Connect AI assistants to Penpot design platform via Model Context Protocol
spring-boot-ai-confluence
A Spring Boot AI-powered Model Context Protocol Server for interacting with Confluence Cloud
javaConf
🔌 MCP Server providing Java Conference data (CFP, dates, and more) using Spring Boot/AI by parsing GitHub Markdown.