Integrations

Microsoft Clarity

Connect Microsoft Clarity to analyze traffic, engagement time, scroll depth, popular pages, and click quality metrics.

API credentialsAnalytics & SEOMicrosoft Clarity API docs

You end up pasting one Clarity Data Export API token, a JWT generated by a project Admin under Settings and Data Export.

Setup time
3 min
Auth
API credentials
API base URL
https://www.clarity.ms/export-data/api/v1
Rate limits
10 API requests per project per day. Each response covers the last 1 to 3 days, accepts at most three dimensions, and is capped at 1,000 rows with no pagination.

Before you begin

  • A Microsoft Clarity project with the tracking code installed and collecting sessions
  • The Admin role on that project. Team members cannot manage API tokens.
  • The project you want to export open in Clarity. Tokens only return data for the project they were created in.

Get your credentials

Open the project you want to export

Sign in at clarity.microsoft.com and open the project from My Projects. Check that your role on it is Admin.

Open this screen →

clarity.microsoft.com/projects
Search projectsMarketing site

My Projects

Projects you own or have been added to.

All projectsOwned by meShared with me
ProjectWebsiteRoleSessions (last 3 days)
Marketing siteclarity.ms/abc123xyzexample.comAdmin9,554
Docsclarity.ms/q7r2m4p1docs.example.comTeam member1,208

The token controls only appear for projects where your role is Admin.

Go to Settings and Data Export

In the project, open Settings and select the Data Export tab. Click Generate new API token.

clarity.microsoft.com/projects/view/abc123xyz/settings
Search projectsMarketing site
Marketing site / Settings / Data Export

Data Export

Download dashboard data through the Clarity Data Export API.

OverviewSetupTeamMaskingIP blockingFunnelsSmart eventsData Export
Maximum of 10 API requests per project per day.
Generate new API token
Token nameCreated byCreated onStatus
reporting-botData Export APIalex@example.comMar 4, 2026Active
old-dashboardData Export APIremoved userJul 8, 2025Revoke

Tokens can be deleted here but never re-read.

Name the token

Type a name of 4 to 32 characters using letters, numbers, hyphens, underscores and periods. Spaces and characters such as @ # $ % & * ! are rejected.

clarity.microsoft.com/projects/view/abc123xyz/settings
Search projectsMarketing site
Marketing site / Settings / Data Export

Data Export

OverviewSetupTeamMaskingIP blockingFunnelsSmart eventsData Export
Generate new API token
Token name
popmcp-export
CancelGenerate

Token names must be unique inside the project.

Copy the token

Copy the JWT from the dialog and store it somewhere safe before closing.

clarity.microsoft.com/projects/view/abc123xyz/settings
Search projectsMarketing site
Marketing site / Settings / Data Export

Data Export

Copy this token now. Clarity will not display it again.
Your API token
API token
eyJhbGciOiJIUzI1****7f0e
Copy

The value is a JWT and is sent as Authorization: Bearer.

Paste the token into PopMCP

Paste the value into PopMCP's API token field and click Save.

Connect in PopMCP

Open your workspace, choose Microsoft Clarity in the marketplace, and fill in the connect dialog:

FieldWhat to enter
API tokensecretIn Clarity, open Settings → Data Export → Generate new API token (project admins only), give it a name, and copy the token. Paste it here. It's stored encrypted. Heads up: Clarity allows only 10 API requests per project per day.Encrypted with AES-256-GCM on save and never shown again.

PopMCP verifies the credential against Microsoft Clarity immediately. On success the connection flips to Verified and its MCP tools are provisioned.

Verify it worked

The Clarity connector in PopMCP shows Connected, and asking for traffic or popular pages for the last day returns real session counts instead of a 401.

Troubleshooting

401 Unauthorized

Why: Token missing, mistyped, expired, or deleted from the Data Export screen.

Fix: Generate a new token under Settings and Data Export, then paste the full JWT. It is long, so check nothing was cut off.

403 Forbidden

Why: The token is not authorised for the operation, usually because the user who created it was removed from the project.

Fix: Have a current project Admin delete the old token and generate a replacement. Microsoft recommends replacing tokens whenever a user loses project access.

429 Exceeded daily limit

Why: More than 10 API requests were made against this project in one day.

Fix: Wait for the daily quota to reset and keep Clarity queries to a small number of broad requests.

The Data Export tab is not visible

Why: Your role on the project is Team member rather than Admin.

Fix: Ask a project Admin to generate the token, or have them change your role under Settings and Team.

Fewer rows than expected

Why: Responses are capped at 1,000 rows and cannot be paginated.

Fix: Narrow the request with dimensions rather than asking for one broad export. A single call accepts at most three dimensions.

Reference

On this page