Platform

AI

Wave
Agents
Amplitude MCP
AI Feedback
Agent Analytics
Early Access Program

Insights

Product Analytics
Marketing Analytics
Session Replay
Heatmaps

Action

Guides and Surveys
Feature Experimentation
Web Experimentation
Feature Management
Activation

Data

Data Governance
Integrations
Security & Privacy
Solutions
Solutions that drive business results
Deliver customer value and drive business outcomes
Amplitude Solutions →

Industry

Financial Services
B2B
Media
Healthcare
Ecommerce

Use Case

Acquisition
Retention
Monetization

Team

Product
Data
Engineering
Marketing

Size

Startups
Enterprise
Resources

Learn

Blog
Resource Library
Compare
Glossary
Explore Hub

Connect

Community
Events
Customers
Partners

Support & Services

Customer Help Center
Developer Hub
Product Updates
Academy & Training
Customer Success

Tools

Benchmarks
Prompt Library
Templates
Tracking Guides
Maturity Model
Event Taxonomy Generator
Pricing
LoginContact salesGet started

AI

WaveAgentsAmplitude MCPAI FeedbackAgent AnalyticsEarly Access Program

Insights

Product AnalyticsMarketing AnalyticsSession ReplayHeatmaps

Action

Guides and SurveysFeature ExperimentationWeb ExperimentationFeature ManagementActivation

Data

Data GovernanceIntegrationsSecurity & Privacy
Amplitude Solutions →

Industry

Financial ServicesB2BMediaHealthcareEcommerce

Use Case

AcquisitionRetentionMonetization

Team

ProductDataEngineeringMarketing

Size

StartupsEnterprise

Learn

BlogResource LibraryCompareGlossaryExplore Hub

Connect

CommunityEventsCustomersPartners

Support & Services

Customer Help CenterDeveloper HubProduct UpdatesAcademy & TrainingCustomer Success

Tools

BenchmarksPrompt LibraryTemplatesTracking GuidesMaturity ModelEvent Taxonomy Generator
LoginSign Up

Agents write code. Fixing it is still on you.

Two MCP workflows to investigate bugs in Claude or Cursor, and fix the ones you used to skip
Product

May 6, 2026

6 min read

Chanaka Perera

Chanaka Perera

AI Engineer, Amplitude

Session Replay query

This blog was co-authored by Eric Kim, Head of Engineering, Agents at Amplitude.

Agents are writing more code than ever, but when something breaks in production, the investigation looks the same. You’re pulled away from the feature you’re shipping to investigate the bug report in Linear, check logs in Datadog, and comb your session replay tool to figure out what went wrong.

Amplitude MCP brings all of that session data directly into Claude and Cursor, so the investigation happens in the same place where your agent will write the code. Now the bugs you used to skip become ones you can actually fix.

Investigate bugs in real time

You get an urgent bug report in Jira or Linear and it’s time to investigate the fix. With Amplitude MCP, you can call Session Replay directly in Claude or Cursor. Here’s what it looks like.

First, describe the bug in plain language (e.g., “Users are having trouble checking out, what’s going on?”). The right skill triggers automatically based on what you ask:

  • If you already have a concrete starting point, like a user report or a specific error name, the debug-replay skill can reproduce it.
  • If you only have a vague issue, like “the checkout flow doesn’t work,” then diagnose-errors can figure out what’s broken.
  • If you want a reliability check across sessions, monitor-reliability will trigger.

If your team has instrumented events to monitor for the specific errors and issues the bug is related to, then these skills will orchestrate a workflow, so you don’t have to go through each step manually.

If you’re still having trouble reproducing the bug, or if you want more control over the investigation, try these tips to narrow down the cause:

  • Find the sessions where the bug happened. get_session_replays retrieves candidate sessions matching an error, user, time window, or event, including specific error events your app has instrumented.
  • See what the user actually did. get_session_replay_events extracts the full interaction timeline, including every click, event, and console error.
  • Correlate with deployments. get_deployments checks whether the bug aligns with a recent release.

Diagnostic information is helpful, but visualizing the bug can help you validate and add more detail to your investigation. Ask your agent to “Find the session where the bug happened,” and narrow it down by user email, time, and date. The replay will render directly in Claude or Cursor, confirming what’s broken so the agent can write the fix.

Investigating and reproducing a bug used to be the slow part of fixing it. Now, what took half a day of context switching happens in a single session in a single tool.

Your bug investigation cheat sheet

Use this…

For this…

debug-replay

“How do I reproduce this bug?”

get_session_replays 

“Find replays where users hit this error.”

get_session_replay_events

“Show me what happened in this replay.”

 

Catch friction before it becomes a ticket

Not every bug starts as a Linear ticket or an urgent Slack message. Sometimes, the bug never shows up at all, and users leave without saying a word. Proactively spotting these instances of friction and failure protects your users from frustration and churn.

Amplitude’s session replay agent runs in the background to continuously watch user sessions and surface these patterns before they show up in your queue. It regularly reviews sessions, flags friction signals, and posts a weekly summary to Slack.

When you notice a new friction pattern emerging, you can pull the agent’s report directly into Claude or Cursor to investigate and fix the issue. Use get_agent_results to return the agent’s analysis: a narrative summary of the friction, the pattern type, representative session IDs, impact framing, and recommended next steps. Now you’re no longer starting from a blank page.

