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.
π₯ The Critical Unsolved Problems in AI Coding
Autonomous AI Coding Agents (Claude Code, Cursor, Antigravity, Devin, Copilot Workspace) introduce dangerous failure modes that completely bypass traditional linters (ESLint, Prettier, SonarQube):
AI Dependency Hallucination / Package Squatting: Agents invent non-existent libraries across npm, PyPI, Crates.io, and Go, opening repositories to supply chain poisoning.
Destructive Shell Execution: Agents executing autonomous shell commands can run catastrophic actions (
rm -rf /,curl | bash,chmod 777, reverse shells).Cognitive Infinite Loops: Agents get caught in endless circular iterations (e.g. failing a test -> editing the test incorrectly -> retrying endlessly).
Shadow Diff Tampering: During long refactoring sessions, agents may introduce stealthy unprompted network calls, telemetry, or prototype pollution.
Indirect Prompt Injections & Jailbreaks: Malicious instructions hidden in comments or third-party READMEs hijack the agent's behavior.
Hardcoded Secrets & API Keys: Accidental exposure of real tokens (
sk-..., GitHub PATs, AWS credentials).
Related MCP server: airlock
β‘ What AgentGuard v2.0.0 Delivers
π‘οΈ Execution Shield (
agentguard shield-exec&shield_commandMCP):Intercepts shell tool-calls in runtime and blocks destructive commands with safe alternatives.
π Cognitive Loop Breaker (
check_cognitive_loopMCP):Detects repetitive circular failure loops and prompts the agent or developer to halt execution.
π Industry-Standard SARIF 2.1.0 Export (
--format sarif):Native integration with GitHub Advanced Security / Code Scanning tab and GitLab SAST.
ποΈ AI Compliance & Hygiene Scoring (Tier A+ to F):
Evaluates codebases with an objective 0β100 score across Supply Chain, Secrets, Injections, and Code Smells.
π΅οΈ Shadow Diff Inspector (
inspect_shadow_diff):Audits Git diff patches to catch unrequested telemetry, network connections, or prototype pollution.
π― Indirect Prompt Injection Defense (
scan-injections):Scans files for hidden jailbreaks and instruction overrides.
π§ Automated Code Smell Fixer (
agentguard fix):Safely refactors lazy agent artifacts (replaces swallowed errors with logging, converts
@ts-ignoreto@ts-expect-error).
β Native Git Pre-Commit Hook (
agentguard install-hook):Zero-overhead safeguard blocking commits containing secret leaks or hallucinated packages.
π Quick Start
Global / Local CLI
# Run directly with npx
npx @francaroscillidev/agentguard --help
# Or install globally
npm install -g @francaroscillidev/agentguard1. Run Comprehensive Audit with SARIF or Markdown Export
# Terminal summary
agentguard audit
# Markdown report with Hygiene Score (ideal for PR comments)
agentguard audit --format markdown
# Standard SARIF 2.1.0 output for GitHub Code Scanning
agentguard audit --format sarif > agentguard.sarif2. Shield Shell Commands from Destructive Agent Actions
agentguard shield-exec "rm -rf /"
# π¨ COMMAND BLOCKED [CRITICAL RISK]!
# Reason: Destructive root or home recursive deletion detected.3. Auto-Fix Lazy AI Code Smells
agentguard fix4. Install Native Git Pre-Commit Hook
agentguard install-hookπ€ MCP Server Integration
Add AgentGuard to your agent configuration (claude_desktop_config.json, Antigravity, or Cursor):
{
"mcpServers": {
"agentguard": {
"command": "npx",
"args": ["-y", "@francaroscillidev/agentguard", "mcp"]
}
}
}Exposed MCP Tools for Agents:
verify_package: Pre-flight check before installing dependencies.shield_command: Intercept and block destructive shell actions.check_cognitive_loop: Detect and break runaway infinite agent execution loops.inspect_shadow_diff: Catch stealthy unprompted additions in code patches.detect_prompt_injections: Protect against indirect prompt injection vectors.audit_manifests: Validate all project dependencies in bulk.detect_secret_leaks: Check for hardcoded credentials.audit_code_smells: Scan for swallowed exceptions and antipatterns.autofix_smells: Automatically refactor lazy agent code.check_scope_drift: Verify file changes match user prompt intent.
π¬ Contact, Support & Commercial Inquiries
If you have questions, feedback, enterprise integration requests, or custom agent governance needs, feel free to reach out directly:
Lead Developer & Maintainer: Franca Roscilli
Email: francaroscillidev@gmail.com
GitHub: @francaroscillidev-gif
Bug Reports & Feature Requests: Open an issue on GitHub
π License
Apache License 2.0. Copyright (c) 2026 Franca Roscilli (https://github.com/francaroscillidev-gif). Open-source and free for all developers and AI agent platforms.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
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 gradedqualityDmaintenanceAn 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.61 npm7MIT
- AlicenseNot gradedqualityCmaintenanceMCP server that vets package installations and shell commands to block dangerous actions by AI coding agents.19 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.1330MIT