← Back to Cookbook

Install the Sentry plugin in your coding agent

One command installs the plugin, then your agent can set up Sentry, fix errors, configure alerts, and more.

Features
Sentry MCP Seer Error Monitoring Instrumentation
Category Workflow
Time
5 minutes
Difficulty
Beginner
Steps
3 steps

Before you start

Tools
  • One supported coding agent: Claude Code, Cursor, Codex, or Grok
  • Node.js and npx for the installer
Accounts & access

1
Install the plugin

Run the installer below. It detects which agents you have installed, lets you pick the ones to configure, and wires up the Sentry MCP server and plugin commands for each one. Supports Claude Code, Cursor, Codex, and Grok.

Sentry agent plugin documentation
Bash
npx @sentry/ai install

Detects all supported agents on your machine and configures them in one step.

2
Run a prompt

Open your agent in a repository connected to your Sentry project and try any of these prompts.

Set up SentryInitialize Sentry SDK in your project
Add Sentry to my Next.js app
Fix errorsTriage and resolve production issues
What are the top errors in the last 24 hours? Fix the most critical one.
Monitor AI callsTrack LLM costs, latency, and failures
Monitor my OpenAI calls with Sentry
Configure alertsGet notified when things break
Create a Slack alert for new high-priority issues
Review a PRUse production context in code review
Review PR #123 and fix the Sentry comments

3
Go deeper with Seer and custom workflows

The plugin does more than fix errors. Use Seer to get AI root-cause analysis on any issue, or build custom workflows that combine Sentry context with your own tools. See the agent plugin documentation for the full list of capabilities.

Explore all plugin capabilities

That's it.

Your agent has production context.

The Sentry plugin gives your coding agent access to errors, traces, logs, and Seer analysis so it can do more than just fix bugs.

  • Installed the Sentry plugin in a supported coding agent
  • Tried prompts for setup, debugging, monitoring, and code review
  • Explored what the plugin can do with Seer and custom workflows

Pro tips

  • 💡 The installer detects all supported agents on your machine. Run it once to configure multiple agents at the same time.
  • 💡 Run prompts from the repository that matches your Sentry project so the agent can connect production context to the right code.
  • 💡 Ask the agent to show its diff and verification output before you accept a fix.

Common pitfalls

  • ⚠️ Restart your coding agent after installation so it loads the plugin.
  • ⚠️ Run the prompt from a repo that has a Sentry project connected, otherwise the agent won't have context to work with.

Frequently asked questions

Claude Code, Cursor, Codex, and Grok. The installer detects which ones you have and lets you pick.

It sets up the hosted Sentry MCP server and installs Sentry skills and commands for each selected agent.

Yes. Each agent has a native install path documented in its plugin repository. The shared installer runs those same commands under the hood.

No. The shared installer runs the native commands for you. Use whichever is more convenient.

Give your agent production context.

Install the plugin and try a prompt in under 5 minutes.