AgentGuard
Validates npm packages before installation by checking package existence, registration age (blocking suspicious packages under 30 days old), and weekly download counts against the official npm registry to detect AI-hallucinated or maliciously registered packages.
Validates Python packages before installation by checking package existence, registration age, and download counts against the official PyPI registry to detect AI-hallucinated or maliciously registered packages.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
๐ก๏ธ AgentGuard
The first open-source AI Integrity Sentinel & MCP Server preventing AI Dependency Hallucinations, Silent Code Degradation ("AI Slop"), and Agent Scope Drift.
๐ฅ The Critical Unsolved Problem
As autonomous AI Coding Agents (Claude Code, Cursor, Antigravity, Devin, Copilot Workspace) write and refactor code, three dangerous failure modes have emerged that existing linters (ESLint, Prettier, SonarQube) completely ignore:
AI Dependency Hallucination / Package Squatting: Agents frequently hallucinate library names (e.g.
express-async-router-v4) or import packages that were newly registered by attackers targeting LLM hallucination patterns (AI Supply Chain Poisoning).AI Silent Code Degradation ("AI Slop"): Agents write redundant boilerplate, place inline comments like
// In production replace this with..., and repeatedly reinvent common utilities (deepClone,formatDate) in multiple files rather than reusing existing architecture.Agent Scope Drift: During long iterative runs, agents drift away from the original user instructions and modify completely unrelated critical files or config.
Related MCP server: airlock
โก How AgentGuard Solves It
AgentGuard runs both as an autonomous MCP Server (plugging directly into your agent's brain before execution) and as a lightweight CLI tool for CI/CD and pre-commit hooks:
๐ก๏ธ Package Verifier: Pre-validates package existence, registration age (blocks suspicious packages <30 days old), and weekly download counts against official registries (npm, PyPI).
๐งน Slop & Boilerplate Auditor: Scans code changes to catch duplicate helper reinventions and lazy agent placeholders.
๐งญ Semantic Drift Sentinel: Measures alignment between the user's initial task specification and the files being changed.
๐ Installation & Quick Start
Global / Local CLI
# Clone and build
git clone https://github.com/your-username/agentguard.git
cd agentguard
npm install
npm run build
npm link1. Check a Package for AI Hallucinations
# Safe package
agentguard check-package react
# Hallucinated package (blocks execution with exit code 1)
agentguard check-package react-super-fake-agent-hallucination-xyz2. Audit Codebase for AI Slop
agentguard audit-slop .3. Check for Agent Scope Drift
agentguard check-drift \
--intent "Add Google OAuth login button" \
--files src/auth/login.tsx package.json๐ค Integration as an MCP Server
Add AgentGuard to your agent configuration (e.g., claude_desktop_config.json, Antigravity, or Cursor):
{
"mcpServers": {
"agentguard": {
"command": "node",
"args": ["/path/to/agentguard/dist/cli/index.js", "mcp"]
}
}
}Exposed MCP Tools for Agents:
verify_package: Called before runningnpm installorpip install.analyze_code_slop: Called before creating pull requests to prevent bloated boilerplate.check_scope_drift: Compares modified file lists against user prompt intent.
๐งช Testing
Run the automated test suite:
npm test๐ License
Apache License 2.0. Open-source and free for all developers and AI agent platforms.
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
MCP server for building and testing AI agents with multi-model experimentation and insights.
Scan AI agent skills, MCP server packages and MCP configs before you install them. Static analysis.
MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceAn intelligent MCP server that acts as an AI tech lead for coding agents, providing expert validation, impact analysis, and strategic guidance before code changes are made.99 npm7MIT
- AlicenseNot gradedqualityCmaintenanceMCP server that vets package installations and shell commands to block dangerous actions by AI coding agents.8 npm1MIT
- AlicenseAqualityDmaintenanceAn MCP server that helps catch context drift in AI coding agents by comparing actual code changes against the original request, allowing users to keep or roll back unintended additions.2MIT
- AlicenseAqualityDmaintenanceAn MCP server that enforces hard quality gates on AI coding agents, including forced web search, planning, and empirical test execution, to prevent common failure modes and ensure production-grade code.1328MIT