Skip to content

Use Delay from AI agents

Delay has an MCP server at https://app.delay.run/mcp. Connect an AI agent to it, and you can ask for what you need in plain words, such as “call my health check every 5 minutes on weekdays and tell me if it fails”. The agent uses the same token, rules and wording as the API and the dashboard, and everything it changes shows up in Activity under the token’s name.

What an agent can do

  • Create crons in your timezone, after showing you the schedule in words and the next run times.
  • Check a URL with one real test request before scheduling it.
  • Change, pause, resume, run and delete crons.
  • Schedule, list and cancel one-off jobs.
  • Explain failures: read a run’s explanation, response code and body, and tell you what to fix.
  • Check this month’s usage, your queues’ settings and the team’s recent activity.

It can’t change queue settings (scheduling a job to a new queue name creates that queue with default settings), set up alert channels, replay dead letters, or manage teams and tokens. Those stay in the dashboard.

Create a token for the agent

  1. In the dashboard, open Settings > API tokens (in the account menu: API tokens & AI agents). Check that the team you want the agent to work on is selected: the token is bound to it.
  2. Under Team tokens, enter a New token name. Use the agent’s name, such as Claude Code: that’s the name its changes appear under.
  3. Choose Access. Pick Read only for an agent that should only answer questions (“what failed last night?”). Pick Full access for one that should also create, change and delete.
  4. Click Create token and copy it. It’s shown once.

Right after you create a token, the Connect an AI agent box at the top of the same page shows the setup below with your token filled in. Give each agent its own token, so you can tell them apart in Activity and revoke one without the others. More on tokens: API overview.

Connect your agent

Replace <your-token> with the token in each of these.

Claude Code

Run this in your terminal, then start Claude Code and ask it to “check my Delay connection”:

Terminal window
claude mcp add --transport http delay https://app.delay.run/mcp --header "Authorization: Bearer <your-token>"

Claude Desktop

Add this to claude_desktop_config.json (in Claude Desktop: Settings > Developer > Edit config), then restart Claude Desktop. It needs Node.js, because npx runs mcp-remote, a small bridge that connects Claude Desktop to Delay’s server:

{
"mcpServers": {
"delay": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://app.delay.run/mcp",
"--header",
"Authorization:${DELAY_AUTH}"
],
"env": {
"DELAY_AUTH": "Bearer <your-token>"
}
}
}
}

Leave Authorization:${DELAY_AUTH} as it is: mcp-remote fills it in from env. If the file already has an mcpServers section, add delay to it.

Cursor and other clients

For clients that support remote MCP servers with headers:

{
"mcpServers": {
"delay": {
"url": "https://app.delay.run/mcp",
"headers": {
"Authorization": "Bearer <your-token>"
}
}
}
}

Cursor reads this from .cursor/mcp.json in your project or ~/.cursor/mcp.json. Other clients use the same URL and header, though their config files and field names can differ: look for “remote” or “HTTP” MCP servers in your client’s docs.

Try it

Start with these:

  • “Check my Delay connection.” The agent shows which team it acts on and whether it can change things.
  • “Is https://api.yourapp.com/health working?” It sends one test request and explains any failure.
  • “Call https://api.yourapp.com/health every 5 minutes on weekdays and alert me after 2 failures.” It previews the schedule, asks you to confirm, then creates the cron.
  • “Which of my crons are failing, and why?” It lists failing crons and reads the explanation of each last run.
  • “In 2 hours, POST {"order_id": 1042} to https://api.yourapp.com/orders/follow-up.” It schedules a one-off job.
  • “What did you change today?” It reads the activity log.

How the agent is told to work

