Skip to content

MCP server

Bullship has an MCP server at /api/mcp, over Streamable HTTP. AI agents use it to find failing queues, read jobs and errors, and, with an operator token, retry and pause. It authenticates with the same API tokens as the API.

Create an API token in Settings › API tokens: a viewer token for an agent that only looks, an operator token for one that may retry and pause.

claude mcp add --transport http bullship https://bullship.example.com/api/mcp \
--header "Authorization: Bearer bsk_…"
Tool Token What it does
list_connections viewer The Redis connections, with their id, name and whether Redis answers
list_queues viewer Queues worst first, each with a status (Failing, Stalled, Degraded, Healthy, Idle, Paused), the reason, counts and workers; filter: "attention" lists only the ones with a problem
get_queue viewer One queue’s health: status and reason, counts, workers, throughput now and an hour ago, the oldest waiting job and the next scheduled run
list_jobs viewer Jobs in one state, newest first, filtered by job name or error
get_job viewer One job: state, times, each attempt’s error and stack trace, data, options and return value
get_job_logs viewer The lines the job logged with job.log()
list_errors viewer Failed jobs grouped by error
list_workers viewer Workers on a queue, what each is running, and its runs in the last hour
list_alerts viewer Alert rules and which are firing, on which queues
retry_job operator Move one failed or completed job back to waiting
retry_failed_jobs operator Retry a queue’s failed jobs, up to 1,000 a call, optionally only those with one error
promote_job operator Run a delayed job without waiting out its delay
pause_queue, resume_queue operator Stop or restart workers taking new jobs from a queue

A viewer token sees only the read tools. Nothing over MCP deletes jobs or queues.

Each tool calls the same routes the app does, with the same role checks, limits and bounded Redis scripts, and at most 4 tool calls per caller run at once. Job data comes back with redacted fields hidden, as in the app.

curl https://bullship.example.com/api/mcp \
-H "Authorization: Bearer bsk_…" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"list_queues","arguments":{"connection":"default","filter":"attention"}}}'

With BULLSHIP_AUTH=false or viewer, MCP needs no token, like the app.