npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@urdigital/mcp-server-clarity

v0.1.1

Published

MCP server for Microsoft Clarity: behavioral analytics (traffic, engagement, rage clicks, dead clicks) via the Data Export API.

Readme

@urdigital/mcp-server-clarity

An MCP (Model Context Protocol) server exposing Microsoft Clarity's behavioral analytics to Claude, Claude Code, and any other MCP-compatible client.

Install

No install needed — run directly with npx:

   npx -y @urdigital/mcp-server-clarity

Configure

Get a token from your Clarity project → Settings → Data Export → Generate new API token. Tokens are scoped to a single project — you need a separate token per project if you're tracking multiple sites.

Add to your MCP client config (e.g. Claude Desktop's claude_desktop_config.json):

   {
     "mcpServers": {
       "clarity": {
         "command": "npx",
         "args": ["-y", "@urdigital/mcp-server-clarity"],
         "env": { "CLARITY_API_TOKEN": "your-project-token" }
       }
     }
   }

Tools

| Tool | Description | |---|---| | clarity_get_insights | Behavioral analytics for the configured project: traffic, engagement, scroll depth, and frustration signals (rage clicks, dead clicks, quickback clicks, script errors) |

Important behavior, confirmed by testing against a real project

Clarity's Data Export API is a single, narrow endpoint with real limitations worth knowing before you build on it:

  • Only the last 1-3 days of data are retrievable at all. There is no way to query older data through this API.
  • No dimensions vs. dimensions is a trade-off, not additive. Calling with no dimension1/2/3 returns a broad 16-category snapshot (traffic, engagement, frustration metrics, plus Browser/Device/OS/Country/PageTitle/ ReferrerUrl/PopularPages breakdowns). Specifying any dimension swaps that out entirely for a narrower metric set (frustration + engagement + traffic only), cross-tabulated by whichever dimension(s) you gave. You get depth on one axis or breadth across many — not both in the same call.
  • numOfDays is validated; dimension names are not. An out-of-range numOfDays (anything but 1, 2, or 3) returns a hard HTTP 400 with an empty body — no error message. An invalid dimension name, by contrast, returns HTTP 200 and silently falls back to the default no-dimension snapshot instead of erroring. This tool restricts dimension inputs to a strict enum of the valid values for exactly this reason — it's the only real safeguard against a silently wrong result, since Clarity itself won't tell you.
  • Small daily request quota per project (Clarity doesn't expose your exact remaining count anywhere in the API response) — choose numOfDays and dimensions deliberately rather than probing repeatedly.

License

MIT