Microsoft Clarity
Connect Microsoft Clarity to analyze traffic, engagement time, scroll depth, popular pages, and click quality metrics.
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.
My Projects
Projects you own or have been added to.
| Project | Website | Role | Sessions (last 3 days) |
|---|---|---|---|
| Marketing siteclarity.ms/abc123xyz | example.com | Admin | 9,554 |
| Docsclarity.ms/q7r2m4p1 | docs.example.com | Team member | 1,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.
Data Export
Download dashboard data through the Clarity Data Export API.
| Token name | Created by | Created on | Status |
|---|---|---|---|
| reporting-botData Export API | alex@example.com | Mar 4, 2026 | Active |
| old-dashboardData Export API | removed user | Jul 8, 2025 | Revoke |
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.
Data Export
Token names must be unique inside the project.
Copy the token
Copy the JWT from the dialog and store it somewhere safe before closing.
Data Export
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:
| Field | What to enter |
|---|---|
| API tokensecret | In 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.