PkgDiet
Dependency policy tool that blocks risky AI-suggested npm installs via hooks and MCP.
Tested on Linux
Use it
Linux x86_64
You need first
- Runtimes:
Node.js >=20
install pkgdiet globally via npm
npm install -g pkgdiet
Check that it works
pkgdiet --versionThe output should contain “2.0.1”.
Add it to your agent
claude mcp add pkgdiet -- pkgdiet mcpJSON for Claude Desktop, Cursor and other clients
{
"mcpServers": {
"pkgdiet": {
"command": "pkgdiet",
"args": [
"mcp"
]
}
}
}Run pkgdiet mcp to start the MCP server, then connect it from your MCP client.
What it does
- Check a package against your dependency policyTested
How to use it
- Start the server with
pkgdiet mcpand connect your MCP client. - Call the
check_dependencytool withpackageNameset to <package>. - Read the returned verdict text.
- Start the server with
- Get modern alternatives for blocked packagesTested
How to use it
- Start the server with
pkgdiet mcpand connect your MCP client. - Call the
suggest_alternativetool withpackageNameset to <package>. - Review the suggested replacements in the returned text.
- Start the server with
- Block unapproved installs before they runNot shown working
- Audit existing dependencies for policy and healthNot shown working
How far pickfit got
Linux x86_64
- Installs
- Connects
- 2 of 4 features work
- Works offline
Good for
- evaluate npm packages against repository dependency policy
- block risky AI-generated dependency before install
- audit existing dependencies for policy, health and size
- suggest modern lighter alternatives for blocked packages
- enforce dependency policy on branch changes in CI
How pickfit tested it
Each run starts from a clean machine and follows the steps above. How pickfit verifies
Linux x86_64
An MCP client called one of its tools
- Replayed from scratch
- Works offline
- Checked on 31 Oct 2026
- Version 2.0.1
An MCP client handshake over stdio listed 5 tools, and a call to check_dependency returned a result.