> For clean Markdown of this page, append .md to its URL. For the complete documentation index, see https://www.superagent.sh/llms.txt.


Connect Cursor to Superagent MCP and complete a finding-to-report workflow.

# Set up Cursor

Connect Cursor to Superagent, then use a Cursor automation to receive findings and return structured agent reports.

## Prerequisites

- A Superagent organization API key stored as `SUPERAGENT_API_KEY`
- Connected software in Superagent
- A Cursor environment that can access the same software

## Connect Superagent MCP

Add this server to Cursor's `mcp.json`:

```json
{
  "mcpServers": {
    "superagent": {
      "url": "https://www.superagent.sh/mcp",
      "headers": {
        "Authorization": "Bearer ${env:SUPERAGENT_API_KEY}"
      }
    }
  }
}
```

Set `SUPERAGENT_API_KEY` in the environment that launches Cursor. Do not put the key in chat, source control, or the MCP URL.

## Configure the finding handoff

Create a Cursor automation with a webhook trigger. Add the generated endpoint as a [Superagent webhook](https://www.superagent.sh/docs/webhooks), subscribe to finding events, and store Cursor's authentication value as an encrypted custom header.

## Test the complete loop

1. Send a Superagent webhook test event.
2. Confirm one Cursor automation starts.
3. Ask Cursor to retrieve the finding through Superagent MCP.
4. Let the automation investigate or remediate within its assigned scope.
5. Return the structured agent report through Superagent MCP.
6. Confirm that Superagent retained the report and linked it to the finding.
7. Leave any pull request for CI and human review.

## Next steps

- [Build an always-on pentester with Cursor](https://www.superagent.sh/docs/use-cases/continuous-adversarial-testing-with-cursor)
- [Use Superagent MCP](https://www.superagent.sh/docs/mcp)
- [Subscribe to events with Webhooks](https://www.superagent.sh/docs/webhooks)

---
Source: https://www.superagent.sh/docs/connect/cursor
Index: https://www.superagent.sh/llms.txt
