Connector guide6-minute read6 MCP tools7 languages

Connect Microsoft Clarity to ChatGPT via MCP

Microsoft Clarity Data Export API: the dashboard numbers of a website for the last 1 to 3 days (sessions, users, engagement time, scroll depth, dead clicks, rage clicks, quick backs, script errors), in total or by page, traffic source, device, browser, OS or country. Read-only, one API token per project, 10 requests per project per day.

HCBy HelpCode teamUpdated 6 min read Open-source on GitHub

No credit card · 7-day trial · Self-host alternative available

Microsoft Clarity

Microsoft Clarity

Microsoft Clarity Data Export API: the dashboard numbers of a website for the last 1 to 3 days (sessions, users, engagement time, scroll depth, dead clicks, rage clicks, quick backs, script errors), in total or by page, traffic source, device, browser, OS or country. Read-only, one API token per project, 10 requests per project per day.

tools

6

Region

INTL

Category

Analytics

Authentication

Bearer Token

Required env vars

CLARITY_API_TOKEN
Install in one click on Cloud

7-day free trial · No credit card

  • 7-day free trial
    No credit card required
  • GDPR & SOC 2 ready
    EU data residency, audit logs
  • Open-source on GitHub
    Open source · AGPL-3.0
  • Works with ChatGPT, Claude, Gemini
    Any MCP-compatible client

Summary

Microsoft Clarity Data Export API: the dashboard numbers of a website for the last 1 to 3 days (sessions, users, engagement time, scroll depth, dead clicks, rage clicks, quick backs, script errors), in total or by page, traffic source, device, browser, OS or country. Read-only, one API token per project, 10 requests per project per day.

Guided setup

Connect Microsoft Clarity to ChatGPT in 2 minutes

Start a free trial on AnythingMCP Cloud, connect Microsoft Clarity in the guided setup, then add your MCP URL to ChatGPT. No code and no server to run.

No credit card · 7-day trial · Self-host alternative available

AnythingMCP's plugin in ChatGPT's directory answers questions from your company databases on AnythingMCP Cloud (PostgreSQL, MySQL, SQL Server, Oracle, SAP HANA, SQLite, MongoDB, read-only): open the listing (opens in a new tab) and click Install plugin. Every other connector is added to ChatGPT as a custom MCP server with your AnythingMCP MCP URL.

Try asking

Example prompts for Microsoft Clarity

Click any prompt to copy it. Paste into Claude, ChatGPT, Cursor, Gemini, Copilot or OpenClaw to run it against this connector.

Microsoft Clarity · live via MCP
Share
Opus 4.7

Claude is AI and can make mistakes. Please double-check responses.

💡 No install? Use cloud.anythingmcp.com directly. Sign in, click Connectors → Microsoft Clarity, paste your credentials, mint an MCP API key and you're done. No Docker, no git clone, no local server.

Microsoft Clarity + ChatGPT

Microsoft Clarity Data Export API: the dashboard numbers of a website for the last 1 to 3 days (sessions, users, engagement time, scroll depth, dead clicks, rage clicks, quick backs, script errors), in total or by page, traffic source, device, browser, OS or country. Read-only, one API token per project, 10 requests per project per day.

Prerequisites

See the full setup instructions baked into the connector (visible in the in-app store when you select the connector). The required environment variables for this connector are:

CLARITY_API_TOKEN

Step 1 — Get credentials

Setting up takes about 2 minutes.

  1. Open your project at https://clarity.microsoft.com and go to Settings, Data Export. Only a project admin sees this page.
  2. Click Generate new API token, give it a name of 4 to 32 characters (letters, digits, hyphen, underscore, period; no spaces) and confirm.
  3. Copy the token (a long text in three parts separated by periods) into CLARITY_API_TOKEN. To reach a second Clarity project, install the connector again with that project's token.

