> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Sentry Connector

> Connect PraisonAI agents to Sentry to inspect production errors, stack traces, and releases with OAuth 2.1

Connect your PraisonAI agents to Sentry so they can fetch recent production exceptions, inspect stack traces, correlate regressions with releases, and draft root-cause summaries.

| Setting | Value |
| - | - |
| **Catalog ID** | `sentry` |
| **Endpoint** | `https://mcp.sentry.dev/mcp` |
| **Transport** | Streamable HTTP (Remote) |
| **Authentication** | OAuth 2.1 (browser or `--manual`) |

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonaiagents import Agent, MCP

agent = Agent(
    name="Incident Responder",
    instructions="Diagnose Sentry errors using stack traces and release info.",
    tools=MCP(
        "https://mcp.sentry.dev/mcp",
        oauth=True,
        server_name="sentry",
    ),
)

agent.start("Show the top 5 unresolved Sentry issues from the last 24 hours and explain the root cause of the #1 error")
```

The user asks about recent production failures; PraisonAI pulls live stack traces from Sentry and summarizes probable root causes.

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
graph LR
    User["👤 User"] --> Agent["🤖 PraisonAI Agent"]
    Agent --> Auth["🔐 Sentry OAuth 2.1"]
    Auth --> Sentry["🐞 Sentry Remote MCP<br/>mcp.sentry.dev/mcp"]
    Sentry --> Result["✅ Issues & Stack Traces"]

    classDef input fill:#6366F1,stroke:#7C90A0,color:#fff
    classDef agent fill:#8B0000,stroke:#7C90A0,color:#fff
    classDef auth fill:#F59E0B,stroke:#7C90A0,color:#fff
    classDef ok fill:#10B981,stroke:#7C90A0,color:#fff

    class User input
    class Agent agent
    class Auth auth
    class Sentry,Result ok
```

***

## How It Works

PraisonAI connects to Sentry's official hosted MCP endpoint (`https://mcp.sentry.dev/mcp`) over Streamable HTTP using OAuth 2.1 PKCE and caches tokens at `0600` in `~/.praisonai/mcp-auth.json`.

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
sequenceDiagram
    participant User
    participant CLI as praisonai CLI
    participant SAuth as Sentry OAuth 2.1
    participant Store as mcp-auth.json
    participant SMCP as Sentry MCP Server
    participant Agent as PraisonAI Agent

    User->>CLI: praisonai connectors add sentry --auth
    CLI->>SAuth: Run OAuth 2.1 PKCE flow
    SAuth-->>User: Approve organization access in browser
    SAuth-->>Store: Save OAuth token (0600)
    User->>Agent: Investigate unresolved errors
    Agent->>Store: Load cached token
    Agent->>SMCP: Fetch issues and event stack traces
    SMCP-->>Agent: Structured exception details
    Agent-->>User: Root-cause report
```

***

## Step-by-Step Setup

**1. Prerequisites**

* A Sentry account with access to at least one organization and project

**2. Install PraisonAI with MCP support**

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
pip install "praisonai[mcp]"
```

**3. Add and authenticate Sentry**

> [tab] CLI (Interactive OAuth)
>
> ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
> praisonai connectors add sentry --auth
> ```

> [tab] Headless / SSH (--manual)
>
> ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
> praisonai connectors add sentry --auth --manual
> ```

> [tab] PraisonAI Dashboard
>
> Enable catalog connectors in your PraisonAIUI `config.yaml`:
>
> ```yaml theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
> mcp:
>   enabled: true
>   allow:
>     catalog: true
> ```
>
> Run `praisonai dashboard`, open **Connectors / MCP**, and click **Connect** on **Sentry**.

**4. Verify and inspect tools**

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai mcp sync sentry
```

**5. Combine Sentry with GitHub (optional)**

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonaiagents import Agent, MCP

agent = Agent(
    name="Bug Fixer",
    instructions="Read Sentry stack traces and check matching GitHub code.",
    tools=[
        MCP("https://mcp.sentry.dev/mcp", oauth=True, server_name="sentry"),
        MCP("https://api.githubcopilot.com/mcp/", oauth=True, server_name="github"),
    ],
)

agent.start("Inspect our top unresolved Sentry issue and identify the likely commit in GitHub")
```

***

## Scope Tools for Safety

Keep incident-triage agents read-only so they don't prematurely resolve or ignore active alerts:

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonaiagents import Agent, MCP

sentry = MCP(
    "https://mcp.sentry.dev/mcp",
    oauth=True,
    server_name="sentry",
    approval="always",
)
```

***

## Common Workflows

* **Post-Deploy Regression Check:** `"List any new Sentry issues introduced after today's release and group by service."`
* **Root-Cause Brief:** `"Fetch full stack trace and breadcrumbs for Sentry issue PROJ-123 and suggest a fix."`

***

## Troubleshooting

| Symptom | Cause | Fix |
| - | - | - |
| `401 Unauthorized` on `praisonai connectors test sentry` | `connectors test` does not attach stored OAuth tokens | Verify with `praisonai mcp sync sentry` |
| Missing project in results | Authorized a different Sentry org | Run `praisonai connectors logout sentry --yes` then `praisonai connectors auth sentry` |
| Headless server hangs waiting for browser | Loopback callback unavailable over SSH | Use `praisonai connectors auth sentry --manual` |

***

## Best Practices

> [accordion] Specify organization and project slugs in prompts
>
> Mention your Sentry organization and project slug so the agent avoids scanning unrelated projects.

> [accordion] Pair Sentry with GitHub or Linear for end-to-end triage
>
> Pass multiple `MCP(...)` instances in `tools=[...]` — PraisonAI automatically namespaced tool names when multiple servers are loaded via `load_mcp_tools()`.

> [accordion] Watch for PII in error payloads
>
> Sentry event breadcrumbs can contain request metadata; avoid forwarding raw event payloads to external channels without redaction.

***

## Related

> [card] [List of Connectors](https://praison.ai/docs/features/connectors-list.md)
>
> Browse all popular connectors and step-by-step guides

> [card] [GitHub Connector](https://praison.ai/docs/mcp/github.md)
>
> Pair Sentry stack traces with GitHub code and PRs

> [card] [Remote MCP Connectors](https://praison.ai/docs/features/connectors.md)
>
> Full CLI commands and Dashboard setup

> [card] [MCP OAuth Authentication](https://praison.ai/docs/mcp/mcp-oauth.md)
>
> OAuth 2.1 PKCE flow and token management


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.