Apache Druid MCP Server
Provides tools for executing SQL queries, listing datasources, retrieving metadata, and testing connectivity to Apache Druid clusters.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Apache Druid MCP Server list all datasources"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Apache Druid MCP Server
Model Context Protocol (MCP) server for Apache Druid - provides tools and resources for querying and managing Druid datasources through Claude Desktop, VS Code, and other MCP clients.
Features
🔍 Execute SQL queries against Apache Druid
📊 List and explore datasources
📋 Get detailed metadata including schema, segments, and size information
🔗 Test Druid cluster connectivity
🚀 Multiple transport protocols: stdio (default) and Server-Sent Events (SSE)
🐳 Docker support via published image
Related MCP server: MS SQL Server MCP Server
Quick Start
NPX (Recommended)
npx apache-druid-mcpDocker
# Run with SSE transport
docker run -p 3000:3000 \
-e DRUID_URL=https://your-druid-cluster.com:8888 \
-e DRUID_USERNAME=your-username \
-e DRUID_PASSWORD=your-password \
anilreddy399/apache-druid-mcp:latest --transport sse --port 3000
# Run with stdio transport (for direct MCP communication)
docker run -i \
-e DRUID_URL=https://your-druid-cluster.com:8888 \
-e DRUID_USERNAME=your-username \
-e DRUID_PASSWORD=your-password \
anilreddy399/apache-druid-mcp:latestLocal Development
npm install
npm run build
npm startConfiguration
Environment Variables
DRUID_URL- Druid router/broker URL (default:http://localhost:8888)DRUID_USERNAME- Authentication username (required for most production clusters)DRUID_PASSWORD- Authentication password (required for most production clusters)DRUID_TIMEOUT- Request timeout in milliseconds (default:30000)
Transport Options
# Default stdio transport (for MCP clients)
apache-druid-mcp
# SSE transport for HTTP-based clients
apache-druid-mcp --transport sse --port 3000Claude Desktop Integration
Add this configuration to your Claude Desktop config file:
macOS
~/Library/Application Support/Claude/claude_desktop_config.json
Windows
%APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"apache-druid": {
"command": "npx",
"args": ["apache-druid-mcp"],
"env": {
"DRUID_URL": "https://your-druid-cluster.com:8888",
"DRUID_USERNAME": "your-username",
"DRUID_PASSWORD": "your-password"
}
}
}
}For local development (no authentication):
{
"mcpServers": {
"apache-druid": {
"command": "npx",
"args": ["apache-druid-mcp"],
"env": {
"DRUID_URL": "http://localhost:8888"
}
}
}
}VS Code Integration
Using MCP Extension
Install the MCP extension for VS Code
Add to your VS Code settings.json:
{
"mcp.servers": {
"apache-druid": {
"command": "npx",
"args": ["apache-druid-mcp"],
"env": {
"DRUID_URL": "https://your-druid-cluster.com:8888",
"DRUID_USERNAME": "your-username",
"DRUID_PASSWORD": "your-password"
}
}
}
}Using Codeium or Continue.dev
For HTTP-based AI coding assistants, use SSE transport:
{
"mcpServers": [
{
"name": "apache-druid",
"url": "http://localhost:3000/sse",
"env": {
"DRUID_URL": "https://your-druid-cluster.com:8888",
"DRUID_USERNAME": "your-username",
"DRUID_PASSWORD": "your-password"
}
}
]
}Start the server with SSE transport:
npx apache-druid-mcp --transport sse --port 3000Available Tools
The MCP server provides these tools for interacting with Apache Druid:
execute_sql_query
Execute SQL queries against Druid datasources.
Parameters:
query(string, required) - SQL query to executecontext(object, optional) - Query context parameters
Example:
SELECT __time, page, COUNT(*) as views
FROM wikipedia
WHERE __time >= CURRENT_TIMESTAMP - INTERVAL '1' HOUR
GROUP BY 1, 2
ORDER BY views DESC
LIMIT 10list_datasources
Get a list of all available datasources in the Druid cluster.
get_datasource_metadata
Get detailed metadata for a specific datasource including schema, segments, size, and intervals.
Parameters:
datasource(string, required) - Name of the datasource
test_connection
Test connectivity to the Druid cluster and return status information.
Available Resources
Access Druid cluster information through these resources:
druid://cluster/status- Current cluster status and healthdruid://datasources- List of all datasourcesdruid://datasource/{name}- Detailed metadata for specific datasource
Examples
Basic Usage
# Start with default settings
npx apache-druid-mcp
# Connect to remote Druid cluster
DRUID_URL=https://druid.example.com:8888 npx apache-druid-mcp
# With authentication
DRUID_URL=https://secure-druid.com:8888 \
DRUID_USERNAME=admin \
DRUID_PASSWORD=secret \
npx apache-druid-mcpUsing with Claude Desktop
Once configured, you can ask Claude:
"Show me the available datasources in Druid"
"Query the wikipedia datasource for top pages in the last hour"
"What's the schema of the events datasource?"
"Test the connection to Druid"
Advanced Configuration
# Custom timeout and SSE transport
DRUID_TIMEOUT=60000 npx apache-druid-mcp --transport sse --port 8080License
Apache License 2.0
Available Tools
4 toolsexecute_sql_queryB
Execute a SQL query against Apache Druid and return results
Inputs: query (required), context.
get_datasource_metadataA
Get detailed metadata for a specific datasource including schema, size, and segments
Inputs: datasource (required).
list_datasourcesA
Get a list of all available datasources in Druid
Inputs: no named parameters.
test_connectionB
Test connection to the Druid cluster
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose: querying, listing datasources, retrieving metadata for a specific datasource, and testing connectivity. No overlapping or ambiguous responsibilities.
All tool names follow a consistent verb_noun pattern in snake_case (execute_sql_query, list_datasources, get_datasource_metadata, test_connection). The naming is predictable and homogeneous.
With exactly 4 tools, the server is well-scoped for a focused Druid integration. Each tool addresses a core need without unnecessary bloat or minimalism.
The tool surface covers the essential workflows for a Druid MCP server: testing connectivity, exploring datasources, inspecting metadata, and executing SQL queries. There are no obvious gaps for the intended use case.
Maintenance
Related MCP Connectors
Query, explore, and manage your databases through natural conversation.
Your Databricks Lakehouse in natural language: run SQL on your SQL warehouses, track long-running qu
Ask your databases questions in plain English, run read-only SQL and set up data alerts.
Query Postgres, MySQL, SQL Server, Oracle, BigQuery, ClickHouse and Redshift from your AI client.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables querying and managing PostgreSQL and MySQL databases through natural language, supporting connection management, query execution, schema inspection, and parameterized queries with connection pooling.515 npm4MIT
- AlicenseAqualityCmaintenanceEnables interaction with Microsoft SQL Server and Azure SQL databases through natural language, supporting queries, schema exploration, stored procedures, and complete database operations with connection pooling and security features.141,129 npm14MIT
- AlicenseAqualityDmaintenanceEnables executing SQL queries, schema introspection, and data management for PostgreSQL and MySQL databases via natural language, supporting local, SSH, and AWS RDS connections.8236 npmMIT
- AlicenseNot gradedqualityDmaintenanceEnables natural language querying of SQL databases using AI, supporting multiple database types and automatic schema discovery.1MIT