The daily limit decides how you work: Clarity allows 10 Data Export requests per project per day, counted for the whole project, not per token. The setup check uses one of them. Plan the calls: one total, one or two breakdowns, then answer from what you have. Never loop, never repeat a call "to be sure", and tell the user when a question would need several calls. An identical call within 30 minutes is answered from the cache and costs nothing. When the limit is reached Clarity answers 429 until the next day.

Where to start: microsoft_clarity_get_dashboard_insights for the totals and the top pages, browsers, devices and countries in a single call. Then one breakdown that fits the question:

  • microsoft_clarity_get_page_insights: per page URL, to find the pages with rage clicks, dead clicks or script errors.
  • microsoft_clarity_get_traffic_source_insights: per Channel, Source and Medium, to compare search, ads, social and email visitors.
  • microsoft_clarity_get_device_insights: per Device, Browser and OS, to find a platform where the site breaks.
  • microsoft_clarity_get_country_insights: per country or region.
  • microsoft_clarity_get_insights_by_dimensions: any one to three of Browser, Device, Country/Region, OS, Source, Medium, Campaign, Channel and URL, for example Campaign with Source.

Reading the answer: a list of blocks, each with metricName and information (rows). Every call returns all metrics; there is no metric filter. With dimensions, each row carries the dimension values next to the numbers. Counts are strings ("9554"), percentages are numbers, times are seconds and everything is in UTC. totalBotSessionCount is traffic Clarity recognised as bots: leave it out of visitor numbers. The frustration metrics report sessionsCount, the share of sessions with the signal and subTotal (how often it happened).

Limits: only the last 24, 48 or 72 hours counted back from the call (num_of_days 1, 2 or 3), no fixed dates and no older history; at most three dimensions; at most 1,000 rows per call and no paging, so on a busy site prefer one or two dimensions. For a trend, the user has to call once a day and keep the results.

Not covered: session recordings, heatmaps, funnels, the natural-language analytics query and the AI visibility reports. Microsoft's own Clarity MCP server reaches those through endpoints that are not a documented public API, and it is moving them from this token to a personal sign-in, so they are left out here.

Errors: 401 means the token is missing, mistyped or expired; 403 that Clarity does not accept this token (deleted or replaced in Settings, Data Export); 400 an unknown dimension or a day count outside 1 to 3; 429 the daily limit.

Step 2 — Install the adapter

curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d

Step 3 — Add the connector in ChatGPT

