Skip to main content
The cursor MCP adapter connects to the Cursor Cloud Agents API. Launch coding agents against GitHub repos, monitor progress, send follow-up instructions, and optionally auto-open pull requests — useful for delegating implementation work from Workflow Studio or Chat Autopilot.

Prerequisites

  • A Cursor account with Cloud Agents enabled
  • A Cursor user API key from account settings
  • GitHub repositories the Cursor GitHub App can access (or use open_as_cursor_github_app)
  • project_contributor access in AgentRuntime

Connect in AgentRuntime

1

Create a Cursor API key

In Cursor, open Settings → API and generate a user API key. Store it securely — treat it like a password.
2

Create a connection

Go to Connections and click New custom connection to create an API key connection with APIKey. Set APIBase only if Cursor provides a non-default endpoint.
3

Add cursor MCP instance

Go to MCP, click Add instance for cursor, wire your connection on Instance config, set the profile active, and save.
4

List existing agents

Run mcp_calllist_agents to confirm the key works before launching production agents.
See Authentication for binding connections to MCP instances.
Cloud agents run on Cursor infrastructure and modify GitHub repositories. Use human_task approval before launch_agent in production repos.

What you can build

  • Bug-fix delegation — Issue triage LLM step → launch_agent with repro steps and target repo → poll find_agent_status → notify on PR creation.
  • Refactor batches — Scheduled workflow launches agents per module with branch_name and auto_create_pr.
  • Follow-up loops — Initial agent run → review output → add_followup_instruction with corrections.
  • Agent housekeepinglist_agentsdelete_agent for stale or failed runs.

Tools

ToolDescription
launch_agentStart a cloud agent on a GitHub repo with prompt, ref, and optional PR settings
find_agent_statusGet status and details for an agent by ID
list_agentsList cloud agents with pagination
add_followup_instructionSend additional instructions to a running or completed agent
delete_agentPermanently delete a cloud agent

Example

Launch an agent to implement a feature from a workflow input:
{
  "id": "cursor-agent",
  "type": "mcp_call",
  "name": "Launch Cursor agent",
  "tool_name": "launch_agent",
  "tool_args": {
    "repository": "my-org/my-repo",
    "ref": "main",
    "prompt": {
      "text": "Implement the feature described below:\n\n{{input.spec}}"
    },
    "auto_create_pr": true,
    "branch_name": "agent/{{input.ticket_id}}"
  },
  "depends_on": ["human-approve"],
  "timeout_s": 120
}

Configuration

KeyRequiredDescription
APIKeyYesCursor user API key
APIBaseNoCursor API base URL

Troubleshooting

IssueFix
Agent cannot access repoInstall Cursor GitHub App on the org/repo or set open_as_cursor_github_app
Webhook signature errorswebhook_secret must be at least 32 characters when set
Agent stuck in pendingPoll find_agent_status; check Cursor dashboard for quota or repo errors
PR not createdConfirm auto_create_pr is true and the agent completed successfully