DEV Community

Pytheas
Pytheas

Posted on

I built an MCP server that lets Claude debug failed cron jobs

I built CronSignal, a cron job monitoring service. Recently I added an MCP server so AI tools like Claude Code and Cursor can interact with it directly.

Here's what it does and why I think it's worth setting up.

The debugging loop it replaces

When a cron job fails, the usual flow is: open dashboard, see what's down, SSH into the server, read logs, figure out the problem, fix it. Lots of tab switching.

With the MCP server, you can do most of that from the terminal. Claude has access to your monitors and can pull diagnostics and job output on its own.

What it looks like in practice

The MCP server exposes a few tools: list_checks, create_check, diagnose_check, get_check_output, pause_check, resume_check.

Diagnosing a failure:

"The db-backup check is showing as down, what's going on?"

Claude calls diagnose_check and get_check_output, pulls the stderr from the last run:

pg_dump: error: connection to server failed: FATAL:
password authentication failed for user "backup_user"
Enter fullscreen mode Exit fullscreen mode

It tells you the credentials are wrong without you having to SSH anywhere. CronSignal captures up to 100KB of stdout/stderr per run, so the error is usually right there.

Creating a monitor:

"Set up a monitor for a deploy script that runs every day at 2am"

Claude calls create_check and gives you the curl to add to your crontab. No dashboard needed.

Checking status:

"How are my cron jobs looking?"

Lists all monitors with current status. Faster than opening a browser tab.

Bulk operations:

"Pause the staging monitors, I'm doing a migration"

One sentence instead of clicking through each one.

The useful part: Claude sees your code AND the error

The thing that makes this better than just reading a dashboard is that Claude has context on both sides. It can see the error output from the failed job AND the code that produced it. So instead of just showing you "connection refused," it can tell you why — misconfigured env var, wrong port, whatever.

Setup

Install the MCP server:

npx cronsignal-mcp
Enter fullscreen mode Exit fullscreen mode

Add to your Claude Code or Cursor config:

{
  "mcpServers": {
    "cronsignal": {
      "command": "npx",
      "args": ["-y", "cronsignal-mcp"],
      "env": {
        "CRONSIGNAL_API_KEY": "cs_live_..."
      }
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

API key is at cronsignal.io → Settings → API Keys.

What is CronSignal

If you haven't seen it — CronSignal monitors cron jobs using heartbeat pings. You add a curl after your command:

0 2 * * * /scripts/backup.sh && curl -fsS https://api.cronsignal.io/ping/YOUR_ID
Enter fullscreen mode Exit fullscreen mode

If the ping doesn't arrive on time, you get alerted via email, Slack, Discord, Telegram, or webhook. Free tier has 3 monitors. Pro is $5/month for unlimited.

The MCP server is a layer on top — it gives AI tools access to the same API you'd normally use through the dashboard.

Links

Top comments (0)