Microsoft Clarity for free heatmaps and session recordings.
## Clarity MCP Server: Microsoft Analytics The **Clarity MCP Server** integrates Microsoft Clarity's free analytics platform into Google Antigravity. This enables session recordings, heatmaps, and user behavior insights with no traffic limits. ### Why Clarity MCP? Clarity offers free powerful analytics: - **Completely Free**: No traffic limits - **Session Recordings**: Watch user sessions - **Heatmaps**: Visualize clicks and scrolls - **Insights Dashboard**: AI-powered insights - **Privacy Focused**: GDPR compliant ### Key Features #### 1. Get Insights ```python import requests headers = {"Authorization": f"Bearer {api_token}"} # Get project insights response = requests.get( "https://www.clarity.ms/api/v1/projects/{project_id}/insights", headers=headers, params={"from": "2024-01-01", "to": "2024-03-01"} ) insights = response.json() print(f"Sessions: {insights['total_sessions']}") print(f"Dead clicks: {insights['dead_clicks']}") print(f"Rage clicks: {insights['rage_clicks']}") ``` #### 2. Session Data ```python # Get session recordings response = requests.get( "https://www.clarity.ms/api/v1/projects/{project_id}/sessions", headers=headers, params={"limit": 50, "hasRageClicks": True} ) for session in response.json()["sessions"]: print(f"Session: {session['id']}") print(f"Duration: {session['duration']}s") print(f"Pages: {session['pageCount']}") ``` #### 3. Heatmap Data ```python # Get heatmap for page response = requests.get( "https://www.clarity.ms/api/v1/projects/{project_id}/heatmaps", headers=headers, params={"url": "https://example.com/pricing"} ) heatmap = response.json() print(f"Click count: {heatmap['clickCount']}") ``` ### Configuration ```json { "mcpServers": { "clarity": { "command": "npx", "args": ["-y", "@anthropic/mcp-clarity"], "env": { "CLARITY_PROJECT_ID": "your-project-id", "CLARITY_API_TOKEN": "your-token" } } } } ``` ### Use Cases **UX Analysis**: Watch user behavior patterns. **Conversion Optimization**: Find friction points. **Free Analytics**: Unlimited session recordings. The Clarity MCP Server brings free behavior analytics to Antigravity.
{
"mcpServers": {
"clarity": {}
}
}