mcpdiet
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
mcpdiet π₯
Your MCP servers are eating your context window. Weigh them.
npx github:goldrusher9009-sketch/mcpdietOr from npm: npx @hashshabbir/mcpdiet
One command finds every MCP server in Claude Desktop, Claude Code, Cursor, VS Code and Windsurf, starts each one exactly like your client does, and tells you:
What it costs β tokens each server burns before you type a word (tool names, descriptions and schemas are re-sent every session)
What's dead β servers that no longer start but still clutter your setup
What's risky β hard-coded secrets, unpinned
npxpackages, plain-HTTP remotes, duplicate tool names (shadowing), and tool-poisoning phrasing in descriptionsWhat to do β a ranked fix list with the tokens you'd save
14,659 tokens (7.3% of a 200K window) 43 tools Grade C
server tools tokens
fat 40 14,400 ββββββββββββββββββ
lean 2 162
dead 0 0 β failedEvery run ends with a one-line brag/shame you can paste anywhere.
Why
Every MCP server dumps its full tool list into the model's context on every session. Three popular servers can cost 30β55K tokens before your first message β slower, pricier, and measurably less accurate tool choice. Security scanners tell you what's malicious; mcpdiet tells you what's wasteful, and covers the basic security hygiene in the same pass.
Related MCP server: dr-mcp
Use it from your agent
mcpdiet is also an MCP server β and it practices what it preaches (2 tools, <700 tokens).
{ "mcpServers": { "mcpdiet": { "command": "npx", "args": ["-y", "@hashshabbir/mcpdiet", "serve"] } } }Then ask: "Audit my MCP setup and tell me what to cut."
Options
Flag | Meaning |
| Scan this config instead of auto-discovery (repeatable) |
| Don't start servers; config-only checks |
| Machine / markdown output |
| Per-server startup limit (default 20) |
Exit code is 1 on grade F or any high-severity finding, so you can gate CI.
Honest limits
Scanning starts your configured stdio servers (as your client would), lists tools, and stops them. Remote servers are not measured.
Token counts are estimates (charsΓ·4), good for ranking, not billing.
Security checks are heuristics. Use a dedicated scanner for audits.
Nothing leaves your machine; env values are never printed.
MIT licensed.
CI & teams
Stop bloat and silent tool swaps before they ship:
npx github:goldrusher9009-sketch/mcpdiet --budget 12000 # fail the build over 12K tokens
npx github:goldrusher9009-sketch/mcpdiet --save-baseline mcp.lock.json # fingerprint every tool
npx github:goldrusher9009-sketch/mcpdiet --check-baseline mcp.lock.json # fail if a trusted tool changed (rug-pull alert)# .github/workflows/mcpdiet.yml
on: [pull_request]
jobs:
mcpdiet:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npx -y github:goldrusher9009-sketch/mcpdiet --config .mcp.json --budget 12000 --check-baseline mcp.lock.jsonNeed audits for your company's MCP setup or a custom connector? Open an issue.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Statically audits MCP tool surfaces for token cost, schema quality, and design issues.
Audit any domain or agent for A2A, MCP, x402, MPP, ERC-8004, and Poppy readiness.
Audits any remote agent or MCP URL for JSON-RPC compliance, latency SLA, OpenAPI schema, and HTTP.
Audit AI Agent SDKs and MCP servers for breaking changes, schema drift, and migration fixes.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceDiagnoses MCP server token costs, finds duplicates, grades efficiency, and generates optimization reports.64 npm1MIT

dr-mcpofficial
AlicenseNot gradedqualityDmaintenanceLocal-first MCP audit and cleanup tool that scans MCP configs to find stale servers, abandoned packages, duplicates, context-heavy tools, risky permissions, and major upgrades, generating reversible patch plans.103 npmMIT- AlicenseNot gradedqualityBmaintenanceAudits MCP server configurations for security risks including capability inventory, SSRF, prompt injection, and drift detection. Works in read-only mode and can also be used as an MCP server to let AI agents audit their own attack surface.116 PyPI4MIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients to run deterministic, read-only local repository audits for risky GitHub workflows, undocumented environment variables, possible credentials, and conflicting dependency configuration, returning structured findings without sending source code to a service.43 npmMIT