# Get started with Raygun MCP for coding agents

Set up Raygun, connect remote MCP through browser OAuth, and start a production investigation with a coding agent.

## 1. Create or access a Raygun account

Sign in or start a Raygun trial with an account that can access the applications your coding agent should inspect.

Signup: https://app.raygun.com/signup?utm_source=ai.raygun.com&utm_medium=agent_portal&utm_campaign=signup

## 2. Instrument your software

Add a Raygun SDK so production errors, user impact, and performance context are available for investigation.

SDK documentation: https://raygun.com/documentation/language-guides/overview/

Common SDKs include .NET, JavaScript, Apple platforms, and Android.

## 3. Add the remote MCP endpoint

Endpoint: `https://api.raygun.com/v3/mcp`

Add the endpoint as a Streamable HTTP server without an Authorization header. On first connection, complete the browser OAuth flow: sign in to Raygun, select a plan, review permissions, and authorize the client.

### Cursor

```
{
  "mcpServers": {
    "Raygun": {
      "url": "https://api.raygun.com/v3/mcp"
    }
  }
}
```

1. Open Cursor Settings → Tools & MCP → New MCP Server (or Add Custom MCP).
2. Paste the JSON configuration.
3. Cursor will prompt you to authenticate when it connects.

### Claude Code

```
claude mcp add --transport http raygun \
  https://api.raygun.com/v3/mcp
```

1. Run the claude mcp add command in your project environment.
2. Run `/mcp` in Claude Code and follow the browser authentication flow.
3. Claude is ready to utilize your software telemetry.

### Codex

```
codex mcp add raygun --url https://api.raygun.com/v3/mcp
codex mcp login raygun
```

1. Run the add command, then run the login command.
2. Complete the browser authentication flow when it opens.
3. This configuration is shared by the Codex CLI, Codex IDE extension, and ChatGPT desktop app on the same Codex host.

### Gemini CLI

```
gemini mcp add --transport http raygun \
  https://api.raygun.com/v3/mcp
```

1. Run the Gemini MCP add command.
2. Gemini will prompt you to authenticate when it connects.
3. Gemini is ready to utilize your software telemetry.

## 4. Ask a focused production question

Start with an error URL, deployment, customer, time window, or route.

```markdown
Investigate the latest production errors after the last deploy.

Use Raygun MCP to:
1. Call deployment_get_latest (or deployments_list) for the app
2. error_groups_list for new/regressed groups
3. error_group_investigate + error_instance_get_details for stack/context
4. customers_search / sessions_list if user impact is unclear
5. Propose the smallest code change with a regression test and cite Raygun IDs
```

## Related resources

- [MCP details](https://ai.raygun.com/mcp)
- [Prompt library](https://ai.raygun.com/prompts)
- [API V3](https://ai.raygun.com/api)
