> For the complete documentation index, see [llms.txt](https://docs.warp.dev/llms.txt).
> Markdown versions of each page are available by appending .md to any URL.

# Sentry MCP: fix Sentry error in Empower website

Connect the Sentry MCP server to Warp, fetch live error data, diagnose stack traces, and verify a proposed fix before deploying it.

Use the Sentry MCP server to give Warp’s coding agent access to error reports and stack traces. In this tutorial, you’ll reproduce a bug in Sentry’s Empower Plant demo app, investigate it against the local code, and verify a fix.

![Using Sentry MCP to fix a production error video](https://i.ytimg.com/vi/rrxfS9u1XRA/sddefault.jpg)

You’ll learn how to:

-   Connect the Sentry MCP server inside Warp.
-   Trigger live error retrieval from Sentry.
-   Diagnose code issues and generate patches automatically.
-   Integrate Sentry debugging into your daily development loop.

1.  #### Set up the Sentry MCP server
    
    Open the MCP panel in Warp:
    
    -   macOS: `Cmd+Shift+P`
    -   Windows/Linux: `Ctrl+Shift+P`  
        Search for “MCP” and select the **MCP Panel**.
    
    Click **Add**, then paste your configuration:
    
    ```json
    {
      "sentry": {
        "command": "npx",
        "args": [
          "-y",
          "mcp-remote@latest",
          "https://mcp.sentry.dev/mcp"
        ],
        "env": {},
        "working_directory": null
      }
    }
    ```
    
    Save the configuration and ensure it appears in the MCP panel.
    
2.  #### Run your app and trigger an error
    
    We’re using the [**Empower Plant** repository](https://github.com/sentry-demos/empower) — Sentry’s official demo project. This fake e-commerce app includes a React frontend and multiple backends, each containing intentional bugs for testing.
    
    Follow the repository’s [local setup instructions](https://github.com/sentry-demos/empower/tree/master#local-setup--development), including its toolchain and `local.env`. Use a Sentry test project you control.
    
    Before starting the app, check which backends the frontend connects to. Services you haven’t started locally may use remote endpoints. From the repository root, start the local React and Flask services:
    
    ```bash
    ./deploy react flask --env=local
    ```
    
    Open the local URL printed by the startup command, reproduce an error, and record the steps.
    
3.  #### Capture the error in Sentry
    
    1.  Go to your **Sentry Dashboard**.
    2.  Locate the triggered issue (for example, a `TypeError`).
    3.  Copy the issue’s URL from the Sentry interface.
    
    Example:
    
    ```plaintext
    https://sentry.io/organizations/demo/issues/12345/
    ```
    
4.  #### Diagnose the error using Warp
    
    Back in Warp, prompt the agent to fetch and analyze the issue:
    
    ```plaintext
    Diagnose this Sentry error and show where it’s coming from in my code.
    Create a fix.
    ```
    
    The Sentry MCP calls `getIssueDetails`, fetching the stack trace and error metadata directly from Sentry. Warp then scans your local codebase, cross-references the error location, and identifies the root cause.
    
    From this example:
    
    > The issue was caused by calling `.toUpperCase()` on an array instead of a string.
    
    In the recorded example, the agent proposes a change to handle the array. Check that the diagnosis matches your Sentry event and local code, then review whether the change produces the expected application behavior.
    
5.  #### Review and verify the fix
    
    Review the proposed diff before applying it, then add a regression test that reproduces the bug: it should fail without the fix and pass with it. Run the affected application’s documented checks, then repeat the original reproduction steps to confirm the expected behavior.
    
    Decide separately when to deploy the change and mark the Sentry issue as resolved.
    
6.  #### Integrate into your workflow
    
    Use Sentry MCP whenever you encounter production or staging errors. Warp can pull the latest issues, analyze them, and suggest patches.
    
    Ideal for:
    
    -   Debugging live production errors.
    -   Triaging complex stack traces.
    -   Preparing fixes for review without switching tools.
