Let Claude Code add monitoring to your jobs
When Claude Code writes a scheduled job, it can also create the Pingstack check that watches it. Connected over MCP, Claude reads your job’s schedule, creates a heartbeat check to match, and adds a success-only report step that reads the ping URL from a secret you set yourself.
By the end of this recipe Claude Code will be connected to your Pingstack account, one of your jobs will have a matching check, and your project can ask Claude to do the same for every new job.
1. Connect Claude Code
Section titled “1. Connect Claude Code”Add the Pingstack server and sign in through your browser:
claude mcp add --transport http pingstack https://pingstack.io/mcpInside Claude Code, run /mcp, choose pingstack and authenticate. An Owner
or Admin approves the connection and its permissions. The connection needs
permission to create checks. Leave heartbeat URL access off, as it is by
default: Claude doesn’t need to read ping URLs for this recipe. See browser sign-in for details.
Confirm the connection with a read-only request:
Read my Pingstack account capabilities and list my checks. Don’t change anything.
Claude should name the account you approved. If it names a different one, disconnect it in Pingstack settings and connect again.
2. Ask Claude to monitor a job
Section titled “2. Ask Claude to monitor a job”Point Claude at a job in your project:
Look at the nightly export job in
.github/workflows/export.yml. Propose a Pingstack heartbeat check that matches its schedule and timezone, with a grace period that covers its runtime. Show me the configuration before you create it.
Claude reads the schedule and proposes a check: a cron expression, a timezone,
a grace period and a name. Review it, then confirm. Claude creates it with
create_check, and can attach it to a dashboard or a notification group if
you ask and your role allows it.
Then ask for the report step:
Add a step that reports success to Pingstack only after the export succeeds, reading the URL from a
PINGSTACK_PING_URLsecret. Don’t put the URL in the repository.
Claude edits the job using the pattern for your scheduler, such as the GitHub Actions, crontab, Kubernetes or Laravel recipe.
3. Add the secret yourself
Section titled “3. Add the secret yourself”Open the new check in Pingstack, copy the location’s ping URL, and store it
in your job’s secret store as PINGSTACK_PING_URL. Do this yourself rather
than pasting the URL into the conversation: anyone who has it can report a
run, and a chat transcript isn’t a secret store.
4. Confirm the first report
Section titled “4. Confirm the first report”Run the job once, by hand or by triggering it in your scheduler, then ask:
Has the nightly export check received a heartbeat? What’s its next deadline?
Claude reads the check with get_check and tells you whether the location is
up. A location that has never reported stays pending.
Make it the default for new jobs
Section titled “Make it the default for new jobs”Add an instruction to your project’s CLAUDE.md so Claude does this whenever
it adds a scheduled job:
## Monitoring
When you add or change a scheduled job (cron, GitHub Actions schedule,Kubernetes CronJob, Laravel scheduler task), propose a matching Pingstackheartbeat check, show it to me before creating it, and add a success-onlyreport step that reads its URL from a secret. Never ask me to paste a pingURL into chat.What Claude can’t do
Section titled “What Claude can’t do”Claude works within your role’s permissions and your plan’s limits. It can’t
delete checks, publish a dashboard, change your plan or buy anything. If you’ve
reached your plan’s check limit, create_check fails and Claude should tell
you so, with the upgrade link Pingstack returns, for a person to open. See the
tool reference and safe assistant workflows.
If it doesn’t work
Section titled “If it doesn’t work”- No Pingstack tools in Claude Code. Run
/mcpand check thatpingstackis connected and authenticated. - Create fails with a scope or role error. Your role or the approved permissions don’t allow creating checks. Ask an Owner or Admin.
- The check stays pending. The report step hasn’t run successfully yet, or the secret is missing or misnamed.
See MCP troubleshooting for connection problems.