Druid MCP server 标志

Druid MCP server

组织
iunera

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.

发布者iunera
代码仓库druid-mcp-server
语言Java
复刻数
7
星标数
18
可用工具
0
传输类型stdio
分类
许可协议Apache-2.0
链接
  • 将工具接入 AI 工作流

    Druid MCP server 提供 MCP 功能,可供兼容的 AI 客户端和智能体使用。

  • 0 个可用工具

    浏览下方可调用的操作;如果服务器提供了名称和描述,也会一并显示。

  • 可直接复制的配置

    使用安装配置片段,在您首选的 MCP 客户端中配置此服务器。

  • 开源社区热度

    关联的代码仓库有 18 个星标和 7 个复刻。

Druid MCP Server

Trust Score

A comprehensive Model Context Protocol (MCP) server for Apache Druid that provides extensive tools, resources, and prompts for managing and analyzing Druid clusters.

Developed by iunera - Advanced AI and Data Analytics Solutions

Overview

This MCP server implements a intend-based architecture where profiles picture their usaae intend and the corresponding area of Druid usage. The server provides three main types of MCP components:

  • Tools - Executable functions for performing operations
  • Resources - Data providers for accessing information
  • Prompts - AI-assisted guidance templates

Video Walkthrough

Learn how to integrate AI agents with Apache Druid using the MCP server. This tutorial demonstrates time series data exploration, statistical analysis, and data ingestion using natural language with AI assistants like Claude, ChatGPT, and Gemini.

Time Series on AI Steroids: Apache Druid Enterprise MCP Server Tutorial

Click the thumbnail above to watch the video on YouTube

🌊 Y̊pipe: AI-Powered UI for Druid

Experience your data like never before with Y̊pipe (formerly Data-Philter), 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.

Ypipe

Get Ypipe on GitHub →

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

📋 Ypipe Integration Blueprint

For seamless integration, we provide a predefined Ypipe integration blueprint file:

This blueprint allows you to easily connect and configure the Druid MCP server in Ypipe through a visual workspace.

Ypipe Workspace FlowDruid Node Configuration
Ypipe Workspace FlowYpipe Druid Node

Features

  • Pure Java
  • Spring AI MCP Server integration
  • Tool-based architecture for MCP protocol compliance
  • Tool-based Architecture: Complete MCP protocol compliance with automatic JSON schema generation
  • Multiple Transport Modes: STDIO, SSE, and Streamable HTTP support including Oauth
  • Real-time Communication: Server-Sent Events with streaming capabilities
  • Comprehensive error handling
  • Customizable Prompt Templates: AI-assisted guidance with template customization
  • Comprehensive Error Handling: Graceful error handling with meaningful responses
  • Enterprise Ready: Production-grade configuration and security features

MCP Inspector Interface

When connected to an MCP client, you can inspect the available tools, resources, and prompts through the MCP inspector interface:

Available Tools

MCP Inspector - Tools

The tools interface shows all available Druid management functions organized by feature areas including data management, ingestion management, and monitoring & health.

Available Resources

MCP Inspector - Resources

The resources interface displays all accessible Druid data sources and metadata that can be retrieved through the MCP protocol.

Available Prompts

MCP Inspector - Prompts

The prompts interface shows all AI-assisted guidance templates available for various Druid management tasks and data analysis workflows.

Quick Start

MCP Configuration for LLMs

A ready-to-use MCP configuration file is provided at mcp-servers-config.json that can be used with LLM clients to connect to this Druid MCP server.

Examples

The configuration includes multiple integration and transport options:

Docker examples using environment variables:

bash
# STDIO mode (default)
docker run --rm -i \
  -e DRUID_ROUTER_URL=http://your-druid-router:8888 \
  -e DRUID_COORDINATOR_URL=http://your-druid-coordinator:8081 \
  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 \
  -e DRUID_COORDINATOR_URL=http://your-druid-coordinator:8081 \
  iunera/druid-mcp-server:latest

Note on Spring profiles:

  • Default profile: stdio,query
  • HTTP profile: set SPRING_PROFILES_ACTIVE=http,query to enable Streamable HTTP at /mcp

Prerequisites

  • Java 25
  • Maven 3.6+
  • Apache Druid cluster running with router on port 8888

Build and Run

bash
# Build the application
mvn clean package -DskipTests

# Run the application
java -jar target/druid-mcp-server-2.0.1.jar

The server will start on port 8080 by default.

For detailed build instructions, testing, Docker setup, and development guidelines, see development.md.

Security & Authentication

  • Streamable HTTP and SSE transports are secured with OAuth 2.0 by default.
  • Clients must send a valid Bearer token in the Authorization header when connecting.
  • Example: Authorization: Bearer YOUR_JWT_TOKEN

Environment Variables

  • DRUID_MCP_SECURITY_OAUTH2_ENABLED:
    • Description: Enables or disables OAuth2 security for client authentication.
    • Type: Boolean
    • Default: true (OAuth2 is enabled by default as per the text above)
    • Usage: Set to false to disable OAuth2 authentication. When disabled, clients can access the server without providing OAuth2 tokens.

Installation from Maven Central

If you prefer to use the pre-built JAR without building from source, you can download and run it directly from Maven Central.

Prerequisites

  • Java 25 JRE only

Download and Run

Download the JAR from Maven Central https://repo.maven.apache.org/maven2/com/iunera/druid-mcp-server/

bash
# STDIO mode (default)
java -jar target/druid-mcp-server-2.0.1.jar

# HTTP mode (profile: http) - exposes /mcp on port 8080
java -Dspring.profiles.active=http \
     -jar target/druid-mcp-server-2.0.1.jar

For Developers

For detailed development information including build instructions, testing guidelines, architecture details, and contributing guidelines, see development.md.

Available Tools by Feature

The MCP server activates tools dynamically based on active Spring profiles (SPRING_PROFILES_ACTIVE). The default configuration runs the server in STDIO mode with the query profile enabled.

Profile: query (Default Active Profile)

Provides safe, read-only data querying and browsing capabilities.

ToolDescriptionParametersDruid API Endpoint / Functionality
getDatasourcesList all available Apache Druid datasources or get detailed schema for a specific datasource.datasourceName (String, optional), detailed (Boolean, optional)/druid/v2/sql (queries system catalogs like INFORMATION_SCHEMA.TABLES & COLUMNS)
getLookupsGet configuration or status of lookups for all or a specific tier.tier (String, optional), lookupName (String, optional), includeStatus (Boolean, optional)/druid/coordinator/v1/lookups/config & /status endpoints
getSegmentsFetch segments metadata or details for a specific segment.datasource (String, optional), segmentId (String, optional), detailed (Boolean, optional), metadataOnly (Boolean, optional)/druid/coordinator/v1/datasources/{ds}/segments & system tables (sys.segments via /druid/v2/sql)
getSegmentLoadQueueGet the load queue status showing segments currently being loaded.serverName (String, optional)/druid/coordinator/v1/loadqueue
queryDruidSqlExecute a SQL query against Druid datasources.sqlQuery (String, required)/druid/v2/sql (Router / Broker SQL endpoint)

Profile: ops

Provides administrative control over ingestion specs, tasks, streaming supervisors, retention rules, and compaction.

