Microsoft Clarity MCP connector
The Microsoft Clarity connector lets AI agents ask about traffic, engagement and friction signals in a Clarity project through InsightfulPipe's hosted MCP server at https://clarity.insightfulmcp.com/. You connect it with a Clarity Data Export API token, and the server is read-only.
Microsoft Clarity MCP server reference
- Endpoint
https://clarity.insightfulmcp.com/- Server name
clarity-mcp- Actions
- 1 read-only actions.
Add it from a terminal, then click Authorize access in the browser window that opens:
claude mcp add --transport http clarity-mcp https://clarity.insightfulmcp.com/
gemini mcp add --transport http clarity-mcp https://clarity.insightfulmcp.com/
codex mcp add clarity-mcp --url https://clarity.insightfulmcp.com/What agents can do
The server has 1 action (1 read, 0 write): query_dashboard, a natural-language dashboard query that runs against Microsoft Clarity.
- Traffic: sessions, bot sessions, distinct users and pages per session.
- Engagement: scroll depth, engagement time, popular pages, page titles and referrers.
- Friction signals: rage clicks, dead clicks, quick backs, excessive scrolling, script errors and error clicks.
- Breakdowns: browser, device, operating system, country or region, source, medium, campaign, channel and URL.
Before you connect
- A Microsoft Clarity project with data.
- A Data Export API token for that project. A Clarity project admin can generate it.
- An InsightfulPipe workspace with a brand for the project. Owners, admins and operators can add connections.
Connect Microsoft Clarity
- In the InsightfulPipe app, open Connectors, choose Microsoft Clarity and click Connect.
- In Clarity, go to Settings → Data Export → Generate new API token and copy the token.
- Enter a Connection Name and paste the token into API Token.
- Click Connect to Clarity.
Add the MCP server to your AI client
Server URL: https://clarity.insightfulmcp.com/ and server name: clarity-mcp.
- Claude: open Claude Connectors Settings, scroll to the bottom and click Add custom connector, paste the URL, click Add, then click Connect.
- ChatGPT: in ChatGPT Security Settings turn on Developer mode, click Create on the Connectors page, paste the URL, click Create, then click Connect. Turn the connector on in each new chat with + → More.
- Claude Code: run
claude mcp add --transport http clarity-mcp https://clarity.insightfulmcp.com/, then type/mcp, select clarity-mcp and click Authenticate. - Cursor: in the app, open MCP Servers, choose Microsoft Clarity and click Install Microsoft Clarity MCP, click Open Cursor then Install, then click Connect and Open.
- Gemini CLI: run
gemini mcp add --transport http clarity-mcp https://clarity.insightfulmcp.com/, then/mcp auth clarity-mcp. - Codex CLI: run
codex mcp add clarity-mcp --url https://clarity.insightfulmcp.com/; authorization starts automatically.
Each client opens a browser window where you log in to InsightfulPipe and click Authorize access. Step-by-step guides: Claude, ChatGPT, Claude Code, Cursor, Gemini CLI and Codex CLI. To reach every connected platform through one server, use the unified server.
Permissions and safety
- The server is read-only. There is no Read Only or Read + Write choice because it has no write actions, and it cannot change project settings, masking rules or tracking code.
- Owners, admins and operators can turn
query_dashboardon or off for each project in Configure actions for this account. Disabled actions are hidden from agents and blocked. - Members with the User role only reach projects granted to them.
- The token is stored encrypted, and your AI client never sees it. It signs in with your InsightfulPipe account.
Limits
- Microsoft documents these Data Export API limits: 10 requests per project per day, data from the last 1 to 3 days, and up to 3 dimensions per request. They apply to every request the connector makes.
- Session recordings and heatmaps are not included. Open them in Clarity after the agent points you to the pages worth reviewing.
- Each API token belongs to one project, so each project is a separate connection.
- Queries work best when they are simple, name one purpose and give a time range of 1 to 3 days.
Example prompts
- "How many sessions did we get in the last 3 days, by device?"
- "Which pages had the most rage clicks yesterday?"
- "Show dead clicks by browser for the last 3 days."
- "Which referrers sent the most sessions yesterday?"
Troubleshooting
- The token is rejected when you connect: generate a new token in Clarity under Settings → Data Export and paste it again, or ask a project admin to create one.
- Requests start failing after several questions: the project may have used Clarity's 10 requests for the day. Ask for fewer, broader breakdowns and try again the next day.
- No data for older dates: Clarity only returns the last 1 to 3 days. Use Google Analytics 4 for longer trends.
- "This action is disabled for this connected account. An owner or admin must enable it for the account.": an owner, administrator or operator can turn
query_dashboardback on in Configure actions for this account.
FAQ
Can the agent watch session recordings or show heatmaps?
No. The server answers dashboard questions only. Recordings and heatmaps stay in Microsoft Clarity.
Is this Microsoft's official Clarity MCP server?
No. Microsoft publishes its own open-source Clarity MCP server that you run locally. InsightfulPipe is a separate hosted server that queries Clarity with your project's API token, next to your other connected platforms.
Can I connect several Clarity projects?
Yes. Add a connection with each project's API token, and the agent can compare projects in one conversation. Each connection counts toward your plan's connection limit.