Microsoft Clarity MCP Server
Seamlessly connect your AI tools with Microsoft Clarity analytics to unlock actionable web insights, custom reports, and user engagement analysis—all accessible via the MCP protocol.

What does “Microsoft Clarity” MCP Server do?
The Microsoft Clarity MCP Server is a Model Context Protocol (MCP) server designed to interface with the Microsoft Clarity data export API. It acts as a bridge between AI assistants (such as Claude for Desktop and other MCP-compatible clients) and the Clarity analytics service. By exposing Clarity’s analytics data via a standard protocol, this server enables AI-driven workflows such as querying website analytics, filtering by specific dimensions (e.g., Browser, Device, Country/Region), and retrieving a variety of web metrics (e.g., Scroll Depth, Engagement Time, Traffic). This integration streamlines tasks like monitoring website performance and analyzing user engagement, empowering developers and analysts to access actionable insights directly through their AI tools.
List of Prompts
No explicit prompt templates are mentioned in the provided information.
List of Resources
No specific MCP “resources” are described in the repository content.
List of Tools
- get-clarity-data
Provides access to Clarity analytics data. Allows querying by specifying the number of days (1-3), selecting up to three dimensions (like Browser, Device, Country/Region), and choosing metrics (such as Scroll Depth, Engagement Time, Traffic). Requires a Clarity API token.
Use Cases of this MCP Server
- Website Analytics Retrieval
Instantly fetch key analytics data from Microsoft Clarity, such as user sessions, engagement, and scroll depth, to monitor website performance directly through your AI assistant. - Custom Analytics Filtering
Filter analytic results by up to three dimensions (e.g., device type, geographic region, browser) to focus on specific user segments for targeted analysis. - Automated Reporting
Generate and retrieve daily or multi-day analytics reports for a website, streamlining regular reporting tasks for product managers or analysts. - Integration with AI Workflows
Seamlessly incorporate website analytics into larger AI workflows, allowing agents to pull usage stats and inform decisions or trigger actions based on real-time data.
How to set it up
Windsurf
- Ensure Node.js v16 or higher is installed.
- Obtain your Microsoft Clarity API token.
- Open your Windsurf MCP configuration file.
- Add the Microsoft Clarity MCP Server configuration as shown below.
- Save the configuration and restart Windsurf.
{
"mcpServers": {
"@microsoft/clarity-mcp-server": {
"command": "npx",
"args": [
"@microsoft/clarity-mcp-server",
"--clarity_api_token=your-api-token-here"
]
}
}
}
Securing API Keys:
{
"mcpServers": {
"@microsoft/clarity-mcp-server": {
"command": "npx",
"args": [
"@microsoft/clarity-mcp-server"
],
"env": {
"CLARITY_API_TOKEN": "your-api-token-here"
}
}
}
}
Claude
- Install Node.js v16 or higher.
- Generate your Clarity API token.
- Open Claude for Desktop configuration:
- Windows:
%AppData%\Claude\claude_desktop_config.json
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
- Add the MCP server configuration.
- Save and restart Claude for Desktop.
{
"mcpServers": {
"@microsoft/clarity-mcp-server": {
"command": "npx",
"args": [
"@microsoft/clarity-mcp-server",
"--clarity_api_token=your-api-token-here"
]
}
}
}
Securing API Keys:
{
"mcpServers": {
"@microsoft/clarity-mcp-server": {
"command": "npx",
"args": [
"@microsoft/clarity-mcp-server"
],
"env": {
"CLARITY_API_TOKEN": "your-api-token-here"
}
}
}
}
Cursor
- Confirm Node.js v16+ is available.
- Get your Clarity API token from your Clarity dashboard.
- Locate Cursor’s MCP configuration.
- Add the server configuration as shown.
- Save changes and restart Cursor.
{
"mcpServers": {
"@microsoft/clarity-mcp-server": {
"command": "npx",
"args": [
"@microsoft/clarity-mcp-server",
"--clarity_api_token=your-api-token-here"
]
}
}
}
Securing API Keys:
{
"mcpServers": {
"@microsoft/clarity-mcp-server": {
"command": "npx",
"args": [
"@microsoft/clarity-mcp-server"
],
"env": {
"CLARITY_API_TOKEN": "your-api-token-here"
}
}
}
}
Cline
- Install Node.js v16 or higher.
- Obtain your API token from Clarity.
- Open your Cline MCP configuration file.
- Insert the following MCP server configuration.
- Save and restart Cline.
{
"mcpServers": {
"@microsoft/clarity-mcp-server": {
"command": "npx",
"args": [
"@microsoft/clarity-mcp-server",
"--clarity_api_token=your-api-token-here"
]
}
}
}
Securing API Keys:
{
"mcpServers": {
"@microsoft/clarity-mcp-server": {
"command": "npx",
"args": [
"@microsoft/clarity-mcp-server"
],
"env": {
"CLARITY_API_TOKEN": "your-api-token-here"
}
}
}
}
How to use this MCP inside flows
Using MCP in FlowHunt
To integrate MCP servers into your FlowHunt workflow, start by adding the MCP component to your flow and connecting it to your AI agent:

Click on the MCP component to open the configuration panel. In the system MCP configuration section, insert your MCP server details using this JSON format:
{
"clarity-mcp": {
"transport": "streamable_http",
"url": "https://yourmcpserver.example/pathtothemcp/url"
}
}
Once configured, the AI agent is now able to use this MCP as a tool with access to all its functions and capabilities. Remember to change “clarity-mcp” to whatever the actual name of your MCP server is (e.g., “clarity-mcp”) and replace the URL with your own MCP server URL.
Overview
Section | Availability | Details/Notes |
---|---|---|
Overview | ✅ | |
List of Prompts | ⛔ | None found |
List of Resources | ⛔ | None found |
List of Tools | ✅ | get-clarity-data |
Securing API Keys | ✅ | Env variable support shown |
Sampling Support (less important in evaluation) | ⛔ | Not mentioned |
Roots Support | ⛔ | Not mentioned |
Based on the above, the Microsoft Clarity MCP Server provides a clear and direct integration with the Clarity analytics API, but is focused and somewhat minimal in scope. It covers essential setup and usage, but lacks advanced MCP features like prompt templates, additional MCP resources, roots, and sampling.
MCP Score
Has a LICENSE | ✅ (MIT) |
---|---|
Has at least one tool | ✅ |
Number of Forks | 5 |
Number of Stars | 15 |
Our opinion:
This MCP server is functional, well-documented for setup, and exposes a useful tool for analytics integration. However, it misses richer MCP features like prompt templates, resource exposure, or advanced capabilities such as sampling and roots—making it more utilitarian than full-featured. It rates a 5/10 for covering the basics with clarity, but not leveraging the full MCP protocol potential.
Frequently asked questions
- What does the Microsoft Clarity MCP Server do?
It connects AI assistants with the Microsoft Clarity analytics API, enabling programmatic access to website metrics like traffic, engagement time, and scroll depth. This empowers AI-driven workflows with real-time website insights and reporting capabilities.
- What analytics metrics can I access through this MCP server?
You can access metrics such as Scroll Depth, Engagement Time, Traffic, and segment analytics by Browser, Device, Country/Region, and more—using the provided 'get-clarity-data' tool.
- How do I secure my Clarity API token when configuring the server?
You should use the 'env' property in your MCP server configuration to store sensitive API keys securely as environment variables, rather than embedding them directly in your configuration files.
- Can I use this MCP server in FlowHunt workflows?
Yes! Add the MCP component in your FlowHunt flow and configure it with your MCP server details. This lets your AI agents access all analytics tools exposed by the Clarity MCP server.
- Does the Microsoft Clarity MCP Server support prompt templates or advanced MCP features?
No, it focuses on analytics integration and does not include prompt templates, resource exposure, or advanced MCP features like roots or sampling.
Integrate Microsoft Clarity with Your AI Workflows
Empower your AI agents to access Microsoft Clarity analytics for advanced website monitoring, segmentation, and automated reporting with FlowHunt's MCP integration.