Cursor connector
Launch, monitor, and steer Cursor cloud agents on GitHub repositories from AgentRuntime workflows.
En esta página
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
- 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.
- 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.
- 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). Leaveapi_baseempty 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. - Test it
In Workflow Studio, add the
cursor_get_metool 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.
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.
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_agentstarts an agent on the repo, andcursor_find_agent_statustells the workflow when it is done. - Refine the result. After a review step,
cursor_add_followup_instructionsends corrections to the same agent. - Scheduled chores. A scheduled workflow launches an agent per module with
auto_create_prset totrueand abranch_name. - Housekeeping.
cursor_list_agentsandcursor_delete_agentclear 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.
| Tool | Access | What it does | Required arguments |
|---|---|---|---|
cursor_add_followup_instruction | Write | Add follow-up instructions to an existing Cursor agent. | agent_id, prompt |
cursor_delete_agent | Delete | Delete a Cursor cloud agent. | agent_id |
cursor_find_agent_status | Read | Get status and details for a Cursor cloud agent. | agent_id |
cursor_get_agent_conversation | Read | Retrieve conversation history for a Cursor cloud agent. | agent_id |
cursor_get_me | Read | Retrieve metadata for the configured Cursor API key. | — |
cursor_launch_agent | Write | Launch a Cursor cloud agent on a GitHub repository. | prompt, repository |
cursor_list_agents | Read | List Cursor cloud agents. | limit |
cursor_list_models | Read | List AI models available for Cursor cloud agents. | — |
cursor_list_repositories | Read | List 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
| Key | Required | Description |
|---|---|---|
api_key | Yes | Cursor user API key. |
api_base | No | Cursor API base URL. Default https://api.cursor.com. |
Troubleshooting
| Problem | What to do |
|---|---|
| The agent cannot reach the repository | Check 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 stuck | Poll cursor_find_agent_status and check your Cursor account for quota or repository errors. |
| No pull request appears | Set auto_create_pr to true when you launch the agent, and check that the agent finished successfully. |
Related
- MCP instances
- Connections
- Integrations quickstart
- Human tasks for approval before launching agents
- Connector catalog
- Troubleshooting