Put your node_modules on a diet - find unused dependencies, analyze health, and reduce size
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent โ or use 1-click editor setup below.
๐ก Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Put your node_modules on a diet.
PkgDiet is a proactive dependency governance tool that helps you find unused dependencies, analyze package health, and reduce node_modules size. It doesn't just ask "is it safe?" โ it asks "is it optimal?"
Our Vision: PkgDiet's mission is to become an open standard for dependency intelligence in AI-assisted software development. Our goal is simple: whenever a developer, CI pipeline, or compatible AI agent needs to evaluate, install, replace, or audit a dependency, PkgDiet should provide trusted, machine-readable insights through transparent, opt-in integrations.
Run it instantly in any Node.js project (no installation required):
To clean up unused dependencies automatically:
PkgDiet scans your codebase's AST and NPM registry data in seconds to give you a pristine, actionable report:
dayjs instead of moment, picocolors instead of chalk).pkgdiet check <package> to evaluate a library before adding it to your project.npx pkgdiet mcp-installpkgdiet ci to parse package-lock.json diffs in GitHub Actions and block PRs that introduce unhealthy dependencies.PkgDiet works out of the box with zero configuration. However, teams can enforce custom policies by running npx pkgdiet init to generate a .pkgdietrc.json:
By default, PkgDiet writes anonymous, purely local usage metrics to a .pkgdiet-metrics.json file in your repository to track the amount of time and disk space saved. No data is ever sent off your machine. You can disable this local logging entirely by adding "telemetry": false to your .pkgdietrc.json or by setting the PKGDIET_TELEMETRY_DISABLED=1 environment variable.
| Command | Description |
|---|---|
npx pkgdiet | Run full repository audit |
npx pkgdiet --fix | Preview unused dependencies and apply approved removals |
npx pkgdiet check <pkg> | Check health/size of a single package |
npx pkgdiet init | Generate config and GitHub Actions workflows |
npx pkgdiet ci | Run PR gate checks based on lockfile diffs |
npx pkgdiet mcp | Start the JSON-RPC server for AI agents |
npx pkgdiet mcp-install | Auto-configure MCP for Claude Desktop |
MIT ยฉ Om Tajne
No reviews yet โ be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/pkgdiet)<a href="https://allmcps.com/mcp/pkgdiet"><img src="https://allmcps.com/api/badge/pkgdiet?style=directory" alt="Pkgdiet on AllMCPs" /></a>