Sign inSign up

iunera/druid-mcp-server

By iunera

•Updated about 1 month ago

MCP Server for Apache Druid - Enterprise Ready - Streamable HTTP / STDIO

Image
Machine learning & AI
Developer tools
Databases & storage
0

10K+

iunera/druid-mcp-server repository overview

⁠Druid MCP Server

Docker Image License Java Spring Boot

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 enterprise-grade reliability and performance in mind.

Developed by iunera⁠ - Your trusted partner for Advanced AI and Data Analytics Solutions

⁠🚀 Quick Start

⁠Pull and Run
# Pull the latest image
docker pull iunera/druid-mcp-server:latest

# STDIO mode (default, recommended for LLM clients that spawn the server)
docker run --rm -i \
  -e DRUID_ROUTER_URL=http://your-druid-router:8888 \
  -e SPRING_PROFILES_ACTIVE=query \
  iunera/druid-mcp-server:latest

# HTTP mode (enable profile 'http' and expose /mcp)
docker run -p 8080:8080 \
  -e SPRING_PROFILES_ACTIVE=http,query \
  -e DRUID_ROUTER_URL=http://your-druid-router:8888 \
  iunera/druid-mcp-server:latest
⁠Docker Compose
version: '3.8'
services:
  druid-mcp-server:
    image: iunera/druid-mcp-server:latest
    ports:
      - "8080:8080"
    environment:
      - SPRING_PROFILES_ACTIVE=http,query
      - DRUID_ROUTER_URL=http://druid-router:8888
      - SPRING_AI_MCP_SERVER_NAME=druid-mcp-server
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:8080/"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 60s

⁠🎯 What is MCP?

The Model Context Protocol (MCP) is a standardized protocol that enables AI language models to securely connect to external data sources and tools. This Druid MCP Server acts as a bridge between AI assistants and your Apache Druid clusters, providing:

  • Secure API access to Druid functionality
  • Structured data exchange with AI models
  • Context-aware responses for data analytics queries
  • Enterprise-ready integration with existing workflows

Learn more about enterprise AI solutions at iunera.com⁠

⁠🌊 Y̊pipe: AI-Powered UI for Druid

Experience your data like never before with Y̊pipe⁠, a local desktop application that makes offline AI practical, designed by iunera. It leverages this Druid MCP Server to provide a seamless, conversational interface for your Druid cluster.

  • Natural Language Queries: Ask questions in plain English and get results instantly.
  • Local & Secure: Runs completely locally with support for offline models (CPU/GPU).
  • Plug & Play: Works out-of-the-box with the Development Druid Installation.

Get Ypipe on GitHub →⁠

The easiest way to test iunera/druid-mcp-server is ypipe.com⁠ / https://github.com/iunera/ypipe⁠

⁠🛠️ Comprehensive Tools Summary

The MCP server activates tools dynamically based on active Spring profiles (SPRING_PROFILES_ACTIVE).

⁠📊 Data Management & Querying Tools (6 tools - query profile)

Perfect for data exploration, schema analysis, and standard querying:

ToolPurposeKey Parameters
getDatasourcesList analytical tables or get detailed schema schemasdatasourceName (optional), detailed (optional)
getLookupsRetrieve lookup configurations and tier statusestier (optional), lookupName (optional), includeStatus (optional)
getSegmentsFetch segments list or metadata detailsdatasource (optional), segmentId (optional), detailed (optional)
getSegmentLoadQueueView segments currently loading or droppingserverName (optional)
getRetentionRulesRetrieve data retention rules and rule historydatasource (optional), includeHistory (optional)
queryDruidSqlExecute standard synchronous analytical SQL SELECT queriessqlQuery (required)
⁠⚙️ Cluster Administration Tools (10 tools - ops profile)

Perform administrative tasks, compaction management, and multi-stage queries:

ToolPurposeKey Parameters
getCompactionConfigView compaction settings or change historydatasource (optional), includeHistory (optional)
getCompactionStatusMonitor background compaction runsdatasource (optional)
manageCompactionCreate, update, or delete compaction rulesaction (UPSERT/DELETE), datasource, configJson
manageDatasourceOrSegmentDrop datasources or enable/disable segmentsaction, datasource, segmentId, interval
manageLookupConfigure or delete tier lookupsaction (UPSERT/DELETE), tier, lookupName, configJson
manageRetentionRulesUpdate load/drop policies for a datasourcedatasource, rulesJson
queryDruidMultiStageRun asynchronous Multi-Stage SQL tasks (MSQ)sqlQuery
queryDruidMultiStageWithContextRun MSQ tasks with custom context propertiessqlQuery, contextJson
getMultiStageQueryTaskStatusRetrieve MSQ query execution statustaskId
cancelMultiStageQueryTaskAbort a running MSQ tasktaskId
⁠📥 Ingestion Tools (6 tools - ops profile)

Control batch and streaming data ingestion:

ToolPurposeKey Parameters
submitIngestionPost ingestion job specs or generate batch JSON templatesaction (SUBMIT_SPEC/GENERATE_TEMPLATE), payloadJson, datasourceName
getSupervisorsList continuous streaming ingestion supervisorssupervisorId (optional)
manageSupervisorSuspend, resume, or terminate supervisor streamssupervisorId, action (SUSPEND/RESUME/TERMINATE)
getTasksList ingestion tasksstate (RUNNING/PENDING/WAITING/COMPLETED)
getTaskDetailsView specs, status, reports, or task logstaskId, aspect (STATUS/RAW_DETAILS/SPEC/REPORTS/LOG)
shutdownTaskStop a running ingestion tasktaskId
⁠🏥 Monitoring & Diagnostics Tools (4 tools - health profile)

Validate query performance, configurations, and check system health:

ToolPurposeKey Parameters
getClusterStatusHeartbeat status, leaders, metadataaspect (OVERALL/COORDINATOR/ROUTER/LEADER/PROPERTIES)
getNodesStatusList active server nodes statusserverName (optional), detailed (optional)
diagnoseClusterCOMPREHENSIVE, QUICK, PERFORMANCE, CONFIGuration auditsmode
checkFunctionalityHealthSmoke-test latency and active stream pipelinescomponent, quick
⁠🔐 Basic Security Tools (3 tools - permissions profile)

Administer users, roles, and resource access policies:

ToolPurposeKey Parameters
manageAuthenticationCreate/delete users, list users, set passwordsauthenticator, action (LIST/GET/CREATE/DELETE/SET_PASSWORD), username
manageAuthorizationManage roles, permissions, access policiesauthorizer, action (LIST_USERS/GET_ROLE/SET_PERMISSIONS), name, permissionsJson
manageSecurityAssignmentsMap roles to users, view authenticator chainauthorizer, action (ASSIGN_ROLE/UNASSIGN_ROLE/GET_CHAIN), username, roleName

⁠🔗 MCP Resources & Prompts

⁠Resources

Direct access to Druid metadata through standardized URIs:

  • druid://datasource/{datasourceName} - Datasource schema information
  • druid://datasource/{datasourceName}/details - Detailed segment data structures
  • druid://lookup/{tier}/{lookupName} - Lookup configurations
  • druid://segment/{segmentId} - Core segment catalog metadata
⁠AI-Powered Prompts

Intelligent templates for common Druid operations:

  • Data Analysis: data-exploration, query-optimization
  • Cluster Management: health-check, cluster-overview
  • Ingestion: ingestion-troubleshooting, ingestion-setup
  • Operations: retention-management, compaction-suggestions, emergency-response

Discover how iunera's AI expertise⁠ can transform your data analytics workflows

⁠🌐 Transport Modes

docker run --rm -i \
  -e DRUID_ROUTER_URL=http://your-druid-router:8888 \
  -e SPRING_PROFILES_ACTIVE=query \
  iunera/druid-mcp-server:latest
⁠HTTP Transport (Profile: http)
docker run -p 8080:8080 \
  -e SPRING_PROFILES_ACTIVE=http,query \
  -e DRUID_ROUTER_URL=http://your-druid-router:8888 \
  iunera/druid-mcp-server:latest

# Streamable HTTP endpoint: http://localhost:8080/mcp

⁠⚙️ Configuration

⁠Environment Variables
VariableDescriptionDefault
DRUID_ROUTER_URLDruid router endpointhttp://localhost:8888
DRUID_COORDINATOR_URLCoordinator endpoint (optional, needed for basic security)http://localhost:8081
DRUID_AUTH_USERNAMEUsername for basic auth authentication""
DRUID_AUTH_PASSWORDPassword for basic auth authentication""
DRUID_SSL_ENABLEDEnables SSL for connectionfalse
DRUID_SSL_SKIP_VERIFICATIONSkip SSL validationsfalse
DRUID_MCP_SQL_SYNTAX_CORRECTION_ENABLEDEnables automatic SQL syntax correctiontrue
DRUID_MCP_SQL_SYNTAX_CORRECTION_CACHE_TTL_MSSchema metadata cache TTL in ms300000 (5 minutes)
SPRING_PROFILES_ACTIVEActive Spring tool profiles (query, ops, health, permissions)query
SERVER_PORTPort for HTTP transport mode8080

⁠🏗️ Architecture

Built on enterprise-grade technologies:

  • Spring Boot 4.1.0 - Production-ready framework
  • Spring AI MCP Server - Native MCP protocol support
  • Java 25 - Latest performance optimizations
  • Maven - Reliable dependency management
  • Multi-stage Docker build - Optimized container size

⁠🔒 Security Features

  • Non-root container execution (UID/GID 1000)
  • Minimal attack surface with JRE-only runtime
  • Health check endpoints for monitoring
  • Configurable authentication support
  • Network isolation ready

⁠🤝 Support & Community

⁠🏢 About iunera

iunera⁠ is a leading provider of advanced AI and data analytics solutions. We specialize in:

  • Enterprise AI Integration - Seamless AI adoption for businesses
  • Data Analytics Platforms - Scalable analytics infrastructure
  • Custom AI Solutions - Tailored AI applications for specific needs
  • Consulting Services - Expert guidance for digital transformation

Transform your data strategy with iunera's expertise⁠

⁠Need Expert Apache Druid Consulting?

Maximize your return on data with professional Druid implementation and optimization services. From architecture design to performance tuning and AI integration, our experts help you navigate Druid's complexity and unlock its full potential.

Get Expert Druid Consulting →⁠

⁠Need Enterprise MCP Server Development Consulting?

ENTERPRISE AI INTEGRATION & CUSTOM MCP (MODEL CONTEXT PROTOCOL) SERVER DEVELOPMENT

Iunera specializes in developing production-grade AI agents and enterprise-grade LLM solutions, helping businesses move beyond generic AI chatbots. They build secure, scalable, and future-ready AI infrastructure, underpinned by the Model Context Protocol (MCP), to connect proprietary data, legacy systems, and external APIs to advanced AI models.

Get Enterprise MCP Server Development Consulting →⁠


Ready to revolutionize your Druid cluster management?

docker pull iunera/druid-mcp-server:latest

Powered by iunera⁠ - Where AI meets Enterprise Data

Tag summary

Content type

Image

Digest

sha256:04472c532…

Size

146.1 MB

Last updated

about 1 month ago

docker pull iunera/druid-mcp-server