Analytics · 1 skill

Microsoft Clarity MCP: connect it to Claude Code, plus ready-made skills

Pull traffic, scroll depth, rage clicks, dead clicks and JavaScript errors by page from Microsoft Clarity, and report where visitors got stuck yesterday.

How to connect Microsoft Clarity MCP to Claude Code, Codex or Cursor

  1. Microsoft Clarity MCP server, Microsoft's official server (@microsoft/clarity-mcp-server, source), also listed in Claude's connector directory. It runs locally with Node: in Claude Code, claude mcp add --transport stdio clarity -- npx -y @microsoft/clarity-mcp-server --clarity_api_token=<token>; Codex and Cursor take the same command and arguments in their server config. Its tools are query-analytics-dashboard, list-session-recordings and query-documentation-resources.
  2. Data Export API with a token. A project admin generates a token in Clarity under Settings > Data Export > Generate new API token. Store it in CLARITY_API_TOKEN and send it as Authorization: Bearer.

The token only exports that one project's data; it can't change settings or tracking. Mind the limit of 10 export requests a day per project and schedule one daily run rather than several.

1 Microsoft Clarity skill

What agents do with Microsoft Clarity

Clarity's Data Export API (GET https://www.clarity.ms/export-data/api/v1/project-live-insights) returns dashboard data for the last 1, 2 or 3 days (numOfDays), broken down by up to three of Browser, Device, Country/Region, OS, Source, Medium, Campaign, Channel and URL. The metrics include Traffic (sessions, bot sessions, distinct users, pages per session), Scroll Depth, Engagement Time, Dead Click Count, Rage Click Count, Quickback Click, Excessive Scroll, Script Error Count and Error Click Count. Each project gets 10 requests a day, and a response stops at 1,000 rows with no pagination.

That shapes the schedule: one daily run that pulls the last 24 hours by URL and device, then a short report on the pages with the most rage and dead clicks, new script errors, and scroll depth on key landing pages. Recordings stay in Clarity; the MCP server can list the sessions that match a filter so you know which ones to watch.

clarity.microsoft.com

Your Microsoft Clarity numbers, on one board with everything else

Skills are free to use with any agent. Briefkin is where their results land: one board for every report, number and question your agents send, with a ping when something needs you.

Free during the open beta. No card.