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

mcp-diet

v0.2.0

Published

Know where your context goes. Control what loads.

Downloads

208

Readme

mcp-diet

Know where your context goes. Control what loads.

mcp-diet analyzes the context window overhead of your MCP server configurations and lets you switch between lean and full setups with one command.

The Problem

MCP servers inject tool definitions into every API turn. With 4+ servers connected, you can lose 50,000-70,000 tokens (25-35% of a 200K context window) before typing a single message.

mcp-diet shows you exactly where those tokens go and lets you manage it.

Quick Start

npm install -g mcp-diet
mcp-diet analyze

What You Get

mcp-diet v0.1.0 — Context Window Analysis

Claude Code (user)

 Server                    Tools   Tokens   % of Budget
 ─────────────────────────────────────────────────────────
 Notion                      21    12,450    6.2%
 Google Calendar             11     6,230    3.1%
 Claude Preview              14     5,100    2.6%
 MemPalace                   19     2,047    1.0%
 scheduled-tasks              3     1,100    0.6%
 ─────────────────────────────────────────────────────────
 TOTAL                       68    26,927   13.5% of 200K

Commands

Free

| Command | Description | |---------|-------------| | mcp-diet analyze | Scan all MCP clients, show token costs | | mcp-diet analyze --json | Machine-readable output | | mcp-diet analyze --sort name | Sort by name, tokens, or tools | | mcp-diet analyze --client claude | Filter to specific client | | mcp-diet doctor | Check all servers are reachable | | mcp-diet backup | Backup all MCP configs | | mcp-diet restore | List and restore from backups |

Pro ($9/month)

| Command | Description | |---------|-------------| | mcp-diet profile create coding --only mempalace,github | Create a lean profile | | mcp-diet profile list | List all profiles | | mcp-diet use coding | Switch to a profile | | mcp-diet use full | Restore all servers | | mcp-diet use coding --dry-run | Preview changes | | mcp-diet history | Token usage trends | | mcp-diet history --last 7d | Last 7 days |

Supported Clients

  • Claude Code (project, user, and local configs)
  • Claude Desktop (Windows and macOS)
  • Cursor (global and project)
  • Cline (Windows, macOS, Linux)
  • VS Code (native MCP support)

Auto-discovery — no configuration needed.

Accurate Token Counting

Set your Anthropic API key for exact token counts (uses the free count_tokens endpoint):

export ANTHROPIC_API_KEY=sk-ant-...
mcp-diet analyze

Without an API key, mcp-diet uses character-based estimation (~15-20% accuracy).

How It Works

  1. Discovers MCP configs across all known client locations
  2. Connects to each server via stdio and calls tools/list
  3. Converts MCP tool schemas to Claude API format
  4. Counts tokens via the Anthropic API (or estimates)
  5. Displays a ranked table with token costs and budget percentages

vs. Other Tools

| Tool | What it does | How mcp-diet differs | |------|-------------|---------------------| | mcp-slim | Reduces tool schemas by grouping | We don't optimize — we analyze and manage | | trimcp | Compresses schemas via proxy | We're not a proxy — zero runtime overhead | | MCPProxy | Dynamic tool loading | We're a CLI, not a runtime component |

mcp-diet is complementary to these tools. Use them to optimize, use mcp-diet to understand and manage.

License

MIT