How to Connect Codex to Sentry (and What It Can't Do)
Yes — this is one of the cleanest MCP hookups in the Codex ecosystem. Sentry ships an official MCP server, hosted at mcp.sentry.dev, built explicitly for coding agents like Codex, Claude Code, and Cursor. Connect it and Codex can pull real issues, stack traces, and error history straight into a debugging session — no more pasting tracebacks from a browser tab. It’s the right shape for what Codex is: a session-scoped engineering agent. Which is also its ceiling. Codex queries Sentry when you ask, mid-session. It does not watch Sentry overnight, notice an error spiking, or turn a new issue into a ticket and a Slack post while you sleep.
Here’s what the Sentry MCP gives Codex, how to wire it up, one security caveat worth taking seriously, and what to use for the always-on layer.
What Codex can actually do with Sentry
Codex — now a surface inside the single ChatGPT app on every plan since the July 9, 2026 merge, usage-metered — supports MCP servers across the CLI, desktop app, and IDE extension. Sentry’s server is middleware over the Sentry API, tuned specifically for human-in-the-loop coding agents. Connected, Codex can:
- Fetch real stack traces for the bug you’re fixing — the actual production traceback, error context, and breadcrumbs, not a screenshot someone pasted in Slack.
- Query issues and their history — how often an error fires, when it started, which release introduced it.
- Search across projects — find related errors while reasoning about a fix.
- Close the loop in one session — pull the Sentry issue, reproduce it against your local checkout, write the fix, and open the PR (via Codex’s native GitHub integration) without leaving the terminal.
That last flow is the whole pitch: Sentry issue in, reviewed PR out, one agent session.
How to set it up
Sentry’s MCP is remote with OAuth, so setup is short:
- Add the server:
codex mcp add sentry --url https://mcp.sentry.dev/mcp— or add it in the ChatGPT desktop app under Settings → MCP servers (Streamable HTTP). Older Codex builds route throughmcp-remote; current ones connect directly. - Authenticate via the OAuth browser flow when prompted (
/mcpinside Codex shows connection status). - Ask something Sentry-shaped — “show me the newest unresolved issues in our backend project” — to confirm the tools resolve.
It’s still a developer setup (terminal, config, OAuth scopes), but it’s one of the smoother ones.
A caveat worth knowing: in June 2026, security researchers documented an “agentjacking” attack in which malicious content planted in Sentry error data carried prompt injections into coding agents asked to “fix unresolved errors.” Error messages are attacker-influenced input. Keep Codex’s approval prompts on when it’s working from Sentry data, and be deliberate about what your Sentry token can touch.
The limits that actually matter
- Codex only looks at Sentry when you ask. There’s no watcher. An error can spike at 2 a.m. and Codex will find out when you open a session at 9 and mention it. The MCP connection is pull, never push.
- No triage, no routing, no notifications. Sentry’s server is scoped to developer debugging workflows. Codex won’t assign the issue, create the Linear ticket, page the on-call, or tell the team — those aren’t tools it has, and Codex has no schedule to run them on anyway.
- It’s one persona deep. Everything assumes the person driving is an engineer mid-debug. There’s no version of this for a founder who just wants to know “did anything break for customers this week?” without opening a terminal.
Codex + Sentry MCP is great for “pull this stack trace and fix the bug.” It is not built for “watch our errors and make sure the right things happen when they spike.”
If you want Sentry watched and acted on: Carly
The moment you want Sentry activity handled — a new error spike that becomes a Linear issue and a Slack post the minute it happens, a morning email digest of what’s newly broken, a weekly error-trend summary for the team — you need something that runs on triggers, not sessions.
That’s where Carly fits. Carly is an AI executive assistant built to act on events across your whole stack, set up by conversation instead of config:
- No-code setup. Tell Carly “when a new Sentry error spikes, create a Linear issue and post to Slack” in plain English; it interviews you and builds the workflow.
- Fires on events, 24/7, in the cloud — the error spikes at 2 a.m., the ticket and the Slack post exist at 2:01.
- Connects Sentry to the rest of your work — errors flow into Linear, Jira, Slack, and email, on triggers or on a schedule.
- Actually sends and updates — drafts and sends email (Gmail and Outlook), posts messages, files and updates tickets.
AI agents start at $35/month, and workflow steps that don’t use AI run free and unlimited. Carly connects to 200+ tools natively — including Sentry — and reaches anything else via your own API key.
Codex + Sentry vs Carly
| Codex (Sentry via MCP) | Carly | |
|---|---|---|
| Official integration | Yes (Sentry’s own MCP server) | Yes (/integrations/sentry) |
| Purpose | Debug with real error data | Watch errors, route the response |
| Setup | codex mcp add + OAuth | Describe it in plain English |
| Reads issues & stack traces | Yes (in-session) | Yes |
| Acts when an error spikes | No (pull-only) | Yes, on any event |
| Creates tickets / notifies the team | No | Yes (Linear, Jira, Slack, email) |
| Runs without your machine | No (session-scoped) | Yes (cloud, 24/7) |
| Built for | Developers | Execs, EAs, operators |
| Pricing | ChatGPT plan (usage-metered) | AI agents from $35/mo |
Codex-with-Sentry is a debugging agent with production context. Carly is an assistant that watches Sentry and runs the response.
Frequently Asked Questions
Does OpenAI Codex integrate with Sentry?
Yes, via MCP. Sentry maintains an official MCP server at mcp.sentry.dev designed for coding agents. Add it to Codex with codex mcp add and OAuth, and Codex can pull issues, stack traces, and error history into its sessions.
Can Codex fix bugs from Sentry errors automatically?
Semi. In a session, Codex can fetch a Sentry issue’s stack trace, reason over your codebase, write a fix, and open a PR via its GitHub integration. But nothing starts automatically — a human kicks off every session. Be aware of prompt-injection risk in error data and keep approvals on.
Can Codex alert me when a Sentry error spikes?
No. The MCP connection is pull-only — Codex queries Sentry when asked, inside a session. For spike alerts, error digests, and automatic ticket creation, use an agent platform like Carly, which connects to Sentry natively and fires on events 24/7.
Is the Sentry MCP server official?
Yes — it’s built and maintained by Sentry (getsentry/sentry-mcp), with a hosted endpoint and OAuth. It’s one of the earliest and most polished vendor MCP servers, explicitly optimized for tools like Codex, Claude Code, and Cursor.
More: Codex + GitHub · Codex + Vercel · Codex + Slack · Claude + Sentry · ChatGPT MCP explained · Codex alternatives
Ready to automate your busywork?
Carly schedules, researches, and briefs you—so you can focus on what matters.
See what people say
"Before Carly, I relied on a Calendly link, but the whole process felt impersonal and not very professional. Carly changed that by handling all the back-and-forth, so I'm no longer stuck in endless email threads trying to line up schedules.
Now Carly reaches out to candidates, shares my real-time availability, lets them pick a slot, then sends a Zoom link and drops it straight into my calendar. She sends reminders to both of us before each call, which has significantly reduced no-shows and last-minute confusion.
On top of scheduling, Carly acts like a full executive assistant, sending me my schedule the night before so I can prepare for each call. It reminds me of the old x.ai assistant, but Carly is noticeably smarter, faster, and better suited to my healthcare recruitment business."


