# Microsoft Clarity MCP

> Microsoft Clarity uses behavioral analytics, heatmaps, and recorded sessions to show exactly how users interact with your website. It finds friction points by tracking clicks, scrolls, and user frustration patterns like rage clicking. Connect it to your AI agent to ask questions about site performance—like 'Why are users abandoning checkout?'—and get actionable data instantly.

## Overview
- **Category:** industry-titans
- **Price:** Free
- **Tags:** behavioral-analytics, heatmaps, session-recording, ux-insights, web-analytics, user-engagement

## Description

You're gonna use this server for deep behavioral analytics on your site. It pulls data from Microsoft Clarity, letting your AI client show you exactly how users interact with your web pages—where they click, where they get stuck, and what parts of the layout they ignore. You don't just guess why people leave; you look at the proof.

When you connect it to your agent, you can ask pointed questions about site performance, getting actionable data instantly without manually digging through dashboards. It’s all structured into specific tools that let your AI client work its magic.

### Project Overview and Health Checks

You'll start by ensuring everything's running clean; the `check_clarity_status` tool verifies if the whole server is connected and working right. To see what sites you're tracking, you use `list_projects`, which gives you a rundown of every website project Clarity monitors. Once you pick one, you can get specific details about that tracked site using `get_project`. For high-level performance checks, the `get_dashboard` tool pulls aggregate metrics like total sessions, bounce rates, and average engagement scores across all your projects.

### Analyzing User Behavior Maps

The heatmaps are where you figure out what's going wrong. The `list_heatmaps` tool retrieves a list of available maps for multiple pages or projects. Then, the `get_heatmap` tool pulls detailed visual data showing exactly where users click, scroll, or focus on any specific page layout. You can also get a sense of how much content people actually see; `get_scroll_depth` calculates what percentage of the total page content users view. To rank your pages by traffic, you use `list_top_pages`, which generates a ranked list showing the sites getting the most sessions.

### Real-Time and Session Deep Dives

If you need to know what’s happening right now, the `get_live_insights` tool fetches real-time numbers for active users, current page views, and session duration. When you want to review past behavior, first use `list_recordings` to get a list of all saved sessions, showing their dates and durations. To dig into one specific instance, `get_recording` pulls detailed info about a single user session, letting you see its full timeline and how long they stayed.

### Diagnosing User Frustration and Failure Points

This is where you find the bugs that frustrate users. You can pinpoint technical failures by using `list_dead_clicks`, which lists specific instances where users click an element that looks clickable but doesn't actually respond—that’s a UI failure waiting to happen. Similarly, `list_rage_clicks` tracks moments when users repeatedly click something out of pure frustration because the site isn't working right. These tools show you exactly where your UI is broken.

### Running Through All Your Data Points

You can also get overall metrics on project health using `get_dashboard`, and if you need to check specific details about a tracked website, `get_project` pulls those records. The server's capabilities are built for deep research, covering everything from simple page views to complex user frustration patterns, letting your AI client analyze the data like you’re sitting shoulder-to-shoulder with your teammate.

## Tools

### check_clarity_status
Verifies if the server is connected and running correctly.

### get_dashboard
Retrieves aggregate metrics like total sessions, bounce rates, and engagement scores for a project.

### get_heatmap
Gets detailed visual data showing click, scroll, and attention patterns on a specific page.

### get_live_insights
Fetches real-time numbers for active users, current page views, and session duration.

### get_project
Retrieves specific details about a tracked website project.

### get_recording
Gets detailed information about a single recorded user session, including its duration and pages visited.

### get_scroll_depth
Calculates what percentage of the page content users actually scroll down to view.

### list_dead_clicks
Lists specific instances where users click an element that doesn't respond, indicating a UI failure.

### list_heatmaps
Retrieves a list of available heatmaps for multiple pages or projects.

### list_projects
Gets a list of all websites and projects currently being tracked by Clarity.

### list_rage_clicks
Lists instances where users repeatedly click an element in frustration, pointing to performance issues.

### list_recordings
Provides a list of all saved session recordings with their dates and durations.

### list_top_pages
Generates a ranked list of the pages receiving the most traffic (sessions) on the site.

## Prompt Examples

**Prompt:** 
```
Show me all rage clicks and dead clicks on our checkout page this week.
```

**Response:** 
```
Analyzing project 'E-commerce Site' (proj_501)... Found 34 rage click events on the checkout page. The hotspot is the 'Apply Coupon' button (89% of rage clicks) — users are clicking repeatedly because the button takes 4+ seconds to respond. Dead clicks: 12 events on the 'Shipping Options' section — the estimated delivery dates look clickable but aren't interactive. Would you like to see the heatmap or session recordings for this page?
```

**Prompt:** 
```
What are the top 5 most visited pages and how far do users scroll on the homepage?
```

**Response:** 
```
Top 5 pages by sessions: 1) Homepage — 28,400 sessions, 3.2 engagement score. 2) /pricing — 12,100 sessions, 4.1 engagement. 3) /features — 8,900 sessions. 4) /checkout — 6,200 sessions. 5) /blog — 5,800 sessions. Scroll depth for Homepage: 100% reach the hero section, 78% reach the features grid, 52% reach testimonials, 31% reach the footer CTA. Content below the fold has a 48% drop-off. Would you like to see the heatmap?
```

**Prompt:** 
```
How many active users are on the site right now and what pages are they viewing?
```

