XXL-JOB MCP Server

XXL-JOB MCP Server

mcp-xxl-job•byshaguocgl

An MCP server that lets AI assistants manage XXL-JOB scheduled tasks through the MCP protocol, covering executors, jobs, triggers, and logs.

License: MIT•Runtime: Awaiting documentation review•Category: developer tools

WHAT IT DOES

  • •Manages the full lifecycle of scheduled tasks, including querying, adding, modifying, deleting, starting, and stopping jobs.
  • •Lists executor groups with their online machine addresses.
  • •Supports manually triggering a job execution, optionally overriding run parameters and specifying an executor address.
  • •Paginates execution logs and incrementally fetches log content, and previews future trigger times from Cron expressions.

BEST FOR

  • •Developers using natural language to inspect and operate existing XXL-JOB scheduled tasks.
  • •Creating a new scheduled task by specifying executor group, description, Cron, and handler.
  • •Reviewing recent execution logs or previewing Cron trigger times for an existing job.

ABOUT MCP-XXL-JOB

XXL-JOB MCP Server is cataloged as an MCP server attributed to shaguocgl. An MCP server that lets AI assistants manage XXL-JOB scheduled tasks through the MCP protocol, covering executors, jobs, triggers, and logs. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for XXL-JOB MCP Server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

How does the server handle authentication to XXL-JOB Admin?

It signs in automatically, keeps a Cookie session, and signs in again automatically when the session expires.

Does updating a task overwrite fields that are not provided?

No; updates use a read-merge-write-back strategy, so fields not passed in keep their original values.

上游原版 README

在 GitHub 查看同一版本原文

README.md · d03fe48c7605 · 采集于 2026-11-13 14:11:42 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

mcp-xxl-job

npm version License: MIT Node.js >= 18

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 会话维护、失效自动重登
  • 防字段丢失 — 修改任务采用「读取-合并-写回」策略

提供的 MCP 工具

工具功能
list_job_groups分页查询执行器组列表
list_jobs分页查询任务列表(支持按执行器组、状态、描述等过滤)
get_job查询单个任务完整配置
add_job新增任务(支持 CRON / FIX_RATE / NONE 调度类型)
update_job修改任务配置(未传入字段保持原值)
remove_job删除任务
start_job启动任务调度
stop_job停止任务调度
trigger_job手动触发一次执行
preview_next_trigger_times预演未来触发时间
list_job_logs分页查询执行日志
get_job_log_content增量拉取日志正文

环境要求

  • Node.js >= 18
  • XXL-JOB Admin >= 2.3.0

配置

环境变量

变量必填说明
XXL_JOB_URL✅调度中心地址,如 http://127.0.0.1:8080/xxl-job-admin
XXL_JOB_USERNAME✅登录用户名
XXL_JOB_PASSWORD✅登录密码
XXL_JOB_TIMEOUT_MS❌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

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for XXL-JOB MCP Server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/mcp-xxl-job)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related developer tools MCP Servers

Alternative and complementary servers in the same category

View all in developer tools →
Postbye
postbye-mcp•postbye-team

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools
Singapore Proxy MCP
singapore-proxy-mcp•Xavierfok

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

0
Developer Tools

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools