# PromptRails + Microsoft Clarity Integration

Source: http://localhost:3000/integrations/clarity

---

[promptrails](/)

[Website ↗](https://promptrails.ai)[Sign in](https://console.promptrails.ai/?utm_source=website&utm_medium=cta&utm_campaign=signup&utm_content=header_signin)[Get started →](https://promptrails.ai/company/contact)

[All Integrations](/integrations)

![Microsoft Clarity](/images/logos/microsoft-clarity.svg)

# Microsoft Clarity

Developer Tools

Query Microsoft Clarity behavioral web analytics — traffic, engagement, scroll depth, dead clicks, rage clicks, quickbacks and script errors — broken down by page, device, browser, channel and OS. Your agents can run behavioral anomaly scans over the last 1-3 days via the read-only Clarity Data Export API.

## How to Connect

1.  1In your Clarity project, go to Settings → Data Export → Generate new API token (project admin only).
2.  2Copy the generated token.
3.  3Go to the MCP Templates marketplace and find the Microsoft Clarity template.
4.  4Enter your Clarity API token and add the template to your agent.

## Available Tools

`clarity_get_live_insights`

Query metrics by up to 3 dimensions

`clarity_site_snapshot`

Site-wide baseline snapshot

`clarity_by_url`

Metrics broken down by page URL

`clarity_by_url_device`

By URL and device (mobile vs desktop)

`clarity_by_url_browser`

By URL and browser

`clarity_by_url_channel`

By URL and traffic channel

`clarity_by_device_os`

By device and OS

[Documentation](/mcp-tools)[Microsoft Clarity API Reference](https://learn.microsoft.com/en-us/clarity/clarity-data-export-api)

[Get Started](https://console.promptrails.ai)
