PkgDiet: I built a local MCP Server to stop Cursor from hallucinating and installing deprecated npm packages

Hey everyone,

I got tired of Composer/Agents constantly hallucinating bad packages or trying to install deprecated dependencies like request or moment into my projects, so I built a local guardrail called PkgDiet.

It evaluates every package against a health score, bundle size, and CI cost before Cursor is allowed to install it. If the agent tries to use a deprecated package, PkgDiet blocks it and feeds the agent a modern alternative (e.g., swapping request for undici).

Since it’s local and runs entirely over stdio via npx, it takes 5 seconds to add to Cursor. Just go to Cursor Settings → Features → MCP and add a new stdio server:

Name: pkgdiet
Command: npx -y [email protected] mcp

It’s completely open source. Would love to hear what you guys think!
Repo: GitHub - om-tajne/pkgdiet: Put your node_modules on a diet — find unused, bloated, and unhealthy npm packages. · GitHub