# Microsoft Clarity — how to use (mcp.ai)

Connect your Microsoft Clarity account and use 1 tools for analytics straight from your AI agent. Connect with your own API key. Microsoft Clarity is a free user behavior analytics tool that captures heatmaps, session recordings, and engagement metrics to help improve website experiences.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_microsoft_clarity?ms=1787291340000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `microsoft_clarity_data_export`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/microsoft_clarity`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/microsoft_clarity/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/microsoft_clarity/data/export` — Export data from Microsoft Clarity.
  - body: { numOfDays: integer, dimension1?: string, dimension2?: string, dimension3?: string }

## Example prompts
- "What can I do in Microsoft Clarity?"
- "Show me a summary of my Microsoft Clarity account"

## More
- Page: https://mcp.ai/microsoft_clarity
- Agent spec (llms.txt): https://mcp.ai/microsoft_clarity/llms.txt
- Postman collection: https://mcp.ai/microsoft_clarity/postman.json
