DolphinScheduler MCP Server
Wraps the Apache DolphinScheduler REST API to let AI agents query and operate projects, workflow definitions and instances, task definitions and logs, schedules, alerts, environments, clusters, task groups, data sources, worker groups, namespaces, access tokens, and monitoring/audit data.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
DolphinScheduler MCP Server
把 Apache DolphinScheduler 的 REST API 封装成 Model Context Protocol 工具,让 AI Agent 可以直接查询和操作 DolphinScheduler。
传输方式:stdio(由 MCP 客户端拉起子进程,无需常驻端口)
工具数量:169 个,覆盖项目、工作流定义/任务定义、工作流实例、任务日志、监控与统计、告警、环境、集群、任务组、定时调度、数据源、Worker 分组、审计日志、令牌等
实测环境:DolphinScheduler 2.0 风格 REST API(
/dolphinscheduler上下文路径)
上游 README 中「
pip install dolphinscheduler-mcp」和「HTTP 8089 端口」的说法与实际代码不符:该包未发布到 PyPI,且FastMCP.run()默认就是 stdio。本仓库按实际实现整理。
环境要求
Python >= 3.10(依赖
mcp>=1.2,<2,mcp 1.x 要求 3.10+)可访问的 DolphinScheduler API,例如
http://localhost:12345/dolphinscheduler一枚 DolphinScheduler 令牌
Related MCP server: airflow-mcp-server
安装
git clone <本仓库地址> dolphinscheduler-mcp
cd dolphinscheduler-mcp
python -m venv .venv
source .venv/bin/activate
pip install -e .安装后可用入口命令:ds-mcp。
配置
通过环境变量配置,也可以在 MCP 客户端的配置里用 env 传入:
变量 | 说明 | 默认值 |
| DS API 地址(含 |
|
| DS 访问令牌,请求时作为 | 空 |
| 日志级别 |
|
令牌获取:登录 DS Web UI → 右上角用户名 → 安全中心 → 令牌管理 → 创建令牌(需管理员或有权限的账号),复制后填入配置。
接入 MCP 客户端
以 Trae / Claude Desktop 的 mcp.json 为例:
{
"mcpServers": {
"dolphinscheduler": {
"command": "/path/to/.venv/bin/python",
"args": ["-m", "dolphinscheduler_mcp"],
"env": {
"DOLPHINSCHEDULER_API_URL": "http://localhost:12345/dolphinscheduler",
"DOLPHINSCHEDULER_API_KEY": "你的令牌"
}
}
}
}也可以直接用入口命令:
{
"mcpServers": {
"dolphinscheduler": {
"command": "ds-mcp",
"env": {
"DOLPHINSCHEDULER_API_URL": "http://localhost:12345/dolphinscheduler",
"DOLPHINSCHEDULER_API_KEY": "你的令牌"
}
}
}
}配置完成后重启客户端,MCP 列表出现 dolphinscheduler 即接入成功。
工具清单
领域 | 数量 | 主要工具 |
工作流定义 | 12 |
|
工作流实例 | 12 |
|
任务日志 | 2 |
|
实例运维 | 3 |
|
监控与统计 | 6 |
|
任务定义 | 10 |
|
告警 | 12 |
|
环境 | 7 |
|
集群 | 7 |
|
任务组(资源队列) | 10 |
|
定时调度 | 7 |
|
数据源 | 15 |
|
项目 | 13 |
|
任务关系/血缘 | 12 |
|
Worker 分组 | 7 |
|
命名空间 | 7 |
|
项目参数 | 6 |
|
访问令牌 | 6 |
|
审计日志 | 3 |
|
项目偏好 | 3 |
|
Azure Data Factory | 3 |
|
其他 | 6 | UI 插件、动态任务类型、环境检查等 |
版本兼容说明
不同 DolphinScheduler 版本的接口路径不一致,本仓库按 DS 2.0 风格实现:
工作流定义为单数:
/projects/{projectCode}/process-definition工作流实例、任务实例、定时调度为复数:
/process-instances、/task-instances、/scheduleslist_schedules必须传process_definition_code,否则 DS 返回10080 query schedule list paging errorcreate_schedule/update_schedule以 query 参数 传递scheduleJSON 字符串(DS 2.0 风格)统计接口
startDate/endDate必须传yyyy-MM-dd HH:mm:ss格式,只传日期会返回10001 request parameter startDate,endDate is not valid
实测 DS 3.1.9 上以下接口不可用,故未封装:GET /projects/{p}/process-instances/top-n(稳定报 10116 query process instance by id error)、/projects/analysis/listErrorCommand 与 listCommand(返回 UI 页面 HTML 而非 JSON)。
升级到 DS 3.x 时,工作流定义需改为复数路径 /process-definitions,其余按目标版本接口文档调整。
开发
新增工具:在 src/dolphinscheduler_mcp/tools_generated/ 下新建 *_tools.py,实现 register_xxx_tools(mcp),并在同目录 __init__.py 中导入与调用。参考 process_definition_tools.py 的写法(使用 @mcp.tool 装饰器,异步函数 + 类型注解生成参数 schema)。
pip install -e ".[dev]"
pytest自动化巡检(可选)
scripts/triage_github.py 每日拉取新增/更新的 Issue 与 PR,按 bug / pr / feature / docs / question 分诊,生成 .agent/reports/YYYY-MM-DD.md(已在 .gitignore 中忽略)。脚本只读:不评论、不打标签、不改代码;状态记录在 .agent/state.json,同一条目更新后会重新进入报告。
cron 示例(每天 08:00,凭据单独存放并 chmod 600):
0 8 * * * set -a; . ~/.config/ds-mcp-triage.env; set +a; cd /path/to/dolphinscheduler-mcp && python3 scripts/triage_github.py >> .agent/triage.log 2>&1~/.config/ds-mcp-triage.env 内容:
GITHUB_TOKEN=你的_PAT
GITHUB_REPO=Chris-Lea/dolphinscheduler-mcp处理约定(Agent 或人工执行):
逐条判断:可复现 → 从
main拉agent/issue-<n>分支修复并开 PR;需澄清 → 在 issue 下回复;不处理 → 说明原因并标记wontfix不直接推
main,所有代码改动必须走 PR 并通过 CI回复注明「由 AI 辅助生成,已人工确认」,并附 PR 链接
单日配额:5 个 PR / 20 条评论,超出转人工
危险改动(
.github/workflows、依赖版本、删除文件、权限)只评论不改码不 checkout 或执行外部 PR 的代码,只在主分支上改
License
Apache License 2.0,见 LICENSE。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
AI-callable tools for API mocking, testing, monitoring, security, and automation.
660+ data tools for agents: TikTok, Douyin, Instagram, YouTube, X, weather, GitHub. Pay per call.
Unofficial. All 458 Vercel API operations as tools, with approval prompts. By Octri.
1Unofficial. All 360 OpenAI API operations as tools, with approval prompts. By Octri.
1
Related MCP Servers
- AlicenseCqualityDmaintenanceProvides tools for AI assistants to list, search, and get details of YApi interfaces.6ISC
- AlicenseAqualityBmaintenanceEnables Claude to inspect and operate Apache Airflow over its REST API, providing read tools and safe write operations (gated by read-only mode) for managing DAGs, runs, tasks, and pools.14MIT
- AlicenseNot gradedqualityBmaintenanceA comprehensive MCP server and CLI that exposes the entire Dify console API as 138 tools, enabling AI agents to programmatically build, test, and publish Dify workflows and manage all aspects of the Dify platform.33Apache 2.0

dolphin-mcp-pilotofficial
AlicenseBqualityBmaintenanceProduction-ready MCP server for Apache DolphinScheduler. Enables AI agents to operate data workflows end-to-end with 58 tools covering DAG creation, schedule management, instance control, guided troubleshooting, serial backfills, and version rollback.5826Apache 2.0