microsoft/clarity-mcp-server
A Model Context Protocol (MCP) server for Microsoft Clarity
e334a9bc0be5@microsoft/clarity-mcp-server3.0.0 in package.jsonPaths from tool input into commands, SQL, files and URLs
How much power the tools give an agent over the machine
Hidden instructions and poisoning in text for the model
Known vulnerabilities in the packages the server uses
How the server reads credentials and where they can go
Whether the tools do only what their descriptions say
How far the analysis went
Code Safety, Capability Exposure and Behavior Transparency are not analysed and have no number.
- Code Safety and Capability Exposure: no tool's code could be followed from its input
- Behavior Transparency: no tool description could be read to compare with the code
- Supply Chain: the dependency files state no exact versions the scanner could check, so it has no number
Top risks in plain words
- INFOThe scanner could not follow the code of any tool here, so an empty list says little about the server. Code findings appear only after a person has verified them.
How to use it safely
Practical steps from what we found in this server. They lower the risk; they do not replace a review of the code.
- Keep confirmations on
Leave your MCP client's confirmation prompt on for tools that change files, run commands or send data.
What its tools can do on your machine
The server offers 30 tools. When an AI agent calls them, this is what their code can do on the machine where the server runs, as traced in the source. Tools that call code the scanner could not follow may do more.
The code of the tools could not be followed, so what they can reach is not known.
Where its requests and secrets go
Read from the names along each tool's calls, not from a run: what the code says, not every address it may reach at run time.
The literal addresses the tools' requests name.
- None: no request names a fixed host.
Constants or settings that start an address; the value comes from configuration.
- None seen.
Credential-like environment variables. Give the server a key with the least access it needs.
- None: no credential-like variable is read by the tools.
Text it brings in from outside
No tool was seen returning text from outside the server to the model.
Tool annotations
No tool declares MCP annotations (readOnlyHint, destructiveHint and the rest). Clients use them to decide what to confirm; directories such as Anthropic's and OpenAI's ask for them.
Tools, prompts and resources (30: 30 tools)
Open a row for its full description. Chips show what its code can reach, and which risky capability its own description declares.
create-topic-insight-reporttool
No description.
delete-topic-insighttool 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 ver
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.
get-ai-crawler-trendstool
No description.
get-bot-activity-distributiontool 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 distribu
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.
get-bot-activity-item-trendstool
No description.
get-bot-activity-metric-trendstool Get Bot Activity trends over time for whole-project metrics: total AI requests, unique site pages crawled, or robots.txt violations. Returns one dated series wh
Get Bot Activity trends over time for whole-project metrics: total AI requests, unique site pages crawled, or robots.txt violations. Returns one dated series where value is the filtered metric, totalValue is the comparable unfiltered total, and percent is value as a share of totalValue. Does not take selected items. The bucket size follows the date range, as in the dashboard.
get-bot-activity-overviewtool 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
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 their connection status and last data timestamps. Does not require a verified AI Visibility domain. Unless overridden, results are scoped to the selected default CDN provider and to the domains covered by both the CDN logs and the Clarity tag.
get-citation-item-trendstool
No description.
get-citation-metric-trendstool Get AI Visibility citation trends over time for whole-project metrics: total citations or share of authority. Returns one series of dated values. Does not take
Get AI Visibility citation trends over time for whole-project metrics: total citations or share of authority. Returns one series of dated values. Does not take selected items.
get-citation-overviewtool Get an AI Visibility citations overview for the Clarity project, including citation counts, share of authority, branded and non-branded citation shares, AI refe
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.
get-scrape-to-referral-ratiotool 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 rat
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.
get-topic-insight-constraintstool
No description.
get-topic-insight-reporttool 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
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.
get-topic-insight-statustool
No description.
list-ai-crawlerstool List AI crawlers and their request counts for the Clarity project. Supports Bot Activity filters plus labelColumn and itemColumn grouping.
List AI crawlers and their request counts for the Clarity project. Supports Bot Activity filters plus labelColumn and itemColumn grouping.
list-bot-path-requeststool 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 filte
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.
list-citation-queriestool 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 bran
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.
list-citation-topicstool 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
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.
list-connected-cdn-providerstool 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 B
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.
list-projectstool 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. E
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.
list-session-recordingstool List Microsoft Clarity session recordings based on specified filters. The filters allow you to narrow down the recordings by various criteria such as URLs, devi
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.
list-top-cited-pagestool List pages from the Clarity project's verified domain that were cited in AI answers, ranked by citation count. Supports citation filters and pagination.
List pages from the Clarity project's verified domain that were cited in AI answers, ranked by citation count. Supports citation filters and pagination.
list-topic-insightstool List the Topic Insight (AI Economy simulation) topics for the Clarity project. Returns two groups matching the dashboard: topics (the user's own topics - approv
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 suggestions. Requires a verified AI Visibility domain.
logintool
No description.
login-statustool 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
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.
logouttool 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.
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.
query-analytics-dashboardtool Fetch Microsoft Clarity analytics data using a simplified natural language search query. The query should be focused on one specific data retrieval or aggregati
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 instead.
query-documentation-resourcestool Retrieve Microsoft Clarity documentation snippets for finding answers to user questions including step-by-step screenshots for setup guides, features, usage, tr
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.
regenerate-topic-insight-reporttool
No description.
select-projecttool
No description.
Text the model reads (30)
Every tool, prompt and resource description as written in the code: the model sees all of it, the user usually does not.
query-analytics-dashboard tool
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 instead.
login tool
login-status tool
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 tool
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.
get-bot-activity-overview tool
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 their connection status and last data timestamps. Does not require a verified AI Visibility domain. Unless overridden, results are scoped to the selected default CDN provider and to the domains covered by both the CDN logs and the Clarity tag.
list-ai-crawlers tool
List AI crawlers and their request counts for the Clarity project. Supports Bot Activity filters plus labelColumn and itemColumn grouping.
list-bot-path-requests tool
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.
get-bot-activity-distribution tool
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.
get-bot-activity-metric-trends tool
Get Bot Activity trends over time for whole-project metrics: total AI requests, unique site pages crawled, or robots.txt violations. Returns one dated series where value is the filtered metric, totalValue is the comparable unfiltered total, and percent is value as a share of totalValue. Does not take selected items. The bucket size follows the date range, as in the dashboard.
get-bot-activity-item-trends tool
get-ai-crawler-trends tool
get-scrape-to-referral-ratio tool
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.
list-connected-cdn-providers tool
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.
get-citation-overview tool
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.
list-citation-queries tool
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.
list-citation-topics tool
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.
list-top-cited-pages tool
List pages from the Clarity project's verified domain that were cited in AI answers, ranked by citation count. Supports citation filters and pagination.
get-citation-metric-trends tool
Get AI Visibility citation trends over time for whole-project metrics: total citations or share of authority. Returns one series of dated values. Does not take selected items.
get-citation-item-trends tool
query-documentation-resources tool
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.
list-projects tool
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.
select-project tool
list-session-recordings tool
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-topic-insight-constraints tool
list-topic-insights tool
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 suggestions. Requires a verified AI Visibility domain.
get-topic-insight-report tool
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.
get-topic-insight-status tool
create-topic-insight-report tool
regenerate-topic-insight-report tool
delete-topic-insight tool
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.
What we checked
The same checks run on every server. Each line below has one of these marks:
- 8 checks: command injection, argument injection, path traversal, server-side request forgery, SQL injection, code execution, unsafe deserialization, template injectionNot checked: no tool's code could be followed from its input
- 5 checks: runs programs the caller chooses, executes caller-supplied code, reads or writes any file path, requests any address, runs caller-supplied SQLNot checked: no tool's code could be followed from its input
- Tools that start processesNot known: no tool's code could be followed
- Tools that touch filesNot known: no tool's code could be followed
- Tools that call the networkNot known: no tool's code could be followed
Where the code is: 30 handlers in 8 files at commit e334a9bc0be5
src/features/analytics/tools.tsquery-analytics-dashboardsrc/features/auth/tools.tslogin, login-status, logoutsrc/features/bot-activity/tools.tsget-bot-activity-overview, list-ai-crawlers, list-bot-path-requests, get-bot-activity-distribution, get-bot-activity-metric-trends, get-bot-activity-item-trends, get-ai-crawler-trends, get-scrape-to-referral-ratio, list-connected-cdn-providerssrc/features/citations/tools.tsget-citation-overview, list-citation-queries, list-citation-topics, list-top-cited-pages, get-citation-metric-trends, get-citation-item-trendssrc/features/documentation/tools.tsquery-documentation-resourcessrc/features/projects/tools.tslist-projects, select-projectsrc/features/recordings/tools.tslist-session-recordingssrc/features/topic-insights/tools.tsget-topic-insight-constraints, list-topic-insights, get-topic-insight-report, get-topic-insight-status, create-topic-insight-report, regenerate-topic-insight-report, delete-topic-insight
- 5 checks: tool poisoning, instruction override, hidden content, exfiltration requests, metadata integrityChecked on every scan. Results in this category are published only after a person has verified them.
- Dependency manifests1 manifest: package.json
- Lockfiles checked against OSVNothing could be resolved to exact versions; 1 not resolved: package.json: dependency ranges declared here were not resolved against a lockfile and were not checked
- MCP SDK version@modelcontextprotocol/sdk ^1.20.2
- 1 check: credential harvestingChecked on every scan. Results in this category are published only after a person has verified them.
- Undeclared credential accessNot checked: no tool description could be read to compare with the code
- Credentials sent over the networkNot checked: no tool description could be read to compare with the code
- Tools that read credentialsNot known: no tool's code could be followed
- Authentication declaredNot checked: needs the live server's tools/list (a remote server declares how clients authenticate)
- 3 checks: undeclared network access, undeclared file access, undeclared process executionNot checked: no tool description could be read to compare with the code
- Tool descriptions presentEvery tool has a description the model and the user can read
- Statically known namesEvery tool's name could be read from the code
- Input schemasNot checked: needs the live server's tools/list (every tool declares an input schema)
- Destructive tools annotatedNot checked: needs the live server's tools/list (tools that write, delete or run commands carry destructivehint)
Dependencies with known vulnerabilities (0 in production)
Dependency ranges were not resolved against a lockfile, so the score is capped at 7.
No known vulnerabilities in the production dependencies that could be checked.
Past security advisories
Vulnerabilities published for this server itself, from the GitHub Advisory Database.
No security advisories have been published for this server in the GitHub Advisory Database.
How it runs
| Where it runs | On your machine, started by your MCP client from this repository or its package |
|---|---|
| Transport | not stated in the code the scanner read; most local servers talk over stdio |
| Sign-in | not checked needs the live server |
| MCP SDK | @modelcontextprotocol/sdk ^1.20.2 |
The project's own security
| Security policy | yes SECURITY.md |
|---|---|
| Private reporting | the policy does not name a private channel |
| Past advisories | none in the GitHub Advisory Database |
| Last push | 2026-11-16 |
| Signed releases | not checked yet |
Where it is published
| Other npm packages | 1 package by other publishers point to this repositoryNot published by the repository's owner; check who publishes a package before you install it. |
|---|---|
| Listed in | 5 catalogs (awesome_habitoai, github_search, glama, mcp_toplist, npm) |
| License | MIT |
| Created | 2025-04-15 |
| Topics | analytics mcp |
Attack map
How the server is built and where its risky tools lead: servers, their tools, what the tools' code can do, and the traced route from a declared risky tool's argument to the operation it reaches. Click a node for details.