When an agent connects, Delay’s server gives it these instructions:

  1. Check the connection first, to learn the team and whether the token can change things.
  2. Read schedules in your timezone. When you say “9am”, it passes your IANA timezone (such as Europe/Berlin), and asks if it doesn’t know it. It doesn’t assume UTC.
  3. Before creating a cron, preview it (dry_run) and show you the description and next run times. Create it only after you agree.
  4. If it isn’t sure a URL works, send a test request first.
  5. After any change, give you the cron’s or job’s dashboard link.
  6. When something failed, pass on the run’s explanation (what happened and what to do) instead of guessing.
  7. Tell you about every warning, such as the monthly request limit.
  8. Confirm with you before deleting a cron or cancelling a job, since neither can be undone.
  9. Leave secret header values alone: they come back as "[hidden]", and sending "[hidden]" back keeps the stored value.

Agents usually follow these, but they’re instructions, not locks. The token’s access is the real limit, so use Read only where that’s enough.

Tools

The server has 20 tools. Each calls the same code as the matching API endpoint and returns the same JSON.

ToolWhat it doesChanges anything
whoamiShows the token, its access, its team and this month’s usageNo
list_cronsLists crons with their schedule in words, next run and health. Filters: active, paused, failing, or a search on name or URLNo
get_cronGets one cron with its settings, next run times and last runNo
preview_scheduleDescribes an expression and lists its next run times in a timezoneNo
create_cronCreates a cron, or previews it with dry_run: trueYes
update_cronChanges the fields it sendsYes
pause_cronPauses a cronYes
resume_cronResumes a paused cronYes
run_cron_nowRuns a cron once now. Counts toward the monthly limit.Yes, and sends a request
delete_cronDeletes a cron and its run historyYes, can’t be undone
list_cron_runsLists a cron’s runs with status, response code and explanationNo
get_cron_runGets one run with its full request and responseNo
schedule_jobSchedules a one-off request, now or up to 365 days aheadYes
list_jobsLists jobs, by status or queueNo
get_jobGets one job with every attemptNo
cancel_jobCancels a job that hasn’t run yetYes, can’t be undone
list_queuesLists queues with their timeout and retry settingsNo
test_urlSends one real request to a URL and explains the result. Nothing is saved, and it doesn’t count toward the monthly limit.Sends a request
get_usageThis month’s usage and a projectionNo
list_activityWhat people, integrations and agents did, newest firstNo

With a Read only token, every tool marked “Yes”, test_url, and create_cron with dry_run return an error saying the token can only read.

See what the agent did

Everything an agent changes is recorded with the token’s name, as with any other change:

  • Activity, in the account menu, lists every change on the team, newest first. Click AI agents to see only changes made through MCP. Each entry reads like “Claude Code paused cron Nightly backup”, with AI agent and the time under it.
  • Crons and jobs an agent created show a badge such as AI agent · Claude Code on their page and in the Jobs list.
  • A cron’s page has an Activity section with the changes to that cron. The dashboard shows Recent activity.
  • With the API: GET /api/v1/activity?source=mcp (list activity).

Activity is kept for 90 days. Test requests are listed too, as “tested” and the URL.

Cut an agent off

Open Settings > API tokens, click Revoke next to the agent’s token and confirm. The agent’s next tool call fails, because the token no longer works. Nothing else is affected.

  • The crons and jobs it created keep running. Pause or delete them if you need to.
  • Its entries in Activity stay, under the token’s name. The badges on crons and jobs it created then read just AI agent.

Limits and costs

  • Every message the agent’s client sends to /mcp counts toward the token’s 120 requests per minute, shared with the REST API (rate limits).
  • test_url shares the limit of 10 test requests per minute per token with POST /api/v1/test.
  • Runs the agent causes count toward your monthly requests like any others: cron runs, Run now and job attempts. Test requests don’t.

If it doesn’t work

  • The agent says no token was sent, or the token isn’t valid. Check that the header reads Authorization: Bearer <your-token> with your real token, and that the token wasn’t revoked. Errors are explained on API errors.
  • It can’t change anything. The token is Read only. Create a Full access token and update the agent’s config.
  • Claude Desktop doesn’t list Delay. Check that Node.js is installed (npx --version), that the JSON is valid, and restart Claude Desktop.
  • It works on the wrong team. A team token always acts on the team it was created in. Create the token while the right team is selected.

Next steps