imply-druid-mcp
A read-only MCP server for Imply Cloud/Druid databases, enabling AI assistants to execute SQL queries, list tables, and explore dashboards and data cubes.
README
imply-druid-mcp
A read-only MCP (Model Context Protocol) server for Imply Cloud/Druid databases. Query and explore your Druid data through Claude and other AI assistants.
Features
Supported ✅
- SQL Query Execution
- Synchronous query execution
- Asynchronous query execution (for large datasets)
- Query Management
- Check query status
- Retrieve query results
- Cancel running queries
- Table Operations
- List all tables in project
- Get table schema details
- Dashboard Operations
- List all dashboards
- Get dashboard details
- Data Cube Operations
- List all data cubes
- Get data cube details
- Execute Pivot SQL queries
Not Supported ❌
- Data Ingestion
- Table/Schema Creation or Modification
- User/Permission Management
- Supervisor Management
Tools
Query Tools
| Tool | Description |
|---|---|
execute_sql_query |
Execute a SQL query synchronously and return results immediately |
execute_async_query |
Execute a SQL query asynchronously for large datasets. Returns a query ID |
get_query_results |
Retrieve results from an async query using query ID |
get_query_status |
Check the execution status of an async query |
cancel_query |
Cancel a running async query |
Table Tools
| Tool | Description |
|---|---|
list_tables |
List all tables (datasources) in the Druid project |
get_table_schema |
Get detailed schema information for a specific table |
Dashboard Tools
| Tool | Description |
|---|---|
list_dashboards |
List all dashboards in the Imply project |
get_dashboard |
Get detailed information about a specific dashboard |
Data Cube Tools
| Tool | Description |
|---|---|
list_data_cubes |
List all data cubes in the Imply project |
get_data_cube |
Get detailed data cube information including dimensions and measures |
query_data_cube |
Execute Pivot SQL query against a data cube |
API Mapping
This MCP server maps to the Imply Polaris API:
| MCP Tool | Imply API Endpoint |
|---|---|
execute_sql_query |
POST /v1/projects/{projectId}/query/sql |
execute_async_query |
POST /v1/projects/{projectId}/query/sql/statements |
get_query_results |
GET /v1/projects/{projectId}/query/sql/statements/{queryId}/results |
get_query_status |
GET /v1/projects/{projectId}/query/sql/statements/{queryId} |
cancel_query |
DELETE /v1/projects/{projectId}/query/sql/statements/{queryId} |
list_tables |
GET /v1/projects/{projectId}/tables |
get_table_schema |
GET /v1/projects/{projectId}/tables/{tableName} |
list_dashboards |
GET /v1/projects/{projectId}/dashboards |
get_dashboard |
GET /v1/projects/{projectId}/dashboards/{dashboardId} |
list_data_cubes |
GET /v1/projects/{projectId}/data-cubes |
get_data_cube |
GET /v1/projects/{projectId}/data-cubes/{cubeName} |
query_data_cube |
POST /v0/projects/{projectId}/pivot/data-cube-sql/query |
Installation
Using uvx (Recommended)
uvx imply-druid-mcp
Using pip
pip install imply-druid-mcp
imply-druid-mcp
Using pipx
pipx install imply-druid-mcp
imply-druid-mcp
Configuration
| Environment Variable | Required | Default | Description |
|---|---|---|---|
IMPLY_ORGANIZATION |
Yes | - | Imply Cloud organization name |
IMPLY_REGION |
Yes | - | Region (e.g., us-east-1) |
IMPLY_CLOUD_PROVIDER |
Yes | - | Cloud provider: aws, gcp, or azure |
IMPLY_PROJECT_ID |
Yes | - | Imply project ID |
IMPLY_API_KEY |
Yes* | - | Imply API key |
IMPLY_ACCESS_TOKEN |
Yes* | - | OAuth access token (alternative) |
LOG_LEVEL |
No | INFO |
Logging level |
DEFAULT_QUERY_TIMEOUT_MS |
No | 30000 |
Default query timeout (ms) |
MAX_QUERY_LENGTH |
No | 10000 |
Maximum SQL query length |
*Either IMPLY_API_KEY or IMPLY_ACCESS_TOKEN is required.
Claude Desktop Setup
Add to your Claude Desktop config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"imply-druid": {
"command": "uvx",
"args": ["imply-druid-mcp"],
"env": {
"IMPLY_ORGANIZATION": "your-org",
"IMPLY_REGION": "us-east-1",
"IMPLY_CLOUD_PROVIDER": "aws",
"IMPLY_PROJECT_ID": "your-project-id",
"IMPLY_API_KEY": "your-api-key"
}
}
}
}
Usage Examples
User: Show me all tables in my Druid project
Claude: [Uses list_tables]
- wikipedia (datasource)
- events (datasource)
- metrics (datasource)
User: Query the top 10 records from wikipedia table
Claude: [Uses execute_sql_query with "SELECT * FROM wikipedia LIMIT 10"]
[Results displayed]
User: Show me all data cubes
Claude: [Uses list_data_cubes]
- sales_cube: Sales Analytics (source: sales_table)
- events_cube: Events Tracking (source: events)
User: Query the sales data cube for top cities
Claude: [Uses query_data_cube with Pivot SQL syntax]
SELECT "DIM:city" AS "City", MEASURE_BY_ID('total_sales') AS "Sales"
FROM "datacube"."sales_cube"
ORDER BY 2 DESC
LIMIT 10
Development
git clone https://github.com/yeongbin-hwang/imply-druid-mcp.git
cd imply-druid-mcp
pip install -e ".[dev]"
License
MIT License - see LICENSE for details.
Resources
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。