by microsoft
Fetch Microsoft Clarity analytics data via a Model Context Protocol server, supporting dimension filters, metric selection, and integration with Claude for Desktop or any MCP‑compatible client.
Provides a simple interface to query Microsoft Clarity’s data export API, allowing MCP clients to retrieve filtered analytics such as scroll depth, engagement time, and traffic metrics.
npm install -g @microsoft/clarity-mcp-server
or use npx @microsoft/clarity-mcp-server
.npx @microsoft/clarity-mcp-server --clarity_api_token=YOUR_TOKEN
.get-clarity-data
tool from the client, supplying numOfDays
, optional dimensions
, metrics
, and the token
if not passed on the command line.Q: Do I need a Microsoft account? A: Yes, you must have a Clarity project and generate an API token in the project’s Settings → Data Export.
Q: How far back can I retrieve data? A: Only the previous 1 to 3 days are available through the export API.
Q: What if I need more than 1,000 rows? A: The server does not support pagination; you must narrow dimensions or metrics to stay within the limit.
Q: Can I run the server without installing globally?
A: Absolutely – npx @microsoft/clarity-mcp-server
runs it directly without a global install.
Q: How do I integrate with Claude for Desktop?
A: Add the server configuration to claude_desktop_config.json
as shown in the README, then restart Claude.
This is a Model Context Protocol (MCP) server for the Microsoft Clarity data export API. It allows you to fetch analytics data from Clarity using Claude for Desktop or other MCP-compatible clients.
You can install and run this package directly using npm:
# Install globally
npm install -g @microsoft/clarity-mcp-server
# Run the server
clarity-mcp-server
You can run the server directly using npx without installing:
npx @microsoft/clarity-mcp-server
With either option, you can provide your Clarity API token using the --clarity_api_token
parameter:
npx @microsoft/clarity-mcp-server --clarity_api_token=your-token-here
npm install
npm run build
npm start
Click the button above to install the Microsoft Clarity MCP server directly in Visual Studio Code.
Install from Claude's extension gallery:
You can provide the Clarity data export API token in two ways:
Command Line Arguments:
npx @microsoft/clarity-mcp-server --clarity_api_token=your-token
Tool Parameters:
token
as a parameter when calling the get-clarity-data
toolMCP clients typically require configuration to connect to the server. Here's a general example of how to configure an MCP client:
{
"mcpServers": {
"@microsoft/clarity-mcp-server": {
"command": "npx",
"args": [
"@microsoft/clarity-mcp-server",
"--clarity_api_token=your-api-token-here"
]
}
}
}
The specifics of where and how to add this configuration will depend on your specific MCP client.
To configure Claude for Desktop to use this server:
Open your Claude for Desktop configuration file:
%AppData%\Claude\claude_desktop_config.json
~/Library/Application Support/Claude/claude_desktop_config.json
Add the configuration shown in the generic example above
Save the configuration file and restart Claude for Desktop
When using an MCP client with this server configured, you can ask it to fetch Clarity data. For example:
"Can you fetch my Clarity data for the last day, filtered by Browser and showing Traffic metrics?"
The MCP client will then prompt you to run the get-clarity-data
tool, which requires:
numOfDays
: Number of days to retrieve (1-3)dimensions
: Array of dimensions to filter by (optional)metrics
: Array of metrics to retrieve (optional)If you haven't configured your credentials via command-line arguments, you'll also need to provide:
token
: Your Clarity API tokenTo generate an API token:
MIT
Please log in to share your review and rating for this MCP.
{ "mcpServers": { "@microsoft/clarity-mcp-server": { "command": "npx", "args": [ "@microsoft/clarity-mcp-server" ], "env": { "CLARITY_API_TOKEN": "<YOUR_API_TOKEN>" } } } }
Discover more MCP servers with similar functionality and use cases
by mckinsey
Build high-quality data visualization apps quickly with low‑code configuration, leveraging Plotly, Dash, and Pydantic while allowing deep customisation through Python, JavaScript, HTML, and CSS.
by antvis
mcp-server-chart is a Model Context Protocol (MCP) server developed by AntV that generates over 25 types of visual charts. It provides robust chart generation and data analysis capabilities, integrating with various AI clients and platforms.
by reading-plus-ai
mcp-server-data-exploration is an MCP server designed for autonomous data exploration on CSV-based datasets. It acts as a personal Data Scientist assistant, providing intelligent insights with minimal effort.
by Canner
Wren Engine is a semantic engine designed for Model Context Protocol (MCP) clients and AI agents, enabling accurate and context-aware access to enterprise data.
by GongRzhe
A Model Context Protocol (MCP) server for generating various types of charts using QuickChart.io, enabling chart creation through MCP tools.
by ergut
mcp-bigquery-server is a Model Context Protocol (MCP) server that enables Large Language Models (LLMs) to securely and efficiently interact with Google BigQuery datasets. It acts as a translator, allowing LLMs to query and analyze data in BigQuery using natural language instead of SQL.
by isaacwasserman
Provides tools for saving data tables and generating Vega‑Lite visualizations via an MCP interface, supporting both textual specifications and PNG image output.
by surendranb
Google Analytics MCP Server is a Python-based tool that enables Large Language Models (LLMs) to access and analyze Google Analytics 4 (GA4) data using natural language, providing conversational querying of over 200 GA4 dimensions and metrics.
by tinybirdco
Provides a Model Context Protocol server implementation for Tinybird, allowing analytics agents to forward data to Tinybird's platform.