Skip to content

Guides > External tools & integrations

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.

Open in ChatGPT ↗
Ask ChatGPT about this page
Open in Claude ↗
Ask Claude about this page
Copied!

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.

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

    {
    "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. We’re using the Empower Plant repository — 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, 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:

    Terminal window
    ./deploy react flask --env=local

    Open the local URL printed by the startup command, reproduce an error, and record the steps.

    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:

    https://sentry.io/organizations/demo/issues/12345/
  3. Back in Warp, prompt the agent to fetch and analyze the issue:

    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.

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

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