Next, validate the pattern with actual sessions. Use get_session_replay_events to pull the events and see the interaction timeline, or ask your agent to find and render the relevant replays directly in Claude or Cursor.

Once you’ve validated the issue, decide if it needs a fix now. Some issues are worth pulling into your backlog but don’t need a same-day fix. And if it’s urgent, the agent already has the context loaded to ship the fix.

Use this workflow to get ahead of issues before they become a fire drill or lead to invisible customer churn.

Fix the bugs you used to defer

Debugging used to mean leaving your code to investigate: pulling data logs, finding the right session, and scrubbing through replays. The investigation often took longer than the fix itself.

These workflows fix that. The urgent bug lands in your inbox, and the investigation happens in the same place where your agent writes the code. The friction pattern surfaces in Slack, and you pull the agent’s analysis straight into Cursor or Claude.

The point of these workflows isn’t just faster debugging. It changes what bugs get fixed at all. If investigation takes an hour, you’re only ever prioritizing the highest tickets in your queue. If it takes ten minutes, you can work through a class of bugs you used to always defer.

Agents write your code. With these workflows, they can help fix it too.


Ready to use AI to transform your product?

Amplitude Agents help you understand your users more easily than ever.

Get started now
About the author
Chanaka Perera

Chanaka Perera

AI Engineer, Amplitude

More from Chanaka

Chanaka is an AI Engineer at Amplitude, where he’s building the MCP server that brings Amplitude’s behavioral context directly into your AI tools.

More from Chanaka
Topics

Agents

Amplitude Session Replay

Engineering

MCP

Recommended Reading

article card image
Read 
Insights
Your agents are only as good as your data context

Sep 4, 2026

9 min read

article card image
Read 
Insights
The New Trust Economy in Financial Services

Sep 2, 2026

11 min read

article card image
Read 
Product
How to Secure AI Agent Traces Without Losing the Signal

Aug 28, 2026

7 min read

article card image
Read 
Product
Connecting agent performance to product outcomes

Aug 20, 2026

10 min read

Platform
  • AI Agents
  • Agent Analytics
  • AI Feedback
  • Amplitude MCP
  • Product Analytics
  • Web Analytics
  • Feature Experimentation
  • Feature Management
  • Web Experimentation
  • Session Replay
  • Guides and Surveys
  • Activation
Compare us
  • Adobe
  • Google Analytics
  • Contentsquare
  • Fullstory
  • Heap
  • LaunchDarkly
  • Mixpanel
  • Optimizely
  • Pendo
  • PostHog
Resources
  • Resource Library
  • Blog
  • Agent Prompt Library
  • Product Updates
  • AI Early Access Program
  • Amp Champs
  • Amplitude Academy
  • Events
  • Glossary
  • Free Chart Maker
Partners & Support
  • Status
  • Contact Us
  • Customer Help Center
  • Community
  • Developer Docs
  • Partner Program
  • Partner Directory
  • Become an affiliate
Company
  • About Us
  • Careers
  • Press & News
  • Investor Relations
  • Diversity, Equity & Inclusion
View markdown
Terms of ServicePrivacy NoticeAcceptable Use PolicyLegal
EnglishJapanese (日本語)Korean (한국어)Español (LATAM)Español (Spain)Português (Brasil)Português (Portugal)FrançaisDeutsch
© 2026 Amplitude, Inc. All rights reserved. Amplitude is a registered trademark of Amplitude, Inc.
Blog
InsightsProductCompanyCustomers
Topics

101

AI

APJ

Acquisition

Adobe Analytics

Agents

Amplify

Amplitude AI

Amplitude Academy

Amplitude Activation

Amplitude Agent Analytics

Amplitude Analytics

Amplitude Audiences

Amplitude Community

Amplitude Feature Experimentation

Amplitude Full Platform

Amplitude Guides and Surveys

Amplitude Heatmaps

Amplitude Made Easy

Amplitude Session Replay

Amplitude Web Experimentation

Amplitude on Amplitude

Analytics

B2B SaaS

Behavioral Analytics

Benchmarks

Churn Analysis

Cohort Analysis

Collaboration

Consolidation

Conversion

Customer Experience

Customer Lifetime Value

Customer Support

DEI

Data

Data Governance

Data Management

Data Tables

Digital Experience Maturity

Digital Native

Digital Transformer

EMEA

Ecommerce

Employee Resource Group

Engagement

Engineering

Event Tracking

Experimentation

Feature Adoption

Financial Services

Funnel Analysis

Getting Started

Global Agent

Google Analytics

Growth

Healthcare

How I Amplitude

Implementation

Integration

Kimi

LATAM

LLM

Life at Amplitude

MCP

Machine Learning

Marketing Analytics

Media and Entertainment

Metrics

Modern Data Series

Monetization

Next Gen Builders

North Star Metric

Open-Weight AI Models

Partnerships

Personalization

Pioneer Awards

Privacy

Product 50

Product Analytics

Product Design

Product Management

Product Releases

Product Strategy

Product-Led Growth

Recap

Retention

Revenue

Startup

Tech Stack

The Ampys

Warehouse-native Amplitude