clarity-mcp-server

MCP.Pizza Chef: microsoft

Microsoft's own connector for Clarity, its free website-analytics product. Three read-only tools pull traffic and behaviour figures, list session recordings filtered by country, device, browser, rage clicks or checkout step, and search Clarity's help pages. Nothing in your account can be changed. You need a Clarity data-export token, free to generate in your project settings; the Claude Desktop extension asks for it in a form field. Everything you ask travels to Microsoft's servers, as you would expect from their own product.

Data
Web/Research

Use This MCP server To

See how many visits came from mobile phones last week Find recordings where visitors rage-clicked on my pricing page Compare which browsers my visitors used this month Pull recordings of sessions that hit an error Look up how to set up a custom event in Clarity List sessions that abandoned checkout at the payment step

README

Microsoft Clarity MCP Server

This is a Model Context Protocol (MCP) server for the Microsoft Clarity. It allows you to access your session recordings, project analytics, and documentation from Clarity using Claude for Desktop or other MCP-compatible clients.

Key Features

  • Analytics Data Access: Query your Microsoft Clarity analytics data including traffic metrics, user behavior insights, and performance statistics
  • Session Recording Retrieval: Access and analyze session recordings to understand user interactions and identify optimization opportunities
  • Natural Language Querying: Ask questions in plain English to get insights from your data - no need to learn complex query syntax or API endpoints
  • Flexible Data Filtering: Filter results by various dimensions such as browser, device, country, and many more
  • Real-Time Data Access: Fetch the latest analytics data and insights from your Clarity projects on-demand
  • Documentation Integration: Get quick answers and guidance from Microsoft Clarity documentation directly within your workflow
  • Seamless MCP Integration: Works natively with Claude for Desktop, Visual Studio Code, and other Model Context Protocol (MCP) compatible clients

Setup and Installation

Prerequisites

  • Node.js v16 or higher
  • A Microsoft Clarity account and API token
  • Any MCP-compatible client (Claude for Desktop, etc.)

Installation

Option 1: Install via npm (recommended)

You can install and run this package directly using npm:

# Install globally
npm install -g @microsoft/clarity-mcp-server

# Run the server
clarity-mcp-server

clarity-mcp-server FAQ

Do I need a paid account?
No. Microsoft Clarity is free, and so is the data-export token this needs. You generate the token inside your Clarity project under Settings, then Data Export.
Do I need a key?
Yes, a Clarity data-export token. It has to be in place before the server starts, either as a startup setting or a command-line value. The Claude Desktop extension collects it in a hidden password-style field.
The README says I can pass the token as a tool parameter — can I?
No. That instruction is out of date. It names a get-clarity-data tool that does not exist, and none of the three real tools accept a token of any kind. Set it before launch or nothing will work.
Could my token leak?
Possibly. The command-line method documented in the README puts your token into the running process's command line, where anyone with access to that machine's process list can read it. The environment setting or the Claude Desktop field is safer.
Can it change or delete anything?
No. All three tools are read-only lookups against your Clarity project. Nothing is created, edited or removed, and the tools declare themselves read-only to your assistant.
Can I use this to find out why people leave my checkout?
Yes. Filter recordings by the checkout step where people dropped off, or by rage clicks and dead clicks, then read through the session list it returns.
Which apps does it work in?
Claude Desktop, which has a one-click extension in its gallery, plus VS Code and anything else that can launch a small local command. Node 16 or newer is required.
How much can it fetch at once?
Up to 250 recordings per request, and you must always give a date range — there is no all-time option.
Is it maintained?
Yes. It is published by Microsoft under an MIT licence, and the code was last updated in February 2026.