Clarity MCP Server
MCP server by microsoft Verified · npm:@microsoft
Connects Microsoft Clarity analytics, session recordings, AI Visibility insights and documentation to MCP clients such as Visual Studio Code and Claude Desktop. Built for Clarity users who want to query their project data in plain English.
Install Clarity MCP Server
Built from the published package, never by AI.
claude mcp add clarity-mcp-server -- npx -y @microsoft/clarity-mcp-serverRun in your terminal. Add --scope user to use it in every project.
{
"mcpServers": {
"clarity-mcp-server": {
"args": [
"-y",
"@microsoft/clarity-mcp-server"
],
"command": "npx"
}
}
}Settings, Developer, Edit config. Paste into claude_desktop_config.json and restart.
{
"mcpServers": {
"clarity-mcp-server": {
"args": [
"-y",
"@microsoft/clarity-mcp-server"
],
"command": "npx"
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project).
{
"servers": {
"clarity-mcp-server": {
"args": [
"-y",
"@microsoft/clarity-mcp-server"
],
"command": "npx"
}
}
}Add to .vscode/mcp.json. VS Code uses "servers", not "mcpServers".
codex mcp add clarity-mcp-server -- npx -y @microsoft/clarity-mcp-server{
"mcpServers": {
"clarity-mcp-server": {
"args": [
"-y",
"@microsoft/clarity-mcp-server"
],
"command": "npx"
}
}
}Add to ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (this project).
gemini mcp add clarity-mcp-server npx -y @microsoft/clarity-mcp-serverGemini CLI was replaced by Antigravity CLI in June 2026 and remains only for enterprise licences and paid API keys.
MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the clarity-mcp-server block.
About
Clarity MCP Server is an official MCP server from Microsoft that connects Microsoft Clarity to Visual Studio Code, Claude Desktop, and other MCP-compatible clients. It lets users ask questions in plain English to query analytics data, session recordings, AI Visibility citations, bot activity, topic insights, and Clarity documentation. Results can be filtered by dimensions such as browser, device and country.
The server is started with npx using the package @microsoft/clarity-mcp-server, installed globally with npm, or built manually from the repository. After the server starts, the user signs in to Microsoft Clarity in the browser and selects a default project. The source says it is intended for users with admin or member access to at least one Clarity project, and it requires Node.js v16 or higher.
Written from the project's README and checked against it.
Tools it gives your assistant
query-analytics-dashboardRetrieves analytics data and metrics from a project's dashboard using a natural language query.list-session-recordingsLists session recordings filtered by fields such as URL, device, browser, OS and country.get-citation-overviewRetrieves AI Visibility citation metrics and AI referred traffic for the verified domain.list-citation-queriesLists AI queries that cite the verified domain.list-top-cited-pagesLists the top pages cited by AI for the verified domain.get-bot-activity-overviewRetrieves read-only Bot Activity analytics for AI requests and crawlers. Requires a connected CDN.list-ai-crawlersLists AI crawlers that requested the site, as part of Bot Activity analytics.list-topic-insightsLists topics tracked in AI Visibility Topic Insights for the project.get-topic-insight-reportRetrieves a topic report with citation rate, competitive share and content opportunities.query-documentation-resourcesRetrieves snippets from Microsoft Clarity documentation to answer user questions.
What you need
- Node.js v16 or higher
- A Microsoft Clarity account with admin or member access to at least one project
- An MCP-compatible client such as Visual Studio Code or Claude Desktop
- A verified domain in Clarity for AI Visibility features
- A CDN connected to the project in Clarity for Bot Activity data
Try asking
- How many Clarity sessions did we get in the past 7 days?
- List the most recent Clarity sessions from mobile devices.
- Which AI crawlers requested my site most often in the last 7 days?
Good to know
- Creating, regenerating and deleting Topic Insights requires OAuth sign-in and sufficient project permissions.
- Topic deletion must be confirmed before it runs.
- Bot Activity tools require a CDN connected to the project in Clarity.
- Data Export API token authentication is being deprecated in favor of OAuth sign-in.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: README.md, package.json. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to Clarity MCP Server
All alternatives →World Monitor is a real-time global intelligence dashboard covering conflict, markets, energy, trade, shipping and cyber. Its MCP server gives AI assistants access to that data, and it is aimed at analysts, agents and scripts.
Lets AI agents create and change Power BI semantic models through a local MCP server. Built for developers who want natural language modeling in Power BI Desktop, Fabric workspaces and PBIP files.
Seal Open Data serves French public datasets from data.gouv.fr to AI assistants. It covers topics such as territories, companies, housing and population. It is aimed at users who want to query French open data from clients like Claude.
OpenMetadata MCP server lets MCP-compatible assistants search metadata, inspect lineage, and manage data quality tests. It is for data teams and AI agents that need governed context about enterprise data.
Compiles, validates and renders semantic chart specs for AI assistants through the Model Context Protocol. It is for agents that need reliable, good-looking and interactive charts across several chart libraries.
Query PostHog analytics, manage feature flags and experiments, and investigate errors from your AI assistant. It suits product teams and developers who already use PostHog for analytics, replays, and error tracking.
Compare with World Monitor, Power BI Authoring MCP Server (Local) or Seal Open Data
Clarity MCP Server: common questions
Does Clarity MCP Server need a Clarity API token?
The source says Data Export API token authentication is being deprecated. The server now uses OAuth sign-in with a Microsoft Clarity account.
What kind of Clarity data can the server query?
The source lists analytics data, session recordings, AI Visibility citations, bot activity, topic insights and Clarity documentation.
Who can use this server?
The source says users need an admin or member role on at least one Clarity project, along with Node.js v16 or higher and an MCP-compatible client.
How do I install Clarity MCP Server?
In Claude Code run claude mcp add clarity-mcp-server -- npx -y @microsoft/clarity-mcp-server. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.
Is Clarity MCP Server the official server?
Clarity MCP Server is published by npm:@microsoft from its verified domain in the official MCP Registry.
Is Clarity MCP Server free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is Clarity MCP Server safe to use?
It scores 90 of 100. Grades: maintenance A, licence A, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to Clarity MCP Server?
Similar MCP servers: World Monitor, Power BI Authoring MCP Server (Local), Seal Open Data, OpenMetadata.
Does Clarity MCP Server work with ChatGPT?
Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.
