Microsoft Clarity has introduced the Microsoft Clarity MCP Server, a free AI-powered tool designed to enhance website analytics by enabling natural language queries. This new addition leverages the Model Context Protocol (MCP), which acts as an AI-aware bridge between local developer tools and external APIs, standardizing how AI systems connect to various data sources like web analytics.
What is MCP (Model Context Protocol)?
MCP allows intelligent AI assistants such as Claude to interact with services using structured commands, much like a universal connector (similar to USB-C) but for AI. This protocol enables seamless communication between AI tools and diverse data sources, making it easier to query and visualize analytics data naturally.
Features of the Microsoft Clarity MCP Server
- Supports natural language queries for analytics data.
- Filters data by dimensions such as Browser, OS, Country/Region, or Device.
- Retrieves key metrics including Scroll Depth, Engagement Time, and Total Traffic.
- Integrates with Claude for Desktop and other MCP-compatible clients.
- Designed to boost developer productivity and simplify data access.
Real-World Use Cases
Marketing Teams:
Marketers can quickly compare scroll depth across devices by asking AI queries like “Fetch scroll depth for the past 2 days filtered by device type.” For example, tablet users showed the highest scroll depth (62.67%), indicating deeper engagement, while mobile users had the lowest (32.35%), suggesting optimization opportunities.
Developers Diagnosing Web Issues:
Developers can analyze traffic and engagement time segmented by browser with simple prompts. Insights revealed Chrome dominates traffic, Edge users visit the most pages per session, Safari has the highest total engagement time, and some mobile browsers show full active engagement during sessions.
Installation and Setup
- Requires Node.js v16+, a Microsoft Clarity project with a Data Export API Token, and an MCP client like Claude for Desktop.
- Can be run on-the-fly using
npx
with the command:npx @microsoft/clarity-mcp-server --clarity_api_token=your-token-here
- API tokens are generated via the Clarity project settings under Data Export.
- Limits include 10 API requests per day, data for up to 3 days, and up to 3 dimensions per request.
Future Roadmap
Microsoft plans to enhance the MCP Server with:
- Higher API limits for more extensive data access.
- Predictive heatmaps generated from images or URLs.
- Deeper AI integration for contextual heatmap insights.
- Multi-project support for enterprise analytics teams.
- Expanded ecosystem support for more AI agents and MCP servers.
Conclusion
The Microsoft Clarity MCP Server represents a significant advancement in natural language analytics powered by AI. It offers easy setup, robust features, and seamless integration with AI tools like Claude, enabling teams to interact with web metrics more intuitively. This tool goes beyond traditional heatmaps and session recordings by connecting Clarity data to any intelligent agent, facilitating smarter, data-driven decisions.