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

  • Use Seer’s AI-powered debugging to automatically analyze and diagnose errors
  • Leverage 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 Sentry Seer and MCP Will Solve This Problem

Sentry Seer uses advanced AI to automatically analyze your application’s errors, traces, and logs to identify root causes and suggest fixes. For our course search problem, Seer will:

  1. Intelligent Error Analysis: Seer will examine the error context and understand what’s going wrong in your application
  2. Full-Stack Correlation: By analyzing traces and logs across your frontend and backend, Seer can see the complete picture of what’s happening
  3. Automatic Root Cause Detection: Seer will identify the exact issue causing the search to fail
  4. Smart Fix Suggestions: AI will provide the exact code changes needed to resolve the problem
  5. Automated Resolution: Seer can even generate pull requests with the fixes, saving you time and effort

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 analysis 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"
    }
    }
    }

    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. Note the tool calls we now have access to.

    Sentry MCP Setup
  2. Authenticate with Sentry

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

Using Seer to Analyze the Course Search Issue

Now that we have MCP set up, let’s use Seer to automatically analyze and fix our course search problem. We can see in the configuration the available tool calls we can utilize in Cursor’s chat window.

  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:

    Find project <you-project-name> in Sentry

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

  2. Trigger Seer Analysis

    Ask Seer to perform a root cause analysis on the search issues:

    Use Sentry Seer to analyze the root cause of the course search failures

    Seer will automatically:

    • Examine error traces across frontend and backend
    • Analyze request/response patterns
    • Identify parameter mismatches
    • Correlate timing and performance data
  3. Review Seer’s Findings

    Seer will identify that the frontend is sending a query parameter while the backend expects a q parameter. The analysis will include:

    • Root Cause: Parameter name mismatch between frontend (query) and backend (q)
    • Error Location: Frontend API service and backend search route
    • Impact: 100% failure rate for course search functionality
    • Confidence: High (based on consistent error patterns)
  4. Apply Seer’s Fix Suggestions

    Seer will provide the exact code changes needed. You can either:

    Option A: Apply the fix manually based on Seer’s suggestions

    Option B: Let Seer generate a pull request with the fix

    For Option B, simply ask:

    Generate a pull request to fix the parameter mismatch issue

Automated Fix with Seer

Seer’s automated analysis reveals the issue and provides the exact fix needed:

  1. Seer’s Analysis Results

    Seer identifies the parameter mismatch and suggests updating the frontend to use q instead of query:

    // Current (broken) code:
    fetchApi<any[]>(`/search/courses?query=${encodeURIComponent(query)}`)
    // Seer's suggested fix:
    fetchApi<any[]>(`/search/courses?q=${encodeURIComponent(query)}`)
  2. Apply the Fix

    Navigate to /apps/frontend/src/services/api.ts and update the search method:

    search: {
    courses: (query: string) =>
    fetchApi<any[]>(`/search/courses?q=${encodeURIComponent(query)}`),
    },
  3. Verify the Fix

    Test the course search functionality again. Seer will continue monitoring and confirm that 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 experienced how Seer and the MCP server can automatically diagnose and fix issues:

  • 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