Your server URL: in AnythingMCP, open MCP Servers → the server this connector is on, and copy its URL (https://cloud.anythingmcp.com/mcp/…). Use it wherever this guide shows YOUR_SERVER_ID.

ChatGPT adds MCP servers as plugins on its Plugins page, on the web and on paid plans. Developer mode is no longer needed. In a Business workspace only admins and owners can add one; in Enterprise and Edu an admin can grant the Create plugins with MCPs permission.

  1. Go to chatgpt.com/plugins, click Add, then Add custom MCP server.
  2. Enter a name, e.g. Name: Microsoft Clarity.
  3. Under Connection, enter the Server URL https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID and keep Authentication on OAuth.
  4. Select I understand and want to continue, then Create as a plugin. When ChatGPT asks, sign in to AnythingMCP and allow access.
  5. Install the new plugin from your personal plugins, then type @ in a chat and pick it.

Available tools

ToolWhat it does
microsoft_clarity_get_dashboard_insightsRead the project's Clarity dashboard totals for the last 1 to 3 days, without any breakdown: sessions, bot sessions, users and pages per…
microsoft_clarity_get_page_insightsRead the Clarity metrics per page URL for the last 1 to 3 days: for every URL its sessions, engagement time, scroll depth and the…
microsoft_clarity_get_traffic_source_insightsRead the Clarity metrics per traffic source for the last 1 to 3 days, broken down by Channel (such as OrganicSearch, Direct, Social…
microsoft_clarity_get_device_insightsRead the Clarity metrics per device type (PC, Mobile, Tablet), browser and operating system for the last 1 to 3 days in one call: sessions…
microsoft_clarity_get_country_insightsRead the Clarity metrics per visitor country or region for the last 1 to 3 days: sessions, engagement, scroll depth and frustration signals…
microsoft_clarity_get_insights_by_dimensionsRead the Clarity metrics for the last 1 to 3 days broken down by one to three dimensions of your choice (Browser, Device, Country/Region…

Example prompts

  • "How many sessions and users did the site have in the last 3 days?"
  • "Which pages had the most rage clicks and dead clicks yesterday?"
  • "Compare search, social and email visitors by engagement time."
  • "On which browser and device do script errors happen most?"
  • "Which countries sent the most traffic in the last 2 days?"

FAQ

Where does the token come from? In your Clarity project, Settings, Data Export, Generate new API token. Only a project admin sees that page, and one token reads one project: install the connector again for a second project.

Why only a few calls a day? Clarity allows 10 Data Export requests per project per day, for the whole project, and the setup check uses one; an identical call within 30 minutes comes from the cache. Data covers only the last 1 to 3 days, at most three dimensions and 1,000 rows per call, so the AI plans one total and one or two breakdowns.

What is not covered? Session recordings, heatmaps, funnels and the AI visibility reports, which have no documented public API. The connector is read-only; nothing installs switched off.

Does the free ChatGPT plan work with custom MCP servers? OpenAI documents custom MCP servers for paid plans only; the Free plan is not on its list.

Next steps

Was this guide helpful?

Connect Microsoft Clarity to ChatGPT in 2 minutes

Start a free trial on AnythingMCP Cloud, connect Microsoft Clarity in the guided setup, then add your MCP URL to ChatGPT. No code and no server to run.

Related guides

Connectors

Connect Microsoft Clarity to Claude via MCP

Microsoft Clarity Data Export API: the dashboard numbers of a website for the last 1 to 3 days (sessions, users, engagement time, scroll depth, dead clicks, rage clicks, quick backs, script errors), in total or by page, traffic source, device, browser, OS or country. Read-only, one API token per project, 10 requests per project per day.

Connectors

Connect Microsoft Clarity to Microsoft Copilot via MCP

Microsoft Clarity Data Export API: the dashboard numbers of a website for the last 1 to 3 days (sessions, users, engagement time, scroll depth, dead clicks, rage clicks, quick backs, script errors), in total or by page, traffic source, device, browser, OS or country. Read-only, one API token per project, 10 requests per project per day.

Connectors

Connect Microsoft Clarity to Cursor via MCP

Microsoft Clarity Data Export API: the dashboard numbers of a website for the last 1 to 3 days (sessions, users, engagement time, scroll depth, dead clicks, rage clicks, quick backs, script errors), in total or by page, traffic source, device, browser, OS or country. Read-only, one API token per project, 10 requests per project per day.

Connectors

Connect Microsoft Clarity to Gemini CLI via MCP

Microsoft Clarity Data Export API: the dashboard numbers of a website for the last 1 to 3 days (sessions, users, engagement time, scroll depth, dead clicks, rage clicks, quick backs, script errors), in total or by page, traffic source, device, browser, OS or country. Read-only, one API token per project, 10 requests per project per day.

Connectors

Connect Microsoft Clarity to Meta Muse via MCP

Microsoft Clarity Data Export API: the dashboard numbers of a website for the last 1 to 3 days (sessions, users, engagement time, scroll depth, dead clicks, rage clicks, quick backs, script errors), in total or by page, traffic source, device, browser, OS or country. Read-only, one API token per project, 10 requests per project per day.

Connectors

Microsoft Clarity MCP Server for Claude & ChatGPT

Microsoft Clarity Data Export API: the dashboard numbers of a website for the last 1 to 3 days (sessions, users, engagement time, scroll depth, dead clicks, rage clicks, quick backs, script errors), in total or by page, traffic source, device, browser, OS or country. Read-only, one API token per project, 10 requests per project per day.