Cron Mcp

io.github.takeaseatventure由 GitHub 账号 takeaseatventure 发布v0.1.2更新于 Oct 25, 2026

MCP cron validator for AI agents; flags impossible schedules and other silent cron bugs.

发布方自己的服务:Croncool Cron Jobs

已验证STDIO仅桌面效率与工作流开发者工具

概览

AI 生成的概览

一个本地 MCP 服务器,让 AI 助手解析、校验、解释和预览 cron 表达式,在部署前标出不可能或高风险的调度。

可以做什么
把 cron 表达式解析为说明其触发时间的通俗英文描述,支持 5 字段标准 cron 以及 L、W、# 和月份/星期名称写法。深度校验调度,检查不可能日期、日与星期的 OR 语义、午夜高峰、不均匀步长和闰年边界,并估算触发频率。计算接下来 N 次触发时间,以 ISO-8601 时间戳和相对偏移给出。查询常见且经过验证的预设调度库,例如每 5 分钟、每小时、工作日 9 点、每月和每季度。
适用场景
适合在编写或审查定时任务、CI 流水线或计划任务的 cron 调度时使用,让助手在任务部署前发现永不触发、日与星期 OR 陷阱等隐蔽错误。也适合解释已有表达式或生成下次触发预览。
运行要求
作为本地 stdio 进程在用户机器上运行,通过 npm 包 cron-mcp-server 安装(全局安装或 npx),需要 Node.js。未声明认证、环境变量或请求头。需在 Claude Desktop、Cursor 或 VS Code Copilot 等桌面客户端中配置启动。
安装前请注意
这些工具只对用户提供的表达式做只读分析;README 未描述写入、发送或向第三方传输数据。它只是对内置 cron 引擎的薄封装,结果取决于该引擎对 cron 语义的解释。不要求任何凭据。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Cron Mcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

cron-mcp

An MCP (Model Context Protocol) server that lets AI coding agents — Claude, Cursor, Copilot, Cline — parse, validate, explain, and preview cron expressions.

Built to catch silent cron bugs (impossible schedules, OR-semantics gotchas, midnight spikes) before a job is deployed — a class of mistake that's easy to make and hard to notice until a critical job silently fails to fire.

Why

Cron expressions are deceptively tricky. Common silent failures:

  • 0 0 30 2 * → never runs (February has no 30th). Syntactically valid, semantically dead.
  • 0 0 1,15 * 1 → fires on the 1st OR 15th OR Monday, not "the 1st and 15th if Monday" (the classic dom+dow OR-semantics trap).
  • */7 * * * * → uneven step; intervals drift (:00, :07, :14, …, :56, :00 — not "every 7 minutes" cleanly).
  • 0 0 * * * → midnight spike; every job in the system competes at 00:00.

cron-mcp surfaces these as warnings, observations, and suggestions that the AI agent can act on — before you ship the schedule.

Tools exposed

ToolDescription
parse_cronParse a cron expression → plain-English description of when it fires. Supports 5-field standard cron + L (last), W (nearest weekday), # (nth weekday), named months/days.
validate_cronDeep validation: impossible schedules, OR-semantics, midnight spikes, uneven steps, leap-year edges, frequency estimate (~runs/year).
next_runsCompute the next N fire times as ISO-8601 + relative offsets.
cron_presetsLibrary of common, proven schedules (every 5 min, hourly, weekdays 9am, monthly, quarterly, …).

Install

bash
npm install -g cron-mcp-server

Published links

Configure

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or the equivalent on your OS:

json
{  "mcpServers": {    "cron": {      "command": "cron-mcp-server",      "args": []    }  }}

Cursor

Add to .cursor/mcp.json (or ~/.cursor/mcp.json for global):

json
{  "mcpServers": {    "cron": {      "command": "cron-mcp-server"    }  }}

VS Code (Copilot)

json
{  "mcp.servers": {    "cron": {      "type": "stdio",      "command": "cron-mcp-server"    }  }}

Direct (no install)

bash
npx cron-mcp-server

Example usage

Once connected, just ask the agent in natural language:

  • "Validate this cron: 0 0 30 2 *"
  • "When does */5 * * * * next fire?"
  • "Give me a cron for every weekday at 9am"
  • "Is there anything risky about 0 0 1,15 * 1?"

The agent calls the tools and returns structured, actionable results.

Engine

The cron engine is battle-tested: 638 lines, zero dependencies, originally extracted from a browser-based cron generator and hardened with 69 unit tests. This MCP server is a thin tool wrapper around it.

License

MIT © takeaseatventure

来源:README.md,提交 902a68e

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.2最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

其他 Cron 集成