# Fix errors automatically with your own AI agent

> When an error comes in, Parsemend alerts your team and sends a signed webhook to your coding agent. Claude Code, Codex, Cursor or any MCP agent pulls the issue, fixes it and opens a pull request.

Source: https://www.parsemend.com/bring-your-own-agent

## The loop

1. **Error** (Parsemend, every plan): Your app throws. Parsemend groups it into an issue.
2. **Notify** (Parsemend, every plan): Your team gets Slack, Discord or email. Your agent gets a webhook.
3. **Fix** (your agent, Developer and Business): The agent pulls the issue over MCP and fixes your code.
4. **Pull request** (your agent, Developer and Business): It opens a pull request with its own GitHub access.

## Automatically, from an alert (example)

```
# a CI job, started by the Parsemend alert webhook
npm install -g @parsemend/cli
parsemend login --token "$PARSEMEND_TOKEN"
claude mcp add parsemend -- parsemend mcp
claude -p "Fix Parsemend issue $ISSUE and open a draft PR"
```

Take $ISSUE from the webhook's issue.display_id (API-47), and check X-Parsemend-Signature before running anything. Swap claude for any agent you can run from a script.

## By hand, in your session

- **Claude Code**: `claude mcp add parsemend -- parsemend mcp`
- **Codex**: `codex mcp add parsemend -- parsemend mcp`
- **Cursor**: `{ ...`
- **Any MCP client**: `{ ...`

## What Parsemend needs from you

- **Repository access:** None. No GitHub App, no OAuth scope, no clone.
- **AI provider keys:** Never asked for. Your agent uses its own model.
- **Source code:** Read by your agent where it runs. Never uploaded to us.
- **What comes back:** Only post_back: the diff and a summary, on the issue.

## Frequently asked questions

### Which agents work with Parsemend?

Any agent that speaks MCP. Claude Code and Codex register it with one command; Cursor and other clients use the standard mcpServers configuration.

### Does Parsemend open the pull request?

No. Your agent does, with its own GitHub access. Parsemend sends the alert, serves the issue's context and records the fix on the issue; it never needs access to your repository.

### Do I need to give Parsemend an AI key?

No. The agent reasons with its own model. Parsemend's MCP tools make no model call.