**Response:** 
```
Live insights for 'E-commerce Site' (proj_501): 142 active users right now. Top pages being viewed: /pricing (34 users), Homepage (28 users), /features (19 users), /checkout (15 users), /blog/ai-tools-2025 (12 users). Average session duration: 4m 12s. Engagement score (live): 3.8/5. Traffic is 23% higher than the same time yesterday. Would you like to see the dashboard metrics for the full day?
```

## Capabilities

### Gauge Overall Site Health
Retrieve high-level performance data including sessions, bounce rates, and average engagement scores across all tracked projects.

### Analyze User Behavior Maps
Generate heatmaps that show exactly where users click, scroll, or focus on a specific page layout.

### Inspect Real-Time Activity
Get live metrics detailing how many people are currently on the site and which pages they're viewing right now.

### Diagnose User Frustration
Identify specific technical failures like dead clicks or rage clicking to pinpoint broken UI components that frustrate users.

### Review Past Sessions
Access and analyze recorded user sessions, viewing the timeline of pages visited and the duration of engagement for deep research.

## Use Cases

### Debugging a Broken Checkout Flow
A Product Manager noticed checkout drop-off was high, but couldn't tell why. They asked their agent to run `list_dead_clicks` on the payment page. The result showed 20 dead clicks on the 'Save Card Info' section—the field labels look clickable but aren't. This immediately told them the UI needed an overhaul.

### Optimizing Homepage Content
A UX designer wants to know if their new value proposition is visible. They run `get_scroll_depth` and find that 65% of users never scroll past the hero section. This proves they need a more aggressive visual hook higher up on the page.

### Investigating Unexpected Traffic Drops
A growth engineer sees a sudden drop in activity. They run `get_live_insights` and see that while traffic is still high, the average session duration has plummeted to 1 minute. This signals users are arriving but leaving immediately, suggesting an unexpected redirect or technical blocker.

### Analyzing Top Page Performance
A marketing team wants to know which page drove the best user interaction last month. They use `list_top_pages` first, then run `get_heatmap` on the top result, revealing that users are clicking links in an unexpected order, pointing to a navigational issue.

## Benefits

- See who's failing to convert. Instead of guessing, run `list_dead_clicks` and `list_rage_clicks` to pinpoint the exact UI element that causes user frustration—whether it's a slow button or an invisible link.
- Understand content value instantly. Use `get_scroll_depth` to see if your key message is below the fold. If 70% of users stop scrolling at the pricing tier, you know where to rework the layout.
- Monitor site health in real time. With `get_live_insights`, you can watch user flow and engagement scores during a major marketing push without waiting for yesterday's reports.
- Quickly audit your entire setup. Use `list_projects` before diving deep, ensuring your AI agent is pulling data from the correct site configuration or project ID.
- Benchmark performance easily. Run `get_dashboard` to compare engagement metrics against previous periods and identify trends in overall bounce rates.

## How It Works

The bottom line is, instead of reading through a massive analytics dashboard, your AI client gives you a single diagnosis: 'Here's what's broken and where.'

1. Subscribe to this server and plug in your Clarity API key.
2. Ask your AI agent a question about user behavior (e.g., 'Where are users abandoning the checkout page?').
3. The agent runs the appropriate tool, returning structured data—like heatmap coordinates or list of dead clicks—that it translates into plain English insights for you.

## Frequently Asked Questions

**How do I find out if users are seeing my important content?**
Run `get_scroll_depth`. This tool tells you the percentage of people who actually scroll down to view your message, identifying exactly where user interest drops off.

**What is the difference between using get_dashboard and list_top_pages?**
`get_dashboard` gives you aggregate metrics (the overall picture). `list_top_pages` provides a simple, actionable ranked list of pages that are driving the most sessions right now.

**Can I check for UI bugs with list_rage_clicks?**
Yes. The `list_rage_clicks` tool detects repeated, frustrated clicking patterns. This usually means a button is slow, or an element isn't responding properly.

**How do I get live data on user behavior right now?**
Use `get_live_insights`. This provides real-time counts for active users and the top pages they are viewing at this exact moment, great for launch day monitoring.

**What does running the `check_clarity_status` tool tell me about my API key?**
It verifies your connection credentials instantly. If the status check fails, it means there is an issue with the provided API Key or project scope; you'll need to re-authenticate first.

**If I run `list_projects`, how do I select the correct website for analysis?**
The tool returns a list of all sites connected to your account. You must use the unique ID or slug from that returned list when calling any other function, like `get_heatmap`.

**When using `list_recordings`, what specific parameters do I need for the `get_recording` tool?**
You require both the unique recording ID and the parent project scope. Passing these two identifiers allows your agent to pull detailed session timelines and playbacks.

**After listing heatmaps with `list_heatmaps`, what data points must I pass to `get_heatmap` for a full analysis?**
You need the specific page URL and the desired date range. This ensures you retrieve the raw click, scroll, and attention pattern data needed for accurate visualization.

**Can I detect UX friction points like dead clicks and rage clicks?**
Yes! Use `list_dead_clicks` to find page elements where users click without any response — signaling non-interactive elements that look clickable. Use `list_rage_clicks` to detect pages where users repeatedly click in frustration, indicating broken buttons, slow-loading elements, or confusing UI patterns.

**Can I analyze how far users scroll on each page?**
Yes. The `get_scroll_depth` tool returns scroll metrics for each page in your project, showing the percentage of users who reach each content section. This identifies exactly where engagement drops off — essential for optimizing content placement and CTA positioning.

**Can I view real-time analytics while users are on my site?**
Yes. The `get_live_insights` tool provides real-time data for any project, including active user count, current page views, and live engagement metrics. For historical aggregates, use `get_dashboard` to access sessions, pages per session, and engagement scores over time.