Skip to content

MCP Server

Recuro ships an MCP (Model Context Protocol) server that lets AI agents create crons, queue jobs, and inspect executions — directly from your editor or chat client.

Setup

1. Get your API token

Go to Settings → API in the Recuro dashboard and copy your token.

2. Add the server to your MCP client

Add this to your MCP configuration file (e.g. mcp.json, claude_desktop_config.json, or your editor’s MCP settings):

{
"mcpServers": {
"recuro": {
"command": "npx",
"args": ["-y", "recuro-mcp"],
"env": {
"RECURO_API_TOKEN": "your_token_here"
}
}
}
}

Replace your_token_here with your actual API token.

3. Start using it

Your AI agent will now see Recuro’s tools and can manage your crons and jobs through natural language.

Example prompts:

Compatible clients

The MCP server works with any client that supports the Model Context Protocol:

  • Claude Code (CLI)
  • Claude Desktop
  • Cursor
  • Windsurf
  • VS Code Copilot
  • Zed
  • Any other MCP-compatible client

Available tools

Cron tools

ToolDescription
list-cronsList crons with optional filters (active/paused) and search by name or URL
create-cronCreate a new recurring cron job
get-cronGet full details of a cron by ID
update-cronUpdate any fields on an existing cron
delete-cronPermanently delete a cron and its history

Job tools

ToolDescription
list-jobsList jobs with optional status filter, queue filter, and search
create-jobCreate a one-off job in a named queue (auto-created if new)
get-jobGet full details of a job including run results
delete-jobPermanently delete a job and its run history

Tool reference

create-cron

Create a recurring HTTP request on a cron schedule.

Parameters:

FieldTypeRequiredDescription
namestringYesDisplay name for the cron
urlstringYesTarget URL to call
cron_expressionstringYesStandard 5-field cron expression (e.g. */5 * * * *)
methodstringNoHTTP method: GET, POST, PUT, PATCH, DELETE. Defaults to GET
headersobjectNoKey-value HTTP headers
payloadstringNoRaw request body
callback_urlstringNoURL called after each execution completes
timeout_secondsintegerNoTimeout in seconds (1–300). Defaults to 30
alert_thresholdintegerNoAlert after N consecutive failures: 1, 2, or 3
is_activebooleanNoWhether the cron starts active. Defaults to true

update-cron

Update an existing cron. Only the fields you provide are changed — everything else stays the same.

Parameters:

FieldTypeRequiredDescription
idintegerYesThe cron ID to update
All fields from create-cronNoAny field you want to change

create-job

Queue a one-off HTTP request. The queue is auto-created if it doesn’t exist.

Parameters:

FieldTypeRequiredDescription
queuestringYesQueue name (auto-created if new)
urlstringYesTarget URL to call
methodstringNoHTTP method. Defaults to POST
headersobjectNoKey-value HTTP headers
payloadobjectNoJSON request body
callback_urlstringNoURL called after the job completes
delayintegerNoSeconds to wait before executing (0–86400). Defaults to 0

get-cron / get-job

Returns the full resource including configuration, status, execution history, and timing data. Requires the id parameter.

list-crons / list-jobs

Returns a paginated list. Optional parameters:

FieldTypeDescription
filterstringFilter by status. Crons: active, paused, all. Jobs: pending, processing, completed, failed, retrying
searchstringSearch by name (crons) or URL (jobs)
queue_idintegerJobs only — filter by queue
pageintegerPage number

delete-cron / delete-job

Permanently deletes the resource and all associated history. Requires the id parameter.

Authentication

The MCP server authenticates using the same API token you use for the REST API. The token is passed via the RECURO_API_TOKEN environment variable in your MCP configuration.

All operations are scoped to your team — the MCP server can only see and modify resources belonging to your current team.

Self-hosted setup

If you’re self-hosting Recuro, you can run the MCP server directly via Artisan:

{
"mcpServers": {
"recuro": {
"command": "php",
"args": ["artisan", "mcp:start", "recuro"],
"cwd": "/path/to/your/recuro/src",
"env": {
"MCP_API_TOKEN": "your_token_here"
}
}
}
}