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) |
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.
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 okHow 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.
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 reportStep-by-Step Setup
- Prerequisites
- A Sentry account with access to at least one organization and project
- Install PraisonAI with MCP support
bash pip install "praisonai[mcp]" - Add and authenticate Sentry
CLI (Interactive OAuth)
bash praisonai connectors add sentry --authHeadless / SSH (–manual)
bash praisonai connectors add sentry --auth --manualPraisonAI Dashboard
Enable catalog connectors in your PraisonAIUI
config.yaml:yaml mcp: enabled: true allow: catalog: trueRun
praisonai dashboard, open Connectors / MCP, and click Connect on Sentry. - Verify and inspect tools
bash praisonai mcp sync sentry - Combine Sentry with GitHub (optional)
python 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:
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
Specify organization and project slugs in prompts
Mention your Sentry organization and project slug so the agent avoids scanning unrelated projects.
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().
Watch for PII in error payloads
Sentry event breadcrumbs can contain request metadata; avoid forwarding raw event payloads to external channels without redaction.