ToolDescriptionParametersDruid API Endpoint / Functionality
getCompactionConfigView compaction configuration or configuration change history for datasources.datasource (String, optional), includeHistory (Boolean, optional)/druid/coordinator/v1/config/compaction endpoints
getCompactionStatusRetrieve the current status of compaction runs and progress.datasource (String, optional)/druid/coordinator/v1/compaction/status
manageCompactionAdd, update, or remove a compaction configuration.action (Enum: UPSERT, DELETE, required), datasource (String, required), configJson (String, optional)/druid/coordinator/v1/config/compaction (POST/DELETE)
manageDatasourceOrSegmentModify segment states or permanently drop a datasource.action (Enum: ENABLE_SEGMENT, DISABLE_SEGMENT, KILL_DATASOURCE, required), datasource (String, required), segmentId (String, optional), interval (String, optional)/druid/coordinator/v1/datasources & segment POST/DELETE
manageLookupCreate, update, or delete a lookup configuration.action (Enum: UPSERT, DELETE, required), tier (String, required), lookupName (String, required), configJson (String, optional)/druid/coordinator/v1/lookups/config (POST/DELETE)
queryDruidMultiStageExecute a multi-stage SQL query (MSQ) against Druid datasources as a task.sqlQuery (String, required)/druid/v2/sql/task (MSQ execution endpoint)
queryDruidMultiStageWithContextExecute a multi-stage SQL query with custom context parameters.sqlQuery (String, required), contextJson (String, optional)/druid/v2/sql/task with context configurations
getMultiStageQueryTaskStatusGet the status of a multi-stage query task.taskId (String, required)/druid/indexer/v1/task/{taskId}/status
cancelMultiStageQueryTaskCancel a running multi-stage query task.taskId (String, required)/druid/indexer/v1/task/{taskId}/shutdown (POST)
getRetentionRulesRetrieve retention rules or audit history for a specific datasource or all datasources.datasource (String, optional), includeHistory (Boolean, optional)/druid/coordinator/v1/rules
manageRetentionRulesUpdate retention rules configuration for a specific datasource.datasource (String, required), rulesJson (String, required)/druid/coordinator/v1/rules
submitIngestionSubmit a Druid ingestion specification or generate a simple batch template.action (Enum: SUBMIT_SPEC, GENERATE_TEMPLATE, required), payloadJson (String, optional), datasourceName (String, optional), inputSourceType (String, optional), inputSourcePath (String, optional)/druid/indexer/v1/task (POST)
getSupervisorsList all supervisors or query details of a specific supervisor.supervisorId (String, optional)/druid/indexer/v1/supervisor
manageSupervisorSuspend, resume, or terminate a supervisor's execution.supervisorId (String, required), action (Enum: SUSPEND, RESUME, TERMINATE, required)/druid/indexer/v1/supervisor/{id}/(suspend/resume/terminate)
getTasksList ingestion tasks matching specific states.state (Enum: RUNNING, PENDING, WAITING, COMPLETED, optional)/druid/indexer/v1/runningTasks, pendingTasks, waitingTasks, completeTasks
getTaskDetailsFetch detailed information, specifications, execution reports, or execution logs for a task.taskId (String, required), aspect (Enum: STATUS, RAW_DETAILS, SPEC, REPORTS, LOG, required), logOffset (Long, optional)/druid/indexer/v1/task/{id} spec, status, reports, and log endpoints
shutdownTaskKill/shutdown a Druid task.taskId (String, required)/druid/indexer/v1/task/{id}/shutdown (POST)
getClusterStatusCheck overall health or fetch specific metadata/properties from coordinators or routers.aspect (Enum: OVERALL, COORDINATOR, ROUTER, LEADER, METADATA, PROPERTIES, SELF_DISCOVERY_COORDINATOR, SELF_DISCOVERY_ROUTER, optional)/status/health, /status/selfDiscovered, /druid/coordinator/v1/leader, /druid/coordinator/v1/config
getNodesStatusList registered servers, their detailed status, or single node status.serverName (String, optional), detailed (Boolean, optional)/druid/coordinator/v1/servers & /status
diagnoseClusterPerform automated diagnostic health checks, configuration audits, or query performance analysis.mode (Enum: COMPREHENSIVE, QUICK, PERFORMANCE, CONFIGURATION, required)Orchestrates diagnostic sweeps over active tasks, servers status, segment counts, and APIs
checkFunctionalityHealthValidate operations of ingestion systems, supervisor state transitions, and historical query latency.component (Enum: ALL, SUPERVISORS, HISTORICALS, INGESTION, optional), quick (Boolean, optional)Orchestrates checks over task execution logs and supervisor statuses

Profile: permissions

Provides basic security authentication and authorization administration.

[!IMPORTANT] Basic security tools are only activated if both of the following conditions are met:

  1. The permissions profile is activated (spring.profiles.active=permissions).
  2. The Coordinator URL (druid.coordinator.url) is set and non-empty.
ToolDescriptionParametersDruid API Endpoint / Functionality
manageAuthenticationAdminister basic security users and credentials.authenticator (String, required), action (Enum: LIST, GET, CREATE, DELETE, SET_PASSWORD, required), username (String, optional), password (String, optional)/druid-ext/basic-security/authentication/db/...
manageAuthorizationManage security authorization properties, roles, and resource access policies.authorizer (String, required), action (Enum: LIST_USERS, GET_USER, CREATE_USER, DELETE_USER, LIST_ROLES, GET_ROLE, CREATE_ROLE, DELETE_ROLE, SET_PERMISSIONS, required), name (String, optional), permissionsJson (String, optional)/druid-ext/basic-security/authorization/db/...
manageSecurityAssignmentsConfigure mapping rules assigning roles to users, or retrieve the configured authenticator chains.authorizer (String, required), action (Enum: ASSIGN_ROLE, UNASSIGN_ROLE, GET_CHAIN, required), username (String, optional), roleName (String, optional)/druid-ext/basic-security/authorization/db/... & /status/properties

Profile: health

Provides active health checking, cluster status, diagnostics, and doctor recommendation scans.

ToolDescriptionParametersDruid API Endpoint / Functionality
getClusterStatusCheck overall health or fetch specific metadata/properties from coordinators or routers.aspect (Enum: OVERALL, COORDINATOR, ROUTER, LEADER, METADATA, PROPERTIES, SELF_DISCOVERY_COORDINATOR, SELF_DISCOVERY_ROUTER, optional)/status/health, /status/selfDiscovered, /druid/coordinator/v1/leader, /druid/coordinator/v1/config
getNodesStatusList registered servers, their detailed status, or single node status.serverName (String, optional), detailed (Boolean, optional)/druid/coordinator/v1/servers & /status
diagnoseClusterPerform automated diagnostic health checks, configuration audits, or query performance analysis.mode (Enum: COMPREHENSIVE, QUICK, PERFORMANCE, CONFIGURATION, required)Orchestrates diagnostic sweeps over active tasks, servers status, segment counts, and APIs
checkFunctionalityHealthValidate operations of ingestion systems, supervisor state transitions, and historical query latency.component (Enum: ALL, SUPERVISORS, HISTORICALS, INGESTION, optional), quick (Boolean, optional)Orchestrates checks over task execution logs and supervisor statuses

Available Resources by Feature

FeatureResource URI PatternDescriptionParameters
Datasourcedruid://datasource/{datasourceName}Access datasource information and metadatadatasourceName (String)
Datasourcedruid://datasource/{datasourceName}/detailsAccess detailed datasource information including schemadatasourceName (String)
Lookupdruid://lookup/{tier}/{lookupName}Access lookup configuration and datatier (String), lookupName (String)
Segmentsdruid://segment/{segmentId}Access segment metadata and informationsegmentId (String)

Available Prompts by Feature

FeaturePrompt NameDescriptionParameters
Data Analysisdata-explorationGuide for exploring data in Druid datasourcesdatasource (String, optional)
Data Analysisquery-optimizationHelp optimize Druid SQL queries for better performancequery (String)
Cluster Managementhealth-checkComprehensive cluster health assessment guidanceNone
Cluster Managementcluster-overviewOverview and analysis of cluster statusNone
Ingestion Managementingestion-troubleshootingTroubleshoot ingestion issuesissue (String, optional)
Ingestion Managementingestion-setupGuide for setting up new ingestion pipelinesdataSource (String, optional)
Retention Managementretention-managementManage data retention policiesdatasource (String, optional)
Compactioncompaction-suggestionsOptimize segment compaction configurationdatasource (String, optional), currentConfig (String, optional), performanceMetrics (String, optional)
Compactioncompaction-troubleshootingTroubleshoot compaction issuesissue (String), datasource (String, optional)
Operationsemergency-responseEmergency response procedures and guidanceNone
Operationsmaintenance-modeCluster maintenance proceduresNone

Environment Variables Configuration

The application can be configured using environment variables, which is the recommended approach for production environments. Below is a comprehensive list of supported environment variables derived from the application.yaml configuration file.

Druid Connection

  • DRUID_ROUTER_URL: The URL of the Druid router.
  • DRUID_AUTH_USERNAME: The username for Druid authentication.
  • DRUID_AUTH_PASSWORD: The password for Druid authentication.
  • DRUID_SSL_ENABLED: Enables or disables SSL for Druid connections (true/false).
  • DRUID_SSL_SKIP_VERIFICATION: Skips SSL certificate verification (true/false).
  • DRUID_MCP_SQL_SYNTAX_CORRECTION_ENABLED: Enables or disables automatic SQL syntax correction (default: true). When enabled, automatically formats queries, corrects casing, and quotes identifiers for Druid.
  • DRUID_MCP_SQL_SYNTAX_CORRECTION_CACHE_TTL_MS: The Time-To-Live (TTL) in milliseconds for the cached table and column metadata loaded from Druid (default: 300000 / 5 minutes).

