Skip to content

Fixing Academy Course Search

Now that we’re able to login, naturally the next thing we’d want to do is be able to search for courses that we can enroll in, right?

Well, clearly not - because its broken!

Broken Course Search
Module 2 Issues

We’re seeing the error pop up in Sentry, but how can we use Seer and the Sentry MCP server to help analyze and fix the issue quicker?

Learning Objectives

By the end of this module, you’ll know how to:

  • Use Seer’s AI-powered debugging to automatically analyze and diagnose errors
  • Take advantage of automated fix suggestions to resolve issues faster than manual debugging
  • See how AI can generate pull requests with the fixes needed to resolve the issue
  • Use the Sentry MCP Server to bring real-time Sentry context into your development environment
  • Access live issue data and Seer analysis directly from your IDE or AI agentic workflow

How Seer and MCP Will Help Us

For our course search problem, Seer will leverage:

  1. Intelligent Error Analysis: examine the error context and understand what’s going wrong across the full application
  2. Automatic Root Cause Detection: identify the exact issue causing the search to fail
  3. Actionable Solutions: Seer doesn’t just tell you there’s a problem—it shows you exactly what code to change and how to fix it
  4. Hands-Free Fixes: When you’re ready, Seer can even fix the issue and create a pull request for you, so you can focus on building features instead of debugging

Enhanced Debugging with Sentry MCP Server

The Sentry MCP Server provides secure connectivity between your development environment and Sentry’s rich debugging data. With MCP integration, you can:

  • Access Real-Time Context: Bring live Sentry issues, traces, and logs directly into your IDE or AI agentic workflow
  • Invoke Seer Remotely: Trigger Seer and get fix recommendations without leaving your development environment
  • Search Across Projects: Query your entire Sentry organization for related issues and patterns
  • Streamlined Workflow: Eliminate context switching between your code editor and Sentry dashboard

Setting Up Sentry MCP Server

Before we dive into using Seer to analyze our course search issue, let’s set up the Sentry MCP Server to enable seamless integration with your development environment.

  1. Configure MCP in Your IDE

    Install the Sentry MCP integration in your IDE (we’ll be using Cursor) to enable direct communication with Sentry’s debugging data and Seer analysis.

    • Visit Cursor ➡️ Settings ➡️ Tools & Integrations ➡️ MCP Tools
    • Select “Add Custom MCP” and add:
    Terminal window
    {
    "mcpServers": {
    "sentry": {
    "url": "https://mcp.sentry.dev/mcp"
    }
    }
    }
  2. Authenticate with Sentry

    If you’ve used the above configuration, you’ll be automatically authenticated with OAuth.

    Once everything is complete, you should see a little green light below the icon in the MCP tools list indicating 👍 You may need to choose something else from the left menu, then return here to confirm it took.

    *Note: click to expand and see the tool calls we now have access to.

    Sentry MCP Setup
  3. Enable Seer Automation settings in your Sentry Project(s)

    In Sentry, visit Project ➡️ Settings ➡️ Seer and add your repo. We’ll do this for both the Frontend and Server applications.

    Here we can fine-tune the automation settings for how we want Seer to work. Scan Sentry Issues for a root cause analysis… and then? 🤖

    Seer Settings

Alternatively, you can use the mcp.sentry.dev web client for a simple way to configure and test the MCP server. From here you can authenticate with your Sentry organization and access a hosted MCP server for testing.

Seer

Using Seer to Fix the Course Search Issue

Now that we have MCP set up, let’s use Seer to automatically analyze and fix our course search problem.

  1. Query Sentry Issues via MCP

    In your IDE’s AI chat interface, use the MCP connection to query Sentry about the course search issues:

    tell me about issues in this project in sentry

    The MCP server will fetch live issue data from Sentry and present it directly in your development environment.

  2. Get AI Analysis for Specific Issue

    Ask the Sentry MCP server to get the last autofix data for the specific issue:

    tell me about the last autofix run on <ISSUE-ID>

    Replace <ISSUE-ID> with the actual issue ID from your Sentry project (e.g., PROJECT-123).

    The MCP server will:

    • Connect to your Sentry organization
    • Retrieve the specific issue details
    • Trigger Seer analysis if not already available
    • Return the complete analysis with fix suggestions
  3. Review the Analysis in Cursor

    You’ll see Seer’s analysis appear right in your chat window, giving you a clear picture of what’s happening.

    You should see:

    • What’s Actually Wrong: Root cause analysis explaining exactly why the search is failing
    • Where the Problem Is: Specific files and line numbers where the issue occurs
    • How Bad It Is: Assessment showing how many users are affected
    • Confidence Level: How sure the AI is in the diagnosis
    • How to Fix It: Exact code changes needed to resolve the issue
  4. Apply the Fix Locally

    Once you’ve reviewed the analysis and you’re happy with the suggested solution, just ask Cursor to implement the fix:

    apply that autofix to my local codebase

    Cursor will then:

    • Look through your current code files
    • Apply the exact changes that were recommended
    • Update the necessary files with the fixes
    • Give you a summary of what was changed so you know exactly what happened

Recap

The automated analysis reveals the issue and provides the exact fix needed. Here’s what this debugging experience looks like in action:

  1. Seer’s Analysis Results in Cursor

    When you ask the MCP server to analyze the issue, you’ll see output like this in Cursor:

    🔍 Seer Analysis for Issue PROJECT-123
    Root Cause: Parameter mismatch in API call
    - Frontend sends: /search/courses?query=javascript
    - Backend expects: /search/courses?q=javascript
    Impact: 100% of search requests failing
    Confidence: 95%
    Suggested Fix:
    File: /apps/frontend/src/services/api.ts
    Line: 45
    Change: Replace 'query' parameter with 'q' parameter
  2. Cursor Applies the Fix Locally

    After reviewing the analysis and you’re confident in the solution, ask Cursor to implement the fix:

    apply that autofix to my local codebase

    Cursor will then automatically:

    • Find the file /apps/frontend/src/services/api.ts
    • Update line 45 to use q instead of query
    • Save the changes
    • Let you know the fix has been applied
  3. Verify the Fix

    Test the course search functionality again. The search should now work correctly, and Seer will continue monitoring to confirm the issue has been resolved.

Once this is complete, give search a try again and you should see your results!

Search Fixed

Next Steps with Seer and MCP

Now that you’ve seen how Seer and the MCP server can automatically diagnose and fix issues, here are some ways you can take this further:

  • Set up automated monitoring to catch similar issues before they impact users
  • Configure Seer alerts to get proactive fix suggestions for new errors
  • Integrate MCP workflows into your daily development process for faster debugging
  • Explore Seer’s advanced features like performance optimization suggestions and security vulnerability detection