Install the Rotor MCP server

Add 27 workspace-scoped tools to Claude Code, Cursor, or Claude Desktop. Once installed, you can prompt Claude to list queues, create schedules, replay DLQ jobs, and more — all scoped to your Rotor workspace API key.

Example prompts after install:

  • "List my Rotor queues"
  • "Create a schedule named nightly-export that runs at 02:00 UTC"
  • "Replay DLQ job abc-123 from the outbound queue"
Note

Tools are workspace-scoped. Your API key (rt_ws_*) grants access only to the workspace it was created in. These tools do NOT have access to other workspaces or operator-level admin resources.

Prerequisites

  • Node 18+ on PATH (required for npx)
  • A workspace API key — prefix rt_ws_*. Generate one:
    rotor api-keys create --label "claude-code"
    (CLI install: npm i -g @rotorsh/cli)
  • One of: Claude Code 1.x, Claude Desktop, or Cursor

Install

Claude Code

Paste the following into ~/.claude/.mcp.json (create the file if it does not exist). Replace rt_ws_<paste-your-key> with your actual workspace API key. Save and restart Claude Code.

{
  "mcpServers": {
    "rotor": {
      "command": "npx",
      "args": ["-y", "@rotorsh/mcp"],
      "env": {
        "ROTOR_API_KEY": "rt_ws_<paste-your-key>"
      }
    }
  }
}

Claude Desktop

Open your Claude Desktop config file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

Add or merge the following into the mcpServers key, then fully quit and reopen Claude Desktop.

{
  "mcpServers": {
    "rotor": {
      "command": "npx",
      "args": ["-y", "@rotorsh/mcp"],
      "env": {
        "ROTOR_API_KEY": "rt_ws_<paste-your-key>"
      }
    }
  }
}

Cursor

Open ~/.cursor/mcp.json (create if it does not exist), add the following, then restart Cursor.

{
  "servers": {
    "rotor": {
      "command": "npx",
      "args": ["-y", "@rotorsh/mcp"],
      "env": {
        "ROTOR_API_KEY": "rt_ws_<paste-your-key>"
      }
    }
  }
}

Verify the connection

  1. Restart your client

    Fully quit and reopen Claude Code, Claude Desktop, or Cursor after saving the config file.

  2. Open a new conversation and prompt

    Type: "List my Rotor queues"

  3. Confirm the tool was invoked

    Claude should invoke rotor_list_queues and return your workspace queues. If you have no queues yet, the response is { queues: [] } — that is expected and confirms the connection is working.


Your first prompt: create a queue from Claude

Once your client picks up the MCP config, type a prompt like this in any new conversation:

Create a Rotor queue called welcome-emails with concurrency 5 and 3 retry attempts.

Claude should invoke the rotor_create_queue tool with arguments matching:

{
  "name": "welcome-emails",
  "concurrency": 5,
  "retry_attempts": 3
}

The tool returns the created queue object — confirm in your terminal with:

rotor queues list
# welcome-emails should appear with concurrency 5

This proves three things at once:

  • The MCP server is connected (tool resolution).
  • Your ROTOR_API_KEY is valid (server-side auth succeeded).
  • The CLI and MCP share the same backend (queue created via MCP appears in CLI list).
Tip

If Claude picks a different tool (rotor_list_queues instead of rotor_create_queue), reword the prompt with stronger imperatives: "Create a new Rotor queue named welcome-emails..." Tool selection improves with explicit verbs.


Available tools

27 workspace-scoped tools organized by category:

Queuesrotor_list_queues, rotor_get_queue, rotor_create_queue, rotor_update_queue, rotor_set_queue_state (pause/resume/active), rotor_drain_queue, rotor_delete_queue

Schedulesrotor_list_schedules, rotor_get_schedule, rotor_create_schedule, rotor_update_schedule, rotor_delete_schedule, rotor_force_fire_schedule, rotor_inspect_run_history

Jobsrotor_list_jobs, rotor_get_job, rotor_add_job, rotor_retry_job, rotor_delete_job

DLQrotor_get_dlq (list failed jobs), rotor_replay_dlq (idempotent replay)

Statusrotor_get_status (workspace health)

API Keysrotor_list_api_keys, rotor_create_api_key, rotor_revoke_api_key

Workspacesrotor_list_workspaces, rotor_get_workspace

For full input schema on any tool, call tools/list from your MCP client.


Troubleshooting

SymptomResolution
"Tool not found" after restartVerify Claude Code can spawn npx — run npx --version in a terminal. Check the config file syntax is valid JSON.
"401 Unauthorized"Rotate your API key: rotor api-keys create --label "claude-code-new". Ensure the key starts with rt_ws_ (workspace-scoped), not rt_q_ (queue-scoped).
Cold-start latency (>10s first call)Install globally to skip npx download: npm i -g @rotorsh/mcp, then replace "command": "npx" with the absolute path to the rotor-mcp binary (find it via which rotor-mcp).
stdout corruption / JSON parse errorsThis is a known guard (Pitfall 6 — all logs go to stderr). If you see parse errors, please file an issue — it indicates an unexpected console.log in the server.

Next steps

  • Quickstart guide — build your first queue-backed workflow
  • Connection guide — the hosted Streamable-HTTP MCP for workflow tools (trigger_workflow, approve_run, etc.)