# Install the Sentry Plugin in Your Coding Agent

> Install the Sentry plugin in Claude Code, Cursor, Codex, Grok, GitHub Copilot, or Google Antigravity, 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, Grok, GitHub Copilot (CLI or VS Code), or Google Antigravity

- [Node.js](https://nodejs.org/) and `npx` for the shared 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. The shared installer supports **Claude Code**, **Cursor**, **Codex**, and **Grok**. For **GitHub Copilot** and **Google Antigravity**, use the native install commands.

**Shared installer**

Detects Claude Code, Cursor, Codex, and Grok on your machine and configures them in one step.

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

**Native install**

Configure each agent individually. GitHub Copilot and Google Antigravity install this way.

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

# Cursor
# Open Cursor Settings > Plugins and add getsentry/plugin-cursor

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

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

# GitHub Copilot CLI
copilot plugin marketplace add getsentry/plugin-copilot
copilot plugin install sentry@sentry-copilot-marketplace

# GitHub Copilot in VS Code
# Add "getsentry/plugin-copilot" to the chat.plugins.marketplaces setting,
# then search @agentPlugins in the Extensions view and install sentry

# Google Antigravity
agy plugin install https://github.com/getsentry/plugin-antigravity
```

[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 shared installer detects Claude Code, Cursor, Codex, and Grok on your machine. Run it once to configure several 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, Grok, GitHub Copilot (CLI and VS Code), and Google Antigravity. The shared installer detects Claude Code, Cursor, Codex, and Grok and lets you pick. GitHub Copilot and Google Antigravity use their native install commands. Other [Agent Plugins](https://agent-plugins.org/) clients can install [getsentry/agent-plugin](https://github.com/getsentry/agent-plugin).

**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. For Claude Code, Cursor, Codex, and Grok, the shared installer runs the native commands for you, so use whichever is more convenient. For GitHub Copilot and Google Antigravity, use the native install.

## 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/)*
