Package Guard Mcp

io.github.mlawsonkingPublished by GitHub account mlawsonkingv1.3.0Updated Oct 24, 2026

Supply-chain guard for AI coding agents: verify packages, check vulns/malware, detect typosquats.

VerifiedSTDIODesktop onlyDeveloper ToolsSecurity & Monitoring

Overview

AI-generated overview

Lets an AI coding agent vet npm and PyPI package names before installing them, flagging hallucinated names, typosquats, and known vulnerabilities.

What you can do
Provides tools to check a package name against the npm or PyPI registry and OSV advisories before an agent installs it. verify_package returns safe, caution, or danger based on whether the name exists, known vulnerabilities and malware, age, weekly downloads, name similarity to npm search hits, deprecation, and license. check_vulns queries OSV across seven ecosystems, package_info returns registry metadata, audit_deps checks a list of names or a package.json or requirements.txt, and typosquat_scan reports registered ASCII lookalike names.
When to use it
Useful when an AI coding agent proposes installing packages and you want a deterministic pre-install check for hallucinated names, typosquats, and known advisories. Best suited to npm and PyPI workflows where a quick registry and OSV lookup adds a safety gate.
Requirements
Runs locally over stdio, typically via npx package-guard-mcp, so Node.js is needed. Network access to the npm and PyPI registries, OSV.dev, and the rules feed endpoint is required; the endpoint can be overridden with PACKAGE_GUARD_API. No accounts, API keys, or credentials are declared.
Before you install
It never fetches or reads package contents, so a malicious package with no OSV advisory and healthy download numbers can still come back safe. audit_deps reads manifests, not lockfiles, does not resolve the dependency tree, and if its batch OSV call fails every package reports 0 vulns. A package that only exists in a private registry reads as missing. About once a day it contacts a rules feed; updates can be disabled with --offline, AGENT_GUARDS_NO_FEED=1, or a feed setting in the local config…

Installation

In SourceWeft

  1. Open Package Guard Mcp in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

package-guard-mcp

An MCP server that vets a package before your agent installs it. It checks that the name is registered, that OSV has no advisory against it, and how new and how downloaded it is. Deterministic, no LLM, free.

LLMs regularly suggest package names that don't exist, and attackers register those hallucinated names to slip malware into agent-run installs. People call it slopsquatting. The check for it is a registry lookup: if npm or PyPI has no package by that name, verify_package returns likely_hallucination: true. That means "not in this registry" and nothing more — it can't separate an invented name from a typo or a rename, and a package that only exists in your private registry will read as missing.

It never fetches or reads package contents. No install scripts, no code, no tarballs. A malicious package with no OSV advisory and healthy download numbers comes back safe.

Install

json
{ "mcpServers": { "package-guard": { "command": "npx", "args": ["-y", "package-guard-mcp"] } } }

Tools

  • verify_package: the main guard. Returns safe, caution, or danger, based on whether the registry has the name (if not you get likely_hallucination, plus a "did you mean" list on npm), known vulnerabilities and malware from OSV, age and weekly downloads, whether the name is within 2 edits of an npm search hit, deprecation, and license.
  • check_vulns: known vulnerabilities and malware advisories for a name and version, from OSV.
  • package_info: registry metadata, including latest version, deprecation, license, repository, weekly downloads, and age.
  • audit_deps: check a list of names, or the dependencies and devDependencies in a package.json, or a requirements.txt.
  • typosquat_scan: generate ASCII lookalike names and report which are registered.

Scope and limits

check_vulns is a straight OSV.dev query and covers all seven ecosystems: npm, PyPI, Go, crates.io, RubyGems, Maven, NuGet. Everything else needs a package registry, and there are two clients: npm and PyPI. So verify_package, package_info, audit_deps and typosquat_scan take npm or pypi only. Suggestions and the confusable-name signal use npm's search API, so they are npm only.

audit_deps reads manifests, not lockfiles, and does not resolve the dependency tree. It checks the entries you send and nothing they depend on, up to 40 names. A version range is reduced to the digits inside it, so ^4.17.20 is checked as 4.17.20.

vulnerabilities.checked: false with count: null means the OSV request failed and the package was not checked; verify_package downgrades the verdict to caution instead of calling it safe. count: 0 means OSV answered and had nothing. audit_deps has no such guard yet: if its batch OSV call fails, every package reports 0 vulns.

Rule updates

About once a day this server asks the rules feed whether there is a newer ruleset, and applies it if there is. The request carries two things: which surface asked, which here is facade, and the rules version already installed. No machine id, no user id, no file names, nothing you scanned.

Bundles are signed with Ed25519 and verified against a public key compiled into this package, so it does not matter which mirror served one. A bundle that fails its signature, its schema, or its ReDoS check is discarded and the rules you already had stay in place. --offline turns updates off, as does AGENT_GUARDS_NO_FEED=1 or {"feed": false} in ~/.agent-guards/config.json. The bundle format and how to verify one yourself: https://github.com/mlawsonking/MCP/blob/main/rules/README.md

It calls https://package-guard.vercel.app (set PACKAGE_GUARD_API to override). One of six agent guards in this repo. MIT.

Source: package-guard-mcp/README.md at commit 91f3fa7

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v1.3.0LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts