← All connection guides

How to connect Codex to Sentry

Connect Codex to Sentry over OAuth and verify that it can read one known error from a test project.

Free guide · Updated

Based on official documentation · Checked

Ask your agent

Copy the prompt and paste it into your assistant.

Quick answer

Add the hosted Sentry MCP server to Codex with a project-scoped URL, authorize it via OAuth, and ask Codex to read one known issue. Use a test project with synthetic error data so the first check has a result you can compare.

Choose the project and error

In Sentry, open a test project and copy the organization slug, project slug and a known issue link or short ID. Choose an issue with a recognizable title and status. Use the slugs from the project rather than display names, and leave the telemetry in Sentry.

Register and authorize the server

Use the project-scoped URL below. Replace example-org and staging-web with your own slugs. This CLI recipe registers a dedicated MCP server entry. If you already have the Sentry plugin or another MCP entry, choose one connection for this test. Sign in to the correct Sentry account when prompted. If Codex completes sign-in during registration, you can skip the separate login command.

codex mcp add sentry-staging --url https://mcp.sentry.dev/mcp/example-org/staging-web
codex mcp login sentry-staging
codex mcp list

Check which data is visible

Sentry lets you scope its hosted server by organization and project. The scoped server sets the default project and removes unnecessary discovery tools. Confirm you can open the same issue in Sentry with the account you authorized. Keep tool approval on for actions that would change issue state or data.

Practice

Read one known issue

  1. Open Codex in the project and check that sentry-staging is available.
  2. Give Codex the issue link or short ID. Ask for the title, current status and direct Sentry link. Request a read-only lookup with no comments or status changes.
  3. Compare the response with the same issue in the Sentry dashboard.

Output: The issue link and matching title and status from the test project.

Resolve a failed connection or lookup

If authentication fails, check the saved endpoint and the OAuth account. If a specific issue is missing, check that it belongs to the scoped project and that the authorized account has access. This guide uses hosted Sentry. For self-hosted Sentry use the self-hosted setup in the vendor documentation. To disconnect this entry, log it out and remove it from Codex.

codex mcp logout sentry-staging
codex mcp remove sentry-staging

Sources

Read the primary material