Installation guide
How to install Microsoft Clarity MCP Server
In Claude, ChatGPT, Gemini, Microsoft Copilot, Perplexity, Cursor and Claude Code, with what to check before you start and the first prompts to run.
This is a local MCP server. It runs on your machine through Node.js, either with `npx @microsoft/clarity-mcp-server` or after a global npm install. It authenticates with a Clarity Data Export API token, passed as the `--clarity_api_token` argument. There is no remote URL or browser sign-in. The server is read-only: it queries dashboard metrics, lists session recordings and searches Clarity documentation.
Have a Clarity project admin, or someone with access to the project's Settings, generate the token under `Settings > Data Export`. Use a token named for the client or agency that will use it, and store it in a password manager. A developer or analyst comfortable with a terminal and client config files should do the install. Start with narrow read-only questions before wider use.

Before you start
Node.jsv16 or higher installed, withnpxavailable in your terminal- A Microsoft Clarity account with access to the project you want to query
- A Clarity Data Export API token, generated in your project under
Settings > Data Export > Generate new API token - An MCP-compatible client such as Claude for Desktop, Cursor or VS Code
- A safe place to store the token, since it sits in plain text in the client config
- How it runs
- Local, runs on your machine
- Access
- Read-only
- Server address
- Copy it from the vendor documentation
Microsoft Clarity MCP Server in Claude
- Generate a Data Export token in Clarity: open your project, then
Settings > Data Export > Generate new API token. Give it a descriptive name and copy it. - Open the config file. On macOS:
~/Library/Application Support/Claude/claude_desktop_config.json. On Windows:%AppData%\Claude\claude_desktop_config.json. - Add the
mcpServersentry shown below, replacingyour-api-token-herewith your token. - Save the file and fully restart Claude Desktop.
- Alternatively, the documentation says you can use
File > Settings > Extensions, search forMicrosoft Clarity, clickInstall, then set the API token as described in the docs. This applies to the Claude Desktop app only, not Claude.ai on the web. - Run a verification prompt from the list below.
{
"mcpServers": {
"@microsoft/clarity-mcp-server": {
"command": "npx",
"args": [
"@microsoft/clarity-mcp-server",
"--clarity_api_token=your-api-token-here"
]
}
}
}
Microsoft Clarity MCP Server in ChatGPT
- The documentation does not cover ChatGPT. This server is local (stdio via
npx) and has no remote URL, so ChatGPT connectors, which take a remote MCP URL in Developer mode, cannot reach it directly. - To use it you would need to host the server behind a remote MCP endpoint yourself. That setup is not described in the vendor documentation, so check the vendor docs and OpenAI's current connector requirements first.
- If you only need Clarity data in a chat, use a client with local MCP support, such as Claude Desktop, Cursor or Claude Code.
- Keep the Clarity token out of shared or public endpoints.
Microsoft Clarity MCP Server in Gemini
- The documentation does not cover Gemini. Gemini CLI supports local servers through
mcpServersin its settings file, so the generic entry from the docs should apply. - Open your Gemini CLI settings
JSONfile. Take its exact location from the Gemini CLI documentation. - Add the
mcpServersentry below with your Clarity token in place of the placeholder. - Save the file and restart Gemini CLI.
- Run a verification prompt. The Gemini app extensions are not covered by the docs for this server.
{
"mcpServers": {
"@microsoft/clarity-mcp-server": {
"command": "npx",
"args": [
"@microsoft/clarity-mcp-server",
"--clarity_api_token=your-api-token-here"
]
}
}
}
Microsoft Clarity MCP Server in Microsoft Copilot
- The documentation mentions a Visual Studio Code install button in the
README. Use it if you want the vendor's default VS Code install, then enter your token as prompted. - For a manual setup, create
.vscode/mcp.jsonin your workspace. VS Code uses a top-levelserversobject. - Add the entry below with your Clarity token in place of the placeholder. Avoid committing this file with a real token.
- Start the server from the MCP controls in VS Code and use it in Copilot Chat agent mode.
- Microsoft Copilot Studio is not covered by the docs. It would need a remote MCP endpoint, which this local server does not provide.
{
"servers": {
"clarity": {
"command": "npx",
"args": [
"@microsoft/clarity-mcp-server",
"--clarity_api_token=your-api-token-here"
]
}
}
}
Microsoft Clarity MCP Server in Perplexity
- The documentation does not cover Perplexity.
- Perplexity desktop app connectors generally expect a supported connector setup. Check the Perplexity documentation for whether local command-based MCP servers are supported in your version.
- If local servers are supported, add a server with the command
npxand the arguments@microsoft/clarity-mcp-serverand--clarity_api_token=your-api-token-here. - If not, use a client documented for local servers, such as Claude Desktop, Cursor or Claude Code.
Microsoft Clarity MCP Server in Cursor
- Generate your Clarity Data Export token as described in the prerequisites.
- Open Cursor's MCP settings and edit the MCP config
JSON. The docs do not cover Cursor, so confirm the file location in Cursor's documentation. - Add the generic
mcpServersentry below with your token. - Save the file and confirm the server shows as enabled in the MCP settings, restarting Cursor if it does not appear.
- Run a verification prompt.
{
"mcpServers": {
"@microsoft/clarity-mcp-server": {
"command": "npx",
"args": [
"@microsoft/clarity-mcp-server",
"--clarity_api_token=your-api-token-here"
]
}
}
}
Microsoft Clarity MCP Server in Claude Code
- Generate your Clarity Data Export token in
Settings > Data Export. - Run the
claude mcp addcommand below in your terminal, with your token in place of the placeholder. The docs do not show this command, but it follows the standard Claude Code format for local servers using the documentednpxinvocation. - Run
claude mcp listto confirm the server is registered. - Start
claudeand ask a narrow read-only question about your Clarity project.
claude mcp add clarity -- npx @microsoft/clarity-mcp-server --clarity_api_token=your-api-token-hereCheck that it works
Start with questions that only read data. If these answer from your real account, the connection is good.
- What are the most used browsers in my Clarity project?
- Show me traffic metrics from my Clarity project for the last week.
- List the most recent Clarity sessions from mobile devices.
Troubleshooting
+The server does not appear in my client after editing the config. What should I check?
Confirm the JSON is valid and the file is in the right location for your client. For Claude Desktop, fully quit and restart the app. Check that `node` and `npx` run in a terminal and that Node.js is v16 or higher. Then run `npx @microsoft/clarity-mcp-server` by hand to see errors.
+Queries return authentication or empty-data errors. Is the token wrong?
Check that the token was generated under `Settings > Data Export` in the correct Clarity project and was copied in full with no extra spaces. The documentation also allows passing the token as a parameter to the `get-clarity-data` tool. If the problem persists, generate a new token and update the config.
+The tool names in my client differ from the documentation. Is something broken?
Probably not. The documentation is slightly inconsistent about tool names. The README lists `query-analytics-dashboard`, `list-session-recordings` and `query-documentation-resources`, but also mentions `get-clarity-data`. Use plain-language prompts, keep each request to one topic, and check the tool list your client shows. No rate limits are documented beyond the Data Export API's own.
Written Nov 9, 2026 from the vendor documentation. Exact menus, addresses and commands change; the official documentation is the source of truth.
Questions and answers
Questions readers and searchers ask about installing Microsoft Clarity MCP Server, answered by the site editor from the vendor documentation, plus reader experience. Every comment is reviewed before it appears.