mcp-xxl-job
This server allows AI assistants to manage XXL-JOB scheduled tasks and executors via natural language. Key capabilities include:
Executor Group Management: List executor groups with details like ID, AppName, and online addresses.
Job Lifecycle: List, query, add, update (with intelligent field merge), delete, start, and stop scheduled jobs.
Manual Execution & Scheduling Preview: Trigger jobs immediately with optional parameter overrides; preview future trigger times for cron or fixed-rate schedules.
Logging & Monitoring: Query execution logs with filters (by job, status, time range); retrieve log content incrementally.
Configuration: Secure auto-login and session maintenance; update jobs without losing unspecified fields.
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., "@mcp-xxl-job查询当前有哪些定时任务"
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.
mcp-xxl-job
MCP Server for XXL-JOB Admin — 通过 MCP 协议让 AI 助手直接管理 XXL-JOB 定时任务。
GitHub Repository:mcp‑xxl‑job
✅ This MCP server is indexed on Glama.ai
功能特性
执行器组管理 — 查询执行器组列表及在线机器地址
任务全生命周期 — 查询、新增、修改、删除、启动、停止定时任务
手动触发执行 — 支持覆盖运行参数、指定执行器地址
调度预演 — 根据 Cron 表达式预演未来触发时间
执行日志 — 分页查询调度记录,增量拉取日志正文
安全设计 — 自动登录、Cookie 会话维护、失效自动重登
防字段丢失 — 修改任务采用「读取-合并-写回」策略
Related MCP server: dws-cli-mcp
提供的 MCP 工具
工具 | 功能 |
| 分页查询执行器组列表 |
| 分页查询任务列表(支持按执行器组、状态、描述等过滤) |
| 查询单个任务完整配置 |
| 新增任务(支持 CRON / FIX_RATE / NONE 调度类型) |
| 修改任务配置(未传入字段保持原值) |
| 删除任务 |
| 启动任务调度 |
| 停止任务调度 |
| 手动触发一次执行 |
| 预演未来触发时间 |
| 分页查询执行日志 |
| 增量拉取日志正文 |
环境要求
Node.js >= 18
XXL-JOB Admin >= 2.3.0
配置
环境变量
变量 | 必填 | 说明 |
| ✅ | 调度中心地址,如 |
| ✅ | 登录用户名 |
| ✅ | 登录密码 |
| ❌ | HTTP 超时(毫秒),默认 15000 |
MCP 客户端配置
在 MCP 客户端(如 Claude Desktop、Cursor、Qoder 等)中添加以下配置:
方式一:全局安装后使用(推荐)
安装:
npm install -g mcp-xxl-job升级:全局安装的版本不会自动更新,需手动升级:
npm update -g mcp-xxl-job # 或 npm install -g mcp-xxl-job@latest
配置:
{
"mcpServers": {
"xxl-job": {
"command": "mcp-xxl-job",
"env": {
"XXL_JOB_URL": "http://127.0.0.1:8080/xxl-job-admin",
"XXL_JOB_USERNAME": "admin",
"XXL_JOB_PASSWORD": "123456"
}
}
}
}方式二:通过 npx 使用
注意:如果你的 npm 配置了国内镜像源(如 npmmirror),npx 可能无法找到包。此时请使用全局安装方式,或指定官方源:
npx --registry=https://registry.npmjs.org mcp-xxl-job@latest包名后加
@latest可确保每次启动都获取最新版本(npx 有本地缓存,不加@latest可能会一直使用缓存的旧版本)。
配置:
{
"mcpServers": {
"xxl-job": {
"command": "npx",
"args": ["-y", "mcp-xxl-job@latest"],
"env": {
"XXL_JOB_URL": "http://127.0.0.1:8080/xxl-job-admin",
"XXL_JOB_USERNAME": "admin",
"XXL_JOB_PASSWORD": "123456"
}
}
}
}提示:如果 npx 方式连接失败,请改用全局安装方式,或在 args 中添加
"--registry=https://registry.npmjs.org"。
使用示例
配置完成后,你可以用自然语言让 AI 助手操作 XXL-JOB:
查询当前有哪些定时任务新增一个任务:执行器组=demo-server,描述=数据同步,Cron=0 0 2 * * ? *,Handler=syncJobHandler停止任务 id=5 的调度查看任务 id=3 最近 10 条执行日志预演 Cron 表达式 0 0/30 * * * ? 的未来触发时间开发
# 克隆项目
git clone https://github.com/shaguocgl/mcp-xxl-job.git
cd mcp-xxl-job
# 安装依赖
npm install
# 编译
npm run build
# 运行
npm start
# 开发模式(自动重新编译)
npm run dev测试
# 冒烟测试
npm run smoke
# 集成测试(需要可用的 XXL-JOB 实例)
npm run test:integration
# 客户端单元测试
npm run test:client项目结构
mcp-xxl-job/
├── src/
│ ├── server.ts # MCP 服务入口,注册所有工具
│ ├── client.ts # XXL-JOB Admin HTTP 客户端
│ ├── config.ts # 环境变量配置加载
│ └── models.ts # 数据结构与校验逻辑
├── tests/
│ ├── smoke.ts # 冒烟测试
│ ├── integration.ts # 集成测试
│ ├── test-client.ts # 客户端测试
│ └── mock-admin.ts # Mock 服务器
├── package.json
├── tsconfig.json
└── .env.example # 环境变量示例技术栈
Runtime: Node.js >= 18
Language: TypeScript
MCP SDK: @modelcontextprotocol/sdk
Schema Validation: Zod
Transport: stdio
许可证
MIT © 2026
Maintenance
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server for scheduling and executing Claude Code CLI tasks via cron expressions, featuring a web dashboard and webhook support. It enables users to dynamically create custom MCP servers, manage recurring AI jobs, and track execution history with token and cost analytics.24MIT
- FlicenseCqualityCmaintenanceMCP server that enables AI agents to control all DingTalk features (messaging, calendar, tasks, approvals, etc.) via natural language using the DingTalk Workspace CLI.83
- AlicenseNot gradedqualityDmaintenanceMCP server enabling AI assistants to manage Rundeck projects, jobs, and executions through a standardized interface.MIT
- AlicenseAqualityCmaintenanceMCP server that exposes all AgileConfig RESTful APIs as tools, enabling AI assistants to manage configuration, applications, users, nodes, and more via natural language.3616MIT
Related MCP Connectors
MCP server for AI dialogue using various LLM models via AceDataCloud
GibsonAI MCP server: manage your databases with natural language
Personal assistant MCP server with search, execute, packages, jobs, secrets, and integrations.
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/shaguocgl/mcp-xxl-job'
If you have feedback or need assistance with the MCP directory API, please join our Discord server