MCP Server Configuration

  • DRUID_MCP_SECURITY_OAUTH2_ENABLED: Enables or disables OAuth2 security for HTTP client authentication (true/false).
  • SPRING_PROFILES_ACTIVE: Comma-separated list of profiles to activate (e.g. query, ops, permissions, health for tools capabilities, or http to enable HTTP server transport instead of default STDIO).
  • SPRING_AI_MCP_SERVER_NAME: The name of the MCP server.
  • SPRING_AI_MCP_SERVER_PROTOCOL: The protocol used by the MCP server (e.g., streamable).

General Server Configuration

  • SERVER_PORT: The port the server listens on.
  • SERVER_SERVLET_SESSION_COOKIE_NAME: The name of the session cookie.
  • SPRING_APPLICATION_NAME: The name of the application.
  • SPRING_CONFIG_IMPORT: Imports additional configuration files.
  • SPRING_MAIN_BANNER_MODE: The mode for the startup banner (e.g., off).

Logging

  • LOGGING_FILE_NAME: The name of the log file.
  • LOGGING_LEVEL_ORG_SPRINGFRAMEWORK_SECURITY: The log level for Spring Security (e.g., DEBUG).

SSL-Encrypted Cluster with Authentication

This section provides comprehensive guidance on connecting to SSL-encrypted Druid clusters with username and password authentication.

Prerequisites

  • SSL-enabled Druid cluster with HTTPS endpoints
  • Valid username and password credentials for Druid authentication
  • SSL certificates properly configured (or ability to skip verification for testing)

Configuration Methods

Method 1: Environment Variables (Recommended for Production)

Set the following environment variables before starting the MCP server:

bash
# Druid cluster URL with HTTPS
export DRUID_ROUTER_URL="https://your-druid-cluster.example.com:8888"

# Authentication credentials
export DRUID_AUTH_USERNAME="your-username"
export DRUID_AUTH_PASSWORD="your-password"

# SSL configuration
export DRUID_SSL_ENABLED="true"
export DRUID_SSL_SKIP_VERIFICATION="false"  # Use "true" only for testing

# Start the MCP server
java -jar target/druid-mcp-server-2.0.1.jar
Method 2: Runtime System Properties

Pass configuration as JVM system properties:

bash
java -Ddruid.router.url="http://localhost:8888" \
     -Ddruid.auth.username="admin" \
     -Ddruid.auth.password="password" \
     -jar target/druid-mcp-server-2.0.1.jar

SSL Configuration Options

Production SSL Setup

For production environments with valid SSL certificates:

bash
export DRUID_ROUTER_URL="https://druid-prod.company.com:8888"
export DRUID_SSL_ENABLED="true"
export DRUID_SSL_SKIP_VERIFICATION="false"

The server will use the system's default truststore to validate SSL certificates.

Authentication Methods

The MCP server supports HTTP Basic Authentication with username and password:

  • Username: Set via DRUID_AUTH_USERNAME or druid.auth.username
  • Password: Set via DRUID_AUTH_PASSWORD or druid.auth.password

The credentials are automatically encoded using Base64 and sent with each request using the Authorization: Basic header.

MCP Client Configuration with SSL

Update your mcp-servers-config.json to include environment variables:

json
{
  "mcpServers": {
    "druid-mcp-server": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-e",
        "DRUID_ROUTER_URL",
        "-e",
        "DRUID_COORDINATOR_URL",
        "-e",
        "DRUID_AUTH_USERNAME",
        "-e",
        "DRUID_AUTH_PASSWORD",
        "-e",
        "DRUID_SSL_ENABLED",
        "-e",
        "DRUID_SSL_SKIP_VERIFICATION",
        "iunera/druid-mcp-server:2.0.1"
      ],
      "env": {
        "DRUID_ROUTER_URL": "http://host.docker.internal:8888",
        "DRUID_COORDINATOR_URL": "http://host.docker.internal:8081",
        "DRUID_AUTH_USERNAME": "",
        "DRUID_AUTH_PASSWORD": "",
        "DRUID_SSL_ENABLED": "false",
        "DRUID_SSL_SKIP_VERIFICATION": "true"
      }
    }
  }
}

MCP Prompt Customization

The server provides extensive prompt customization capabilities through the prompts.properties file located in src/main/resources/.

Prompt Configuration Structure

The prompts.properties file contains:

  1. Global Settings: Enable/disable prompts and set watermarks
  2. Feature Toggles: Control which prompts are available
  3. Custom Variables: Organization-specific information
  4. Template Definitions: Full prompt templates for each feature

Overriding Prompts

You can override any prompt template using Java system properties with the -D flag:

Method 1: System Properties (Runtime Override)

bash
java -Dprompts.druid-data-exploration.template="Your custom template here" \
     -jar target/druid-mcp-server-2.0.1.jar

Method 2: Custom Properties File

  1. Create a custom properties file (e.g., custom-prompts.properties):
properties
# Custom prompt template
prompts.druid-data-exploration.template=My custom data exploration prompt:\n\
1. Custom step one\n\
2. Custom step two\n\
{datasource_section}\n\
Environment: {environment}
  1. Load it at runtime:
bash
java -Dspring.config.additional-location=classpath:custom-prompts.properties \
     -jar target/druid-mcp-server-2.0.1.jar

Available Prompt Variables

All prompt templates support these variables:

VariableDescriptionExample
{environment}Current environment nameproduction, staging, dev
{organizationName}Organization nameYour Organization
{contactInfo}Contact informationyour-team@company.com
{watermark}Generated watermarkGenerated by Druid MCP Server v1.0.0
{datasource}Datasource name (context-specific)sales_data
{query}SQL query (context-specific)SELECT * FROM sales_data

Prompt Template Examples

Custom Data Exploration Prompt

properties
prompts.druid-data-exploration.template=Welcome to {organizationName} Druid Analysis!\n\n\
Please help me explore our data:\n\
{datasource_section}\n\
Environment: {environment}\n\
Contact: {contactInfo}\n\n\
{watermark}

Custom Query Optimization Prompt

properties
prompts.druid-query-optimization.template=Query Performance Analysis for {organizationName}\n\n\
Query to optimize: {query}\n\n\
Please provide:\n\
1. Performance bottleneck analysis\n\
2. Optimization recommendations\n\
3. Best practices for our {environment} environment\n\n\
{watermark}

Disabling Specific Prompts

You can disable individual prompts by setting their enabled flag to false:

properties
mcp.prompts.data-exploration.enabled=false
mcp.prompts.query-optimization.enabled=false

Or disable all prompts globally:

properties
mcp.prompts.enabled=false

MCP Integration

This server uses Spring AI's MCP Server framework and supports both STDIO and SSE transports. The tools, resources, and prompts are automatically registered and exposed through the MCP protocol.

Transport Modes

The Druid MCP Server supports multiple transport modes compliant with MCP 2025-06-18 specification:

Streamable HTTP Transport (Recommended)

The new Streamable HTTP transport provides enhanced performance and scalability with support for multiple concurrent clients:

bash
# Default configuration with Streamable HTTP

java -Dspring.profiles.active=http \
     -jar target/druid-mcp-server-2.0.1.jar
# Server available at http://localhost:8080/mcp (configurable endpoint)

Features:

  • Single Endpoint: One HTTP endpoint handles both POST and GET requests
  • Multiple Clients: Support for concurrent client connections
  • Optional SSE Streaming: Server-Sent Events for real-time updates
  • Enhanced Security: Origin header validation and authentication
  • Backwards Compatibility: Automatic fallback for older MCP clients
  • Keep-alive: Configurable connection health monitoring

Security

  • The Streamable HTTP and SSE modes are secured with OAuth by default. Your MCP client must obtain and send a valid bearer token when connecting.
  • For enterprise SSO integration (OpenID Connect, Azure AD, Keycloak, etc.), please send an inquiry to consulting@iunera.com and see Contact & Support.

STDIO Transport (Command-line Integration)

Perfect for LLM clients and desktop applications:

bash
java -jar target/druid-mcp-server-2.0.1.jar

Legacy SSE Transport (Deprecated)

Still supported for backwards compatibility. It is no longer the default and may be removed in a future version.

Note: The SSE endpoint is secured with OAuth by default. Clients must include a valid bearer token when connecting. For SSO integration support, see Contact & Support.

Metrics Collection

To enhance the product and understand usage patterns, this server collects anonymous usage metrics. This data helps prioritize new features and improvements. You can opt-out of anonymous metrics collection by setting the druid.mcp.metrics.enabled to `false.

🐳 Development Druid Installation

For local development, testing, and learning, a complete Docker Compose setup for running a full Apache Druid cluster is available at iunera/druid-local-cluster-installer.

This setup is the recommended way to get a Druid cluster running for use with this MCP server.

Key Features:

  • Complete Druid Cluster: Includes all core Druid services (Coordinator, Broker, Historical, MiddleManager, Router).
  • One-Command Install: Automated scripts for macOS, Linux, and Windows.
  • Cross-Platform: Runs anywhere Docker is available.
  • Pre-configured: Sensible defaults for local development.
  • Basic Security Enabled: Pre-configured admin user (admin/password).
  • Ready for Ypipe: Designed to work out-of-the-box with iunera/ypipe.

Related Projects

This Druid MCP Server is part of a comprehensive ecosystem of Apache Druid tools and extensions developed by iunera. These complementary projects enhance different aspects of Druid cluster management and data ingestion:

🔧 Druid Cluster Configuration

Advanced configuration management and deployment tools for Apache Druid clusters. This project provides:

  • Automated Cluster Setup: Streamlined configuration templates for different deployment scenarios
  • Configuration Management: Best practices and templates for production Druid clusters
  • Deployment Automation: Tools and scripts for consistent cluster deployments
  • Environment-Specific Configs: Optimized configurations for development, staging, and production environments

Integration with Druid MCP Server: The cluster configurations provided by this project work seamlessly with the monitoring and management capabilities of the Druid MCP Server, enabling comprehensive cluster lifecycle management.

📊 Code Ingestion Druid Extension

A specialized Apache Druid extension for ingesting and analyzing code-related data and metrics. This extension enables:

  • Code Metrics Ingestion: Specialized parsers for code analysis data and software metrics
  • Developer Analytics: Tools for analyzing code quality, complexity, and development patterns
  • CI/CD Integration: Seamless integration with continuous integration and deployment pipelines
  • Custom Data Formats: Support for various code analysis tools and formats

Integration with Druid MCP Server: This extension expands the ingestion capabilities that can be managed through the MCP server's ingestion management tools, providing specialized support for code analytics use cases.

Why Use These Together?

  • Complete Ecosystem: From cluster setup to specialized data ingestion and management
  • Consistent Architecture: All projects follow similar design principles and integration patterns
  • Enhanced Capabilities: Each project extends different aspects of the Druid ecosystem
  • Production Ready: Battle-tested configurations and extensions for enterprise deployments

Roadmap

  • Druid Auto Compaction: Intelligent automatic compaction configuration
  • MCP Auto Completion: Enhanced autocomplete functionality with sampling using McpComplete
  • MCP Notifications: Real-time notifications for MCP operations
  • Proper Observability: Comprehensive metrics and tracing
  • Enhanced Monitoring: Advanced cluster monitoring and alerting capabilities
  • Advanced Analytics: Machine learning-powered insights and recommendations
  • Kubernetes Support: Proper deployment on Kubernetes

About iunera

This Druid MCP Server is developed and maintained by iunera, a leading provider of advanced AI and data analytics solutions.

iunera specializes in:

  • AI-Powered Analytics: Cutting-edge artificial intelligence solutions for data analysis
  • Enterprise Data Platforms: Scalable data infrastructure and analytics platforms (Druid, Flink, Kubernetes, Kafka, Spring)
  • Model Context Protocol (MCP) Solutions: Advanced MCP server implementations for various data systems
  • Custom AI Development: Tailored AI solutions for enterprise needs

As veterans in Apache Druid iunera deployed and maintained a large number of solutions based on Apache Druid in productive enterprise grade scenarios.

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 →

For more information about our services and solutions, visit www.iunera.com.

Contact & Support

Need help? Let


© 2026 iunera. Licensed under the Apache License 2.0.

将 Druid MCP server MCP 与多个 AI 模型配合使用

TypingMind 在工作区级别连接 MCP 工具,因此连接 Druid MCP server 后,您就可以在 TypingMind 中搭配不同的 AI 模型使用,无需为每个模型单独设置。 此 MCP 通过您设备上的 TypingMind MCP 连接器在本地运行。

本地连接器设置指南

如果 MCP 服务器需要访问您电脑上的本地文件、应用或私有资源,请选择此方式。

1

打开 MCP 设置

在 TypingMind 中,依次前往“设置”、“高级设置”和“模型上下文协议”,然后选择“设置连接器”。

  1. 在您的浏览器中打开 TypingMind。
  2. 点击“设置”图标。
  3. 进入“高级设置”。
  4. 打开“模型上下文协议”部分。
  5. 点击“设置连接器”,然后选择“此设备”。
TypingMind MCP 连接器设置界面,已选择“此设备”
2

运行连接器命令

选择“此设备”,从 TypingMind 复制命令并在终端中运行。使用 MCP 时,请保持该进程运行。

  1. 复制 TypingMind 显示的设置命令。
  2. 在 macOS 上打开“终端”,或在 Windows 上打开 Windows Terminal。
  3. 粘贴并运行命令。
  4. 如果终端询问您是否继续,请确认安装软件包。
  5. 使用 MCP 工具时,请勿关闭终端窗口或停止其中的连接器进程。
3

将 Druid MCP server 添加为服务器

当连接器状态为“就绪”时,点击“编辑服务器”,然后粘贴 MCP 服务器配置。

  1. 等待连接器状态显示为“就绪”。
  2. 点击“编辑服务器”。
  3. 粘贴 Druid MCP server MCP 服务器配置。
  4. 保存服务器列表。
  5. 如需确认连接器是否仍处于就绪状态,请刷新。
TypingMind MCP 设置界面,显示正在运行的服务器和“编辑服务器”按钮
{
  "mcpServers": {
    "druid-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

在不同模型中使用同一连接

保存服务器列表,打开“插件”,启用 Druid MCP server MCP 工具,然后在 TypingMind 中选择任意受支持的 AI 模型,即可在聊天中使用这些工具,或将其分配给智能体。

  1. 在 TypingMind 中打开“插件”页面。
  2. 启用 Druid MCP server MCP 工具。
  3. 开始聊天并选择您想使用的 AI 模型。
  4. 在聊天中使用 MCP 工具,或将其分配给 AI 智能体。
  5. 根据需要随时切换到其他 AI 模型,无需重新连接 MCP。
在 TypingMind 聊天中使用已启用的 MCP 工具和选定的 AI 模型
您能使用 Druid MCP server 帮我完成这项任务吗?
Druid MCP server
当然,我看过了。
以下是我使用 Druid MCP server 得到的结果。

常见问题

Druid MCP server MCP 服务器有什么用途?

Druid MCP server 是一个 MCP 服务器,可让兼容的 AI 客户端连接外部工具并获取上下文。在 TypingMind 中,只需添加一次此 MCP 服务器,即可在您的 AI 工作区中使用其工具。

可以在 TypingMind 中让多个 AI 模型使用 Druid MCP server MCP 吗?

可以。TypingMind 在工作区层面连接 MCP 工具,因此您无需为每个模型单独配置 MCP 服务器,就能在 Claude、ChatGPT、Gemini 或您在 TypingMind 中配置的其他 AI 模型中使用 Druid MCP server。

为什么在 TypingMind 中使用 Druid MCP server MCP?

TypingMind 将多个 AI 模型、提示词、插件、AI 智能体、API 密钥和 MCP 工具整合到同一个工作区中,是最出色的大语言模型聊天前端之一。连接 Druid MCP server 后,您可以在偏好的不同模型中使用其 MCP 工具,同时在 TypingMind 中井然有序地管理聊天工作流程。

如何将 Druid MCP server MCP 连接到 TypingMind?

Druid MCP server 通过 TypingMind 本地 MCP 连接器运行。当 MCP 服务器需要访问您计算机上的本地文件、桌面应用、命令行工具或私有资源时,这种方式最合适。

Druid MCP server MCP 在 TypingMind 中提供哪些工具?

Druid MCP server 提供 MCP 功能,您可以在 TypingMind 的插件页面启用这些功能,然后在聊天中使用,或将其分配给 AI 智能体。

使用 Druid MCP server MCP 需要向 TypingMind 提供我的 API 密钥吗?

不需要。TypingMind 采用本地优先的设计,让您自行选择模型提供商,并自行管理 API 密钥、提示词和 MCP 配置。如果 Druid MCP server 需要身份验证,请在创建连接时,为该 MCP 服务器添加所需的请求头、OAuth 设置或本地配置。

相关 MCP 服务器

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