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:

Client configuration paths

ClientConfig file
Claude Code.mcp.json in project root, or ~/.claude/mcp.json globally
Claude Desktop~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
Cursor.cursor/mcp.json in project root
VS Code.vscode/mcp.json in project root

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

Example response:

{
"id": 1,
"name": "Health Check",
"url": "https://api.example.com/health",
"method": "GET",
"cron_expression": "*/5 * * * *",
"is_active": true,
"next_run_at": "2025-01-15T10:05:00+00:00"
}

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

Example response:

{
"id": 42,
"queue_id": 3,
"queue_name": "webhooks",
"url": "https://api.example.com/sync",
"method": "POST",
"status": "pending",
"scheduled_at": "2025-01-15T10:00:00+00:00"
}

get-cron

Returns the full cron configuration including status, execution timing, and alert state.

Parameters:

FieldTypeRequiredDescription
idintegerYesThe cron ID

Example response:

{
"id": 1,
"name": "Health Check",
"url": "https://api.example.com/health",
"method": "GET",
"headers": null,
"payload": null,
"callback_url": null,
"cron_expression": "*/5 * * * *",
"timeout_seconds": 30,
"alert_threshold": 2,
"consecutive_failures": 0,
"is_active": true,
"is_alerted": false,
"last_run_at": "2025-01-15T10:00:00+00:00",
"next_run_at": "2025-01-15T10:05:00+00:00",
"last_status": "completed",
"last_response": null,
"created_at": "2025-01-10T08:30:00+00:00"
}

get-job

Returns the full job details including queue info and run results (HTTP response, duration, errors).

Parameters:

FieldTypeRequiredDescription
idintegerYesThe job ID

Example response:

{
"id": 42,
"url": "https://api.example.com/sync",
"method": "POST",
"headers": { "Authorization": "Bearer token" },
"payload": { "event": "user.created" },
"callback_url": null,
"queue": "webhooks",
"queue_id": 3,
"status": "completed",
"final_status": "success",
"attempt_number": 1,
"is_retry": false,
"delay_seconds": 0,
"scheduled_at": "2025-01-15T10:00:00+00:00",
"created_at": "2025-01-15T10:00:00+00:00",
"run": {
"response_status": 200,
"response_body": "{\"ok\":true}",
"duration_ms": 142,
"error_message": null,
"started_at": "2025-01-15T10:00:01+00:00",
"executed_at": "2025-01-15T10:00:01+00:00"
}
}

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. Returns &#123; "deleted": true, "id": <id> &#125;.

Authentication

The MCP server authenticates using the same API token you use for the REST API. The token is passed via the MCP_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.

How it works

  1. The MCP client passes your token as the MCP_API_TOKEN environment variable
  2. Recuro hashes the token (SHA-256) and looks up the matching user
  3. All tool calls run in that user’s team context
  4. Resources from other teams are never accessible

Generating a token

  1. Log in to the Recuro dashboard
  2. Go to Settings → API
  3. Click Generate Token (or Regenerate to replace an existing one)
  4. Copy the token — it’s only shown once

The same token works for both the REST API and the MCP server.