This server is a thin wrapper over Cursor's REST API. Base URL: https://api.cursor.com.
All requests send Authorization: Bearer $CURSOR_API_KEY and Content-Type: application/json.
Endpoints track Cursor's official documentation (https://cursor.com/docs → Background Agent → API). If Cursor changes the API, update
src/cursor.js.
Request body:
{
"prompt": { "text": "<task>" },
"source": { "repository": "https://github.com/owner/repo", "ref": "main" },
"model": "<optional model>",
"target": { "branchName": "<optional>", "autoCreatePr": false }
}Response includes id, name, status, source, target, createdAt.
{ "prompt": { "text": "<follow-up>" } }Non-2xx responses are surfaced as Cursor API <status> <statusText>: <body> so the calling agent can react.