Apache Druid MCP Server
Provides tools for executing SQL queries, listing datasources, retrieving metadata, and testing connectivity to Apache Druid clusters.
Click on "Install 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 Serverlist 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
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | SQL query to execute (e.g., SELECT * FROM datasource LIMIT 10) | |
| context | No | Optional query context parameters |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
There are no annotations, and the description doesn't disclose any behavioral traits beyond the action itself. It doesn't mention whether the tool supports read-only queries, if there are permissions required, or any limitations on SQL statements. The description adds no transparency beyond the tool's name.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, direct sentence that is concise and front-loaded with the core action. There is no unnecessary filler or restatement.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
While the description is clear, it lacks context about return formats, error behaviors, or how the 'context' parameter affects execution. Since there is no output schema, an agent might not know what to expect in the results. However, the tool is straightforward enough that a lengthier description may not be required.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already provides full descriptions for both parameters, including an example for the 'query' parameter. The description offers no additional parameter semantics, so the baseline of 3 applies due to high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's verb ('Execute'), resource ('SQL query against Apache Druid'), and outcome ('return results'). This distinguishes it from sibling tools like list_datasources or test_connection, which serve different purposes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It does not mention, for example, that this is for querying data while list_datasources is for exploring available datasources. The agent must infer use cases.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_datasource_metadataA
Get detailed metadata for a specific datasource including schema, size, and segments
| Name | Required | Description | Default |
|---|---|---|---|
| datasource | Yes | Name of the datasource to get metadata for |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It implies a read-only operation via 'Get' and lists return content (schema, size, segments), but does not explicitly state side effects, permissions, or error behavior. The 'Get' verb provides some transparency, but it is not fully explicit.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence with no wasted words. It immediately communicates the purpose and key content, making it highly concise and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is simple with one parameter and no output schema, so the description sufficiently covers the essentials by mentioning 'schema, size, and segments' as return values. It does not need to explain additional details like pagination or complex return structures, but could have added a note about error conditions or auth requirements for completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema fully defines the single 'datasource' parameter with a description, so the schema coverage is 100%. The tool description adds no extra semantic detail about the parameter beyond what the schema already provides, thus the baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Get') and resource ('datasource'), clearly stating the action and what is included ('schema, size, and segments'). It distinguishes itself from sibling tools like list_datasources (listing vs. details) and execute_sql_query (query vs. metadata).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description makes clear the tool is used for a specific datasource, which implicitly sets it apart from list_datasources. However, it lacks explicit 'when to use' or 'when not to use' guidance or named alternatives, so it earns 4 rather than 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_datasourcesA
Get a list of all available datasources in Druid
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description is the sole source of behavioral information. It conveys that the tool is a read-only operation returning a list, but it does not disclose details such as potential errors, completeness guarantees, or whether the list contains only metadata or full objects. It is neither misleading nor rich, so a midpoint score is warranted.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence with no redundant words. It states the action and the target resource concisely, earning a perfect score for brevity and focus.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (zero parameters, no output schema, no annotations), the description provides adequate context for an agent to know what the tool does. It could be more explicit about the return format (e.g., names vs. full metadata), but it remains complete for a basic listing operation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool accepts zero parameters, so the schema is empty and the description adds all necessary context. According to the rubric, the baseline for 0 parameters is 4. The description clarifies that no input is needed to list all datasources, which is sufficient.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Get') and resource ('list of all available datasources in Druid'), making its purpose immediately clear. It distinguishes itself from sibling tools like execute_sql_query, get_datasource_metadata, and test_connection by virtue of focusing solely on listing datasources.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description clearly implies when to use the tool: when you need an overview of available datasources. While it does not explicitly exclude alternatives or mention sibling tools, the context is unambiguous. A score of 4 is appropriate because the guidance is implicit but strong; a 5 would require explicit 'when not to use' or named alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
test_connectionB
Test connection to the Druid cluster
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. 'Test connection' implies a read-only check, but the description does not disclose what the test entails, whether it has side effects, or what it returns on success/failure.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence with no filler, making it appropriately sized for a simple tool. It could be slightly more explanatory, but it is efficient and front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema and no annotations, the description does not explain return values or expected behavior. It is too minimal to fully prepare an agent to use the tool correctly, especially given the lack of structured context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, and the schema confirms an empty object. Baseline for 0 parameters is 4; the description does not need to compensate for missing parameter documentation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb 'Test' and identifies the resource 'connection to the Druid cluster' clearly. This distinguishes it from sibling tools like execute_sql_query or list_datasources which perform different operations.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided regarding when to use this tool versus alternatives. The description only states what it does, without any context on prerequisites, exclusions, or recommended usage patterns.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
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
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Ask data questions in natural language. Get SQL, insights, and charts from your databases.
Your Databricks Lakehouse in natural language: run SQL on your SQL warehouses, track long-running qu
Query your org's data in natural language — read-only MCP access to SQL, NoSQL, files & warehouses.
Query BigQuery, Snowflake, Redshift & Azure Synapse with natural language
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables querying and managing PostgreSQL and MySQL databases through natural language, supporting connection management, query execution, schema inspection, and parameterized queries with connection pooling.5364MIT
- AlicenseAqualityDmaintenanceEnables 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.1490712MIT
- AlicenseNot gradedqualityDmaintenanceEnables executing SQL queries, listing databases, and listing tables on a ClickHouse cluster through natural language.Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables executing SQL queries, schema introspection, and data management for PostgreSQL and MySQL databases via natural language, supporting local, SSH, and AWS RDS connections.83MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/AnilPuram/apache-druid-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server