Cursor connector

Launch, monitor, and steer Cursor cloud agents on GitHub repositories from AgentRuntime workflows.

On this page

The cursor connector uses the Cursor cloud agents API. Your workflow can hand a coding task to a Cursor cloud agent working on a GitHub repository, check on its progress, send it follow-up instructions, and ask it to open a pull request.

Prerequisites

  • A Cursor account with cloud agents enabled and a user API key.
  • A GitHub repository your Cursor account can access.
  • The project_contributor role or higher in your workspace, which lets you manage connections and MCP instances. See Roles and permissions.

Connect in AgentRuntime

  1. Create a Cursor API key

    In your Cursor account settings, create a user API key for the cloud agents API (see the Cursor documentation). Copy it and treat it like a password.

  2. Add the connector to your workspace

    Click MCP in the sidebar, then Add connectors. Find Cursor in the App catalog, select it, and click Add to workspace. The instance now appears on the MCP connectors page. See MCP instances.

  3. Add your credentials to a profile

    Open the new instance to reach Instance config. Under Profiles for this connector, click New profile, enter a Display name, and on the Type secrets on this screen tab fill in api_key (your Cursor API key). Leave api_base empty unless Cursor gave you a different endpoint.. Set Status to Active — can be used in workflows and click Save. Then click Use this profile for workflows.

  4. Test it

    In Workflow Studio, add the cursor_get_me tool from your Cursor instance (use Browse platform MCP if it is not listed), fill in its arguments, and run the workflow. A successful step means the connection works. This tool has no arguments and returns details about the key.

Note

To reuse the same credentials in more than one profile, save them first under Connections → New custom connection, using the exact key names from Configuration, then choose Use a saved connection on the profile instead.

Note

Cloud agents change code in your repositories. Put a Human approval step before cursor_launch_agent for production repositories. See Human tasks.

What you can build

  • Delegate bug fixes. A triage step writes a clear prompt, cursor_launch_agent starts an agent on the repo, and cursor_find_agent_status tells the workflow when it is done.
  • Refine the result. After a review step, cursor_add_followup_instruction sends corrections to the same agent.
  • Scheduled chores. A scheduled workflow launches an agent per module with auto_create_pr set to true and a branch_name.
  • Housekeeping. cursor_list_agents and cursor_delete_agent clear out finished or failed agents.

Tools

The Required arguments column lists the fields the tool's input schema marks as required. Some of them are optional in practice; if you have nothing to set, pass an empty value such as "", [], {}, or false.

ToolAccessWhat it doesRequired arguments
cursor_add_followup_instructionWriteAdd follow-up instructions to an existing Cursor agent.agent_id, prompt
cursor_delete_agentDeleteDelete a Cursor cloud agent.agent_id
cursor_find_agent_statusReadGet status and details for a Cursor cloud agent.agent_id
cursor_get_agent_conversationReadRetrieve conversation history for a Cursor cloud agent.agent_id
cursor_get_meReadRetrieve metadata for the configured Cursor API key.—
cursor_launch_agentWriteLaunch a Cursor cloud agent on a GitHub repository.prompt, repository
cursor_list_agentsReadList Cursor cloud agents.limit
cursor_list_modelsReadList AI models available for Cursor cloud agents.—
cursor_list_repositoriesReadList GitHub repositories accessible through the Cursor account.—

Example

Launch an agent that implements a feature and opens a pull request. prompt is an object with a text field.

{
  "id": "cursor-agent",
  "type": "mcp",
  "name": "Launch Cursor agent",
  "tool_name": "cursor_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
api_keyYesCursor user API key.
api_baseNoCursor API base URL. Default https://api.cursor.com.

Troubleshooting

ProblemWhat to do
The agent cannot reach the repositoryCheck the repository value (a GitHub URL or owner/repo) and that your Cursor account has access to it. You can also set open_as_cursor_github_app to true.
"webhook_secret must be at least 32 characters"If you set webhook_secret, use a value of 32 characters or more.
The agent seems stuckPoll cursor_find_agent_status and check your Cursor account for quota or repository errors.
No pull request appearsSet auto_create_pr to true when you launch the agent, and check that the agent finished successfully.
Edit this pageagentruntime-io/agentruntime-docs