Get the FREE Ultimate OpenClaw Setup Guide →

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.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
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

  1. Build the application:
mvn clean package -DskipTests
  1. 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

Sponsor this space

Reach thousands of developers