clarity-mcp-server

v3.0.0
@microsoft/clarity-mcp-server Checked 3 hours ago Published 14 days ago

The official MCP server for Microsoft Clarity

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

query-analytics-dashboard

Fetch Microsoft Clarity analytics data using a simplified natural language search query. The query should be focused on one specific data retrieval or aggregation task. Avoid complex multi-purpose queries. Time ranges should be explicitly specified when possible. If no time range is provided, prompt the user to specify one. Do NOT use this tool for AI bot, crawler, or crawling-activity questions (which bots or AI crawlers accessed the site, crawled paths, content or page types, HTTP status codes, robots.txt violations, or scrape-to-referral) - use the dedicated Bot Activity tools for those ins…

ParameterTypeDescription
query *stringA natural language search query string for filtering and shaping analytics data. The query should be specific and include temporal constraints when available. (e.g., 'Top browsers last 3 days', 'The a…
projectIdstringOptional id of the Clarity project to query, as returned by list-projects. Omit to query the selected project. To compare several projects, call this tool once per project with its id. Passing it does…

list-session-recordings

List Microsoft Clarity session recordings based on specified filters. The filters allow you to narrow down the recordings by various criteria such as URLs, device types, browser, OS, country, city, and more. The date filter is required and must be in UTC ISO 8601 format.

get-citation-overview

Get an AI Visibility citations overview for the Clarity project, including citation counts, share of authority, branded and non-branded citation shares, AI referred traffic, topic availability, and data freshness. Supports date, query type, query, query topic, and cited-page filters.

ParameterTypeDescription
filtersobject
projectIdstringOptional id of the Clarity project to query, as returned by list-projects. Omit to query the selected project. To compare several projects, call this tool once per project with its id. Passing it does…

list-citation-queries

List the AI queries that cite the Clarity project's verified domain, ranked by citation count. Returns query topic, citation count, share of authority, and branded status. Supports citation filters and pagination.

ParameterTypeDescription
filtersobject
limitintegerNumber of rows to return, at most 100.
projectIdstringOptional id of the Clarity project to query, as returned by list-projects. Omit to query the selected project. To compare several projects, call this tool once per project with its id. Passing it does…
skipintegerNumber of matching rows to skip.

list-citation-topics

List AI query topics that cite the Clarity project's verified domain, ranked by citation count. Returns citation count and share of authority. Supports citation filters and pagination.

ParameterTypeDescription
filtersobject
limitintegerNumber of rows to return, at most 100.
projectIdstringOptional id of the Clarity project to query, as returned by list-projects. Omit to query the selected project. To compare several projects, call this tool once per project with its id. Passing it does…
skipintegerNumber of matching rows to skip.

list-top-cited-pages

List pages from the Clarity project's verified domain that were cited in AI answers, ranked by citation count. Supports citation filters and pagination.

ParameterTypeDescription
filtersobject
limitintegerNumber of rows to return, at most 100.
projectIdstringOptional id of the Clarity project to query, as returned by list-projects. Omit to query the selected project. To compare several projects, call this tool once per project with its id. Passing it does…
skipintegerNumber of matching rows to skip.

get-bot-activity-overview

Get Bot Activity (also called Crawling Activity or AI crawler activity) summary metrics for the Clarity project. Use this and the other Bot Activity tools - not the analytics dashboard tool - for any question about AI bots, crawlers, crawling activity, or bot traffic. Returns raw counts plus the percentages shown on the dashboard cards: shareOfTotalTrafficPercent (scoped vs all-traffic requests), uniqueHtmlPathsSharePercent (scoped vs all-traffic unique HTML paths), and violationsSharePercent (robots.txt violations vs scoped requests). Also returns selectedCdnProvider and cdnProviders with the…

ParameterTypeDescription
filtersobject
projectIdstringOptional id of the Clarity project to query, as returned by list-projects. Omit to query the selected project. To compare several projects, call this tool once per project with its id. Passing it does…

list-ai-crawlers

List AI crawlers and their request counts for the Clarity project. Supports Bot Activity filters plus labelColumn and itemColumn grouping.

ParameterTypeDescription
itemColumn *stringColumn used to break each top-level row into nested items.
labelColumn *stringColumn used to group crawlers into top-level rows.
filtersobject
isSortAscendingbooleanSort ascending by request count instead of descending.
limitintegerNumber of rows to return, at most 100.
projectIdstringOptional id of the Clarity project to query, as returned by list-projects. Omit to query the selected project. To compare several projects, call this tool once per project with its id. Passing it does…
skipintegerNumber of matching rows to skip.

list-bot-path-requests

List the paths requested by AI bots for the Clarity project, ranked by request count. Each row includes count and its percent share. Supports Bot Activity filters, pagination, sorting, and optional content-type grouping.

ParameterTypeDescription
filtersobject
groupByContentTypebooleanGroup the returned paths by response content type.
isAscendingbooleanSort ascending by request count instead of descending.
limitintegerNumber of rows to return, at most 100.
projectIdstringOptional id of the Clarity project to query, as returned by list-projects. Omit to query the selected project. To compare several projects, call this tool once per project with its id. Passing it does…
skipintegerNumber of matching rows to skip.

get-bot-activity-distribution

Get a Bot Activity distribution for one dimension: content type, page type, or HTTP status code. Each entry includes count and its percent share of the distribution total. Supports all Bot Activity filters.

ParameterTypeDescription
dimension *stringDimension to break the bot requests down by.
filtersobject
projectIdstringOptional id of the Clarity project to query, as returned by list-projects. Omit to query the selected project. To compare several projects, call this tool once per project with its id. Passing it does…

get-scrape-to-referral-ratio

Get the scrape-to-referral ratio for the Clarity project: how many AI scrapes each operator performed for every visit it referred back. Returns per-provider ratios, referrer breakdowns, the domains covered by CDN logs and by the Clarity tag, and a coverage state explaining any gap. Requires a date filter.

ParameterTypeDescription
filters *object
projectIdstringOptional id of the Clarity project to query, as returned by list-projects. Omit to query the selected project. To compare several projects, call this tool once per project with its id. Passing it does…

list-connected-cdn-providers

List the CDN providers connected to the Clarity project, with each provider's connection status and the domain its bot logs cover. Use this to explain missing Bot Activity data before analyzing crawl coverage.

ParameterTypeDescription
filtersobject
projectIdstringOptional id of the Clarity project to query, as returned by list-projects. Omit to query the selected project. To compare several projects, call this tool once per project with its id. Passing it does…

get-topic-insight-constraints

Get the current validation rules for Topic Insights: the maximum topic name length, the allowed range of questions per topic, the allowed question length, the maximum number of reports a project can generate in a 7-day window, and the per-topic regeneration cooldown in days. Call this before create-topic-insight-report or regenerate-topic-insight-report and state the rules to the user before collecting their input, so their topic and questions satisfy the rules on the first try. Requires a verified AI Visibility domain.

ParameterTypeDescription
projectIdstringOptional id of the Clarity project to query, as returned by list-projects. Omit to query the selected project. To compare several projects, call this tool once per project with its id. Passing it does…

list-topic-insights

List the Topic Insight (AI Economy simulation) topics for the Clarity project. Returns two groups matching the dashboard: topics (the user's own topics - approved or already generated) and suggestedTopics (auto-generated topic suggestions the user has not adopted yet). Each entry has topicId, topicName, userApproved, questions, and its generated reports (runId, status, citationRate, competitiveShare). Also returns reportsMetadata (canGenerate and the number of reports generated in the current window). Treat suggestedTopics as suggestions, not the user's active topics, unless they ask about sug…

ParameterTypeDescription
projectIdstringOptional id of the Clarity project to query, as returned by list-projects. Omit to query the selected project. To compare several projects, call this tool once per project with its id. Passing it does…

get-topic-insight-report

Get a completed Topic Insight report for one topic (topicId required, runId optional for a specific run; omitted selects the latest completed run). Returns the resolved runId, status, dataReady, simulation metrics (citation rate, competitive share, answer/citation counts), per-domain ranking, content strengths/opportunities, and simulated questions. In-progress runs cannot be read as final reports. If dataReady=false, wait for ingestion and do not interpret metrics. Requires a verified AI Visibility domain.

ParameterTypeDescription
topicId *stringThe topic to fetch the report for - use a topicId from list-topic-insights.
projectIdstringOptional id of the Clarity project to query, as returned by list-projects. Omit to query the selected project. To compare several projects, call this tool once per project with its id. Passing it does…
runIdstringA specific generation run. Omit to use the topic's latest completed run.

get-topic-insight-status

Get the generation status for one or more Topic Insight runs (runIds required). Returns each run's status, progress percentage, and - once completed - its citation rate and competitive share. Poll this after create-topic-insight-report or regenerate-topic-insight-report until the status is Completed, then call get-topic-insight-report.

ParameterTypeDescription
runIds *arrayBetween 1 and 100 run ids returned by create-topic-insight-report or regenerate-topic-insight-report to check generation status for.
projectIdstringOptional id of the Clarity project to query, as returned by list-projects. Omit to query the selected project. To compare several projects, call this tool once per project with its id. Passing it does…

create-topic-insight-report

Create a new Topic Insight topic and start generating its report. Call get-topic-insight-constraints first and state its rules to the user before collecting the topic name and questions. Returns the topicId and the generation runId to poll with get-topic-insight-status. If the project has hit its weekly report limit or the topic's cooldown, the response has generated=false with a reason to relay to the user. To refresh an existing topic use regenerate-topic-insight-report instead. Requires a verified AI Visibility domain.

ParameterTypeDescription
questions *arrayBetween 10 and 15 real questions users might ask AI assistants about this topic.
topicName *stringName of the topic to analyze.
projectIdstringOptional id of the Clarity project to query, as returned by list-projects. Omit to query the selected project. To compare several projects, call this tool once per project with its id. Passing it does…

regenerate-topic-insight-report

Regenerate the report for an existing Topic Insight topic (topicId and topicName required). Returns the new generation runId to poll with get-topic-insight-status. If the topic is within its 7-day cooldown or the project hit its weekly limit, the response has generated=false with a reason to relay to the user. Requires a verified AI Visibility domain.

ParameterTypeDescription
topicId *stringThe existing topic to regenerate - use a topicId from list-topic-insights.
topicName *stringThe topic's name.
projectIdstringOptional id of the Clarity project to query, as returned by list-projects. Omit to query the selected project. To compare several projects, call this tool once per project with its id. Passing it does…

delete-topic-insight

Delete a Topic Insight topic and its reports (topicId required). This is destructive and cannot be undone - confirm with the user before calling. Requires a verified AI Visibility domain.

ParameterTypeDescription
topicId *stringThe topic to delete - use a topicId from list-topic-insights.
projectIdstringOptional id of the Clarity project to query, as returned by list-projects. Omit to query the selected project. To compare several projects, call this tool once per project with its id. Passing it does…

list-projects

List the Microsoft Clarity projects the signed-in user can access as an admin or member, with each project's id, name and hostname, and which one is selected. Each API request is restricted by the user's permissions for that project; being listed does not grant every action. The list is reused for a few minutes; pass refresh: true to re-read it, e.g. after the user gains access to a new project. Requires a Clarity sign-in: not available with a Data Export API token, which is tied to a single project.

ParameterTypeDescription
refreshbooleanRe-read the projects from Clarity instead of reusing the recent list, e.g. after the user gained or lost access to a project.

select-project

Select the user's default Microsoft Clarity project: the one the Clarity data tools (such as query-analytics-dashboard and list-session-recordings) query when no projectId is passed. The choice is remembered for this sign-in until another one is selected. Call it when the user chooses a default project or asks to switch their default; to query or compare other projects without changing the default, pass projectId to those tools instead. Take the project id from list-projects. Not used with a Data Export API token, which is tied to one project.

ParameterTypeDescription
projectId *stringThe id of the project to query, as returned by list-projects.

query-documentation-resources

Retrieve Microsoft Clarity documentation snippets for finding answers to user questions including step-by-step screenshots for setup guides, features, usage, troubleshooting, and integration instructions. The query should be focused on one specific documentation topic or question. Avoid complex multi-purpose queries.

ParameterTypeDescription
query *stringA natural language search query string for filtering and shaping analytics data. The query should be specific and include temporal constraints when available. (e.g., 'Top browsers last 3 days', 'The a…

login

Sign in to Microsoft Clarity with the user's Clarity account. Opens the Clarity sign-in and consent page in the browser and returns its URL so it can be shown to the user if the browser does not open. Returns immediately; call login-status right away and repeat while loginPending is true, without asking the user to confirm completion. The server automatically receives the authorization code and exchanges tokens when the browser redirects. Project requests are restricted by the user's admin or member permissions for each project. Recommended instead of using a Data Export API token, especially…

login-status

Show whether the user is signed in to Microsoft Clarity, accessible projects, the selected project, and the active credentials. While browser sign-in is pending, waits up to 10 seconds for completion or failure. Call immediately after login and repeat while loginPending is true without asking for user confirmation. Report lastLoginError and stop on failure. Project requests are restricted by the user's admin or member permissions for each project, not OAuth scopes.

logout

Sign out of Microsoft Clarity: ends the sign-in on the Clarity service and removes it from this machine. Does not affect a configured Data Export API token.