The Rotor admin MCP server lets a Claude Code session on your laptop inspect and triage a Rotor deployment in natural language. No SSH, no redis-cli.

Note

This is separate from the customer-facing Rotor MCP at rotor.sh/mcp (which uses rt_ws_ / rt_team_ keys). The admin MCP is operator-only and gated by a single ADMIN_TOKEN shared with the API.

Install

  1. Build the server

    From the rotor monorepo root:

    pnpm --filter=@rotor/mcp-server build
  2. Register with Claude Code

    claude mcp add rotor-admin -- node $(pwd)/packages/mcp-server/dist/index.js
  3. Set environment variables

    Add to your shell profile or your Claude Code MCP config:

    export ROTOR_ADMIN_TOKEN="<value of ADMIN_TOKEN on the API>"
    export ROTOR_API_URL="https://api.rotor.sh"  # optional override
  4. Verify

    Open a fresh Claude Code session and ask "What workspaces are running on Rotor?" — Claude should call rotor_list_workspaces and render the result.

Available tools

ToolDestructiveDescription
rotor_list_workspacesList all workspaces with plan and creation date
rotor_get_workspace_queuesQueue depth per state for every queue in a workspace
rotor_get_workspace_schedulesSchedules with BullMQ state and drift flag
rotor_inspect_jobFull job detail (data, return value, failure reason)
rotor_get_dlqDLQ depth and recent failed jobs
rotor_replay_dlqyesIdempotently re-enqueue DLQ jobs (deterministic IDs)
rotor_fire_schedule_nowyesOut-of-band schedule execution (does not reset cron)

Destructive tools require confirm: true in the call arguments. Claude Code will ask you to confirm before invoking them.

Idempotency guarantees

rotor_replay_dlq uses BullMQ's job-id uniqueness to dedup replays. Calling it twice with the same parameters produces the same replay-${originalId} IDs and BullMQ silently no-ops the second addBulk.

rotor_fire_schedule_now enqueues a one-shot job — it does not call upsertJobScheduler. The cron's normal next_run_at is unchanged.

Troubleshooting

See the package README at packages/mcp-server/README.md for env var and 403 troubleshooting.