Pkgdiet MCP server
io.github.om-tajne/pkgdiet·v2.0.1·5 starsDependency policy and MCP server to stop AI coding agents from installing risky npm packages.
not scanned yet
5 stars35 downloads/wk
Reviews
Write oneNobody has reviewed Pkgdiet yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
Pkgdiet tools
No tool declarations could be read from the package source. They show once the server is installed.
How Pkgdiet compares
Against every graded MCP server, from our own scans and uptime checks. Updated after each scan run.
- Safety score
- 74/100
- higher than 40% of 48,243 servers
- GitHub stars
- 5
- more than 83% of 28,706 servers
- Downloads a week
- 35
- more than 24% of 12,306 servers with a package
Release history: 2 versions in the registry since 2026-09-01, latest 2026-10-30, typically one every 59 days.
Install Pkgdiet in Claude Code, Cursor or VS Code
Runs npx -y pkgdiet on your machine. Read the scan report first; the gateway never runs local packages.
claude mcp add pkgdiet -- npx -y pkgdiet
What the publisher says
From the Pkgdiet repository's README, as published. We do not edit it. Read it on GitHub
🥗 PkgDiet
Check any npm package in under 2 seconds. Get a ALLOW / WARN / BLOCK verdict, health score, size impact, cost estimate, and curated alternatives — before you install.
Try it now — no install required
# Check a package before installing it
npx pkgdiet check moment
# Check multiple packages at once
npx pkgdiet check moment request lodash
# Audit your whole project
npx pkgdiet audit
# Wire up your AI coding agent (Cursor, Claude, Copilot, Windsurf…)
npx pkgdiet agent-setup --allWhat you get
🟡 moment
Health: 100/100
Verdict: WARN
Reasons: Efficiency Flag: Better alternatives exist for moment.
Added Size: 4.15MB
Cost Impact: $0.032/mo CI
Alternatives: dayjs, date-fns, luxon
💡 Fix: Run `npm uninstall moment && npm install dayjs`🔴 request
Health: 15/100
Verdict: BLOCK
Reasons: Deprecated. Maintainer explicitly marked as end-of-life.
Alternatives: got, axios, node-fetch, ky🟢 @babel/parser
Health: 94/100
Verdict: ALLOW ✨ PkgDiet Certified
Added Size: 1.77MBFor AI agents and MCP clients
PkgDiet is a fully working MCP server. Any MCP-compatible agent (Claude, Cursor, Windsurf, Copilot, Cline, and others) can call it to vet packages mid-task — before writing an install command.
One-command agent setup
npx pkgdiet agent-setup --allAutomatically writes the correct MCP config to all detected agents simultaneously:
- Claude Desktop → claudedesktopconfig.json
- Cursor → .cursor/mcp.json + .cursorrules
- Windsurf → .windsurfrules
- Cline → clinemcpsettings.json
- GitHub Copilot → .github/mcp.json
- Claude Code → claude mcp add
Or configure a specific agent:
npx pkgdiet agent-setup --agent cursor
npx pkgdiet agent-setup --agent claude-desktop
npx pkgdiet agent-setup --detect # auto-detect from your projectManual MCP config (paste into your agent's config file)
{
"mcpServers": {
"pkgdiet": {
"command": "npx",
"args": ["-y", "pkgdiet@2.0.0", "mcp"]
}
}
}Tip: Run npx pkgdiet@2.0.0 mcp once in a terminal first to warm the npm cache. Subsequent agent launches will start in ~260ms.
MCP tools available to agents
Recommended agent workflow:
- Call check_dependency before recommending or installing any package.
- If verdict is BLOCK → do not install without explicit user direction.
- If verdict is WARN → explain the reasons and call suggest_alternative.
- Re-check the chosen alternative with check_dependency.
Policy — control what gets allowed
Create .pkgdietrc.json in your project root (or run npx pkgdiet setup):
{
"minHealthScore": 70,
"securityMode": "standard",
"blockedPackages": ["request", "node-uuid", "colors"],
"internalNamePrefixes": ["@myorg/"],
"environments": {
"ci": {
"minHealthScore": 80,
"securityMode": "strict",
"failOn": "WARN"
}
}
}Validate your policy at any time:
npx pkgdiet policy-checkAll commands
Shortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
Pkgdiet: common questions
- Is Pkgdiet MCP server safe?
- Mostly: it is graded B (74/100). Read the Pkgdiet safety report
- How do I install Pkgdiet?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
- Does Pkgdiet need an API key?
- Not as far as the registry entry and our scan can tell: no credentials are declared or required.
- Is Pkgdiet maintained?
- The last commit was 8 days ago (2026-10-28). The latest release is v2.0.1.
- How does Pkgdiet compare with other MCP servers?
- safety score 74/100 (higher than 40% of 48,243 servers); github stars 5 (more than 83% of 28,706 servers); downloads a week 35 (more than 24% of 12,306 servers with a package). Full comparison.