# Install the Sentry Plugin in Your Coding Agent

> Install the Sentry plugin in Claude Code, Cursor, Codex, or Grok with one command, then use prompts for setup, debugging, monitoring, and code review.

**URL:** https://sentry.io/cookbook/install-sentry-plugin-coding-agent/

---

One command installs the Sentry plugin in your coding agent, so it can set up Sentry, fix errors, configure alerts, and more.

**Time:** 5 minutes | **Difficulty:** Beginner

## What You'll Learn

- 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

**Topics:** Sentry MCP, Seer, Error Monitoring, Instrumentation

## Before you start

**Tools**

- One supported coding agent: Claude Code, Cursor, Codex, or Grok

- [Node.js](https://nodejs.org/) and `npx` for the installer

**Accounts & access**

- A [Sentry account](https://sentry.io/signup/) with access to a project

## Steps

### 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**.

**Shared installer**

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

```bash
npx @sentry/agent-plugin install
```

**Native install**

If you prefer to configure each agent individually.

```bash
# Claude Code
claude plugin install sentry@claude-plugins-official

# Cursor
# Open Cursor Settings > Plugins and add Sentry

# Codex
codex plugin marketplace add getsentry/plugin-codex
codex plugin add sentry@sentry-plugin-marketplace

# Grok
grok plugin install getsentry/plugin-grok --trust
```

[Sentry agent plugin documentation](https://docs.sentry.io/ai/agent-plugin/)

### 2. Run a prompt

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

- **Set up Sentry**: `Add Sentry to my Next.js app` — Initialize Sentry SDK in your project

- **Fix errors**: `What are the top errors in the last 24 hours? Fix the most critical one.` — Triage and resolve production issues

- **Monitor AI calls**: `Monitor my OpenAI calls with Sentry` — Track LLM costs, latency, and failures

- **Configure alerts**: `Create a Slack alert for new high-priority issues` — Get notified when things break

- **Review a PR**: `Review PR #123 and fix the Sentry comments` — Use production context in code review

### 3. Go deeper with Seer and custom workflows

The plugin does more than fix errors. Use [Seer](https://docs.sentry.io/product/ai-in-sentry/) 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](https://docs.sentry.io/ai/agent-plugin/) for the full list of capabilities.

[Explore all plugin capabilities](https://docs.sentry.io/ai/agent-plugin/)

## Summary

**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.

## 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.

## FAQ

**Which coding agents are supported?**

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

**What does the installer configure?**

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

**Can I install for a specific agent manually?**

Yes. Each agent has a native install path documented in its [plugin repository](https://github.com/getsentry/sentry-for-ai). The shared installer runs those same commands under the hood.

**Do I need to pick between the shared installer and the native install?**

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

## Next Steps

- [Read the agent plugin documentation](https://docs.sentry.io/ai/agent-plugin/): See the full list of prompts, capabilities, and how to update or remove the plugin.

- [Review the plugin source](https://github.com/getsentry/sentry-for-ai): Browse the source skills and commands used to generate each agent plugin.

- [product/seer](https://sentry.io/product/seer/)

---

*Source: [sentry.io/cookbook/install-sentry-plugin-coding-agent/](https://sentry.io/cookbook/install-sentry-plugin-coding-agent/)*
