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

@pottogames/mcpaudit

v1.0.0

Published

Measure how many tokens your MCP servers silently eat from every request. Find the bloat, cut the cost.

Downloads

18

Readme

mcpaudit

Your MCP servers are eating your context window on every single request. Find out how much.

npx mcpaudit

No install, no config, no signup. It finds your MCP servers, asks each one what tools it exposes, and counts exactly what they cost you.


The problem

Every MCP tool definition — name, description, and full JSON schema — is injected into the model's context on every request. Not once per session. Every request.

A server with 30 tools can cost 15,000 tokens. Connect five or six and you're routinely burning 30–50k tokens before you type a single character. On a 200k window that's a quarter of your context gone; on a smaller model it's the whole thing.

You're paying for it twice: once in tokens, and once in quality. Past roughly 30% context consumption, tool-selection accuracy measurably degrades — the model is choosing from a longer menu of near-identical options.

Most people have no idea it's happening, because nothing reports it.

What you get

  MCP AUDIT  ·  what your MCP servers cost on every request
  ──────────────────────────────────────────────────────────────────

  38,412 tokens loaded before you type anything
  from 6 servers · 94 tools

  ████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  19.2% of a 200,000 window

  WHERE IT GOES

  playwright   ████████████████████████████  14,203 (31 tools)
  github       ███████████████░░░░░░░░░░░░░   7,891 (22 tools)
  filesystem   ████████░░░░░░░░░░░░░░░░░░░░   4,120 (11 tools)
  slack        ██████░░░░░░░░░░░░░░░░░░░░░░   3,455 (9 tools)

  ESTIMATED COST (this overhead only, not your actual usage)

       $2.07 / day      $45.62 / month      $547.44 / year

  WHAT TO FIX

   HIGH   "playwright" alone is 37% of your MCP overhead
          31 tools, 14,203 tokens on every request.
          → Disable it in projects that don't use it, or filter its tool list.
          saves ~7,101 tokens

Commands

npx mcpaudit                          # scan and report
npx mcpaudit --requests 400           # your actual request volume
npx mcpaudit --json                   # machine-readable
npx mcpaudit --json --max-tokens 25000  # fail CI when bloat creeps in
npx mcpaudit --config ./mcp.json --only # audit one specific config

Options

| Flag | Does | |---|---| | --json | Machine-readable output | | --out <file> | Write the report to a file | | --requests <n> | Requests/day for the cost estimate (default 200) | | --price <n> | USD per 1M input tokens (default 3.00) | | --window <n> | Context window size (default 200,000) | | --max-tokens <n> | Exit non-zero above this budget — for CI | | --no-probe | Don't launch servers; read configs only | | --config <path> | Include an extra config file | | --only | With --config, scan only that file | | --timeout <ms> | Per-server probe timeout (default 20000) |

Supported clients

Auto-discovered, no setup:

Claude Code · Claude Desktop · Cursor · Windsurf · VS Code · Zed · project-local .mcp.json

Using something else? --config <path> works with any file that has an mcpServers block. Open an issue with the path and it gets added.

How the numbers are produced

Token counts are measured, not estimated. We launch each server, complete the MCP handshake, call tools/list, and run the real schemas through a BPE tokenizer. Anthropic's tokenizer isn't byte-identical to cl100k, so treat counts as accurate to roughly ±10% for Claude — the ranking of offenders, which is what you act on, is unaffected.

Cost is an estimate, and labelled as one. It depends on request volume and cache behaviour that can't be observed from outside. We model the cache-friendly case, so the figure errs low. Change the assumptions with --requests and --price.

Safety. mcpaudit launches the servers already in your own config — the same ones your editor launches at startup — and only ever calls tools/list. It never invokes a tool. Use --no-probe to skip launching entirely.

Pro — $39 once

The free scan tells you what it costs. Pro fixes it.

  • mcpaudit optimize — generates trimmed configs you can paste
  • Tool allowlists ranked by actual usefulness
  • Dead-tool detection
  • Duplicate-registration cleanup across clients
  • Full findings list (free shows the top 3)
  • CI mode with before/after reporting

One payment. No subscription. Works offline — the licence is verified locally, so the CLI never phones home.

mcpaudit.dev

mcpaudit activate <your-key>

Requirements

Node 18+. That's it.

Licence

MIT for the scanner. Pro features are source-available under a commercial licence.