agent-security-scanner-mcp
This MCP server provides a comprehensive security scanning and compliance toolkit for AI agents, codebases, MCP servers, and dependencies. Here's what it can do:
Static Code Analysis
scan_security— Scan files for vulnerabilities (SQL injection, XSS, command injection, etc.) using AST, taint, and semantic engines across 12 languages and 1,700+ rules, with SARIF outputfix_security— Auto-generate fixes for detected vulnerabilities using 120 fix templatesscan_git_diff— Scan only changed files for fast feedback in PRs or pre-commit hooksscan_project— Audit entire directories with A-F security grading, .gitignore support, and cross-file taint analysislist_security_rules— Browse all available security rules and fix templates
AI Agent-Specific Security
scan_agent_prompt— Detect prompt injection, jailbreaks, data exfiltration attempts, and social engineering (returns BLOCK/WARN/LOG/ALLOW) using 59+ rulesscan_agent_action— Pre-execution safety check for agent actions: bash commands, file operations, HTTP requests, cron jobs, git, Docker, and more
Package Hallucination Detection
check_package— Verify a single package exists in official registries (npm, PyPI, RubyGems, crates.io, pub.dev, CPAN, raku.land)scan_packages— Bulk-check all imports in a code file against 4.3M+ known packageslist_package_stats— View statistics about loaded package registry data
MCP Server Security
scan_mcp_server— Audit MCP server source code for unicode poisoning, tool name spoofing, description injection, and rug pull attacks; returns an A-F grade
OpenClaw Skill Security
scan_skill— 6-layer deep scan of OpenClaw skills: prompt injection, AST+taint analysis, malware signatures (reverse shells, crypto miners, C2 beacons), supply chain verification, and rug pull detection
SBOM & Supply Chain Analysis
sbom_generate— Generate CycloneDX v1.5 SBOMs from lock files and manifests across npm, Python, Go, Rust, Ruby, and Javasbom_scan_vulnerabilities— Cross-reference SBOM against OSV.dev for CVEs with CVSS scores and fix recommendationssbom_check_hallucinations— Verify all SBOM packages exist in official registriessbom_diff— Compare current SBOM against a saved baseline to detect dependency driftsbom_export_report— Generate HTML or JSON audit reports for compliance documentation
Compliance Evaluation
get_compliance_controls— Look up controls for AIUC-1, SOC2-Technical, and GDPR-Technical frameworksevaluate_compliance— Automatically collect evidence and evaluate a project against compliance frameworks with optional timestamped audit trail persistence
Scoring & Diagnostics
score_aivss— Score findings using OWASP AIVSS v2 with per-finding scores (0–10) and aggregate security posturescanner_health/clawproof_health— Check engine status, daemon health, and package data availability
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@agent-security-scanner-mcpscan this repository for vulnerabilities"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
agent-security-scanner-mcp
Security scanner for AI coding agents, MCP servers, prompts, and AI-suggested packages.
Run it before Claude Code, Cursor, Windsurf, Cline, OpenCode, or another agent trusts new code, tools, prompts, or dependencies.
Copy-Paste Start
Scan any repo and get an A-F agent security grade:
npx agent-security-scanner-mcp scan-project . --verbosity compactInstall the scanner into your AI coding client:
npx agent-security-scanner-mcp init claude-codeReplace claude-code with cursor, claude-desktop, windsurf, cline, kilo-code, opencode, or cody.
Audit an MCP server before adding it to an agent:
npx agent-security-scanner-mcp scan-mcp ./path/to/mcp-server --verbosity compactCheck AI-generated imports for package hallucinations:
npx agent-security-scanner-mcp scan-packages ./src/app.ts npm --verbosity compactRelated MCP server: AgentAudit
What It Catches
Risk | Why agents need it | Command |
Vulnerable generated code | Agents can introduce SQL injection, XSS, command injection, unsafe crypto, and secrets |
|
MCP server attacks | MCP tools can poison descriptions, spoof names, exfiltrate env vars, or execute commands |
|
Prompt injection | Agents often process untrusted docs, tickets, pages, and tool output |
|
Unsafe agent actions | Catch dangerous shell/file/network actions before execution |
|
Hallucinated packages | AI often invents dependency names that attackers can later squat |
|
SBOM and CVEs | Generate CycloneDX SBOMs and scan dependencies with OSV.dev |
|
Semantic review | LLM-powered review that uses project intent to find context-aware issues |
|
Screenshots
Project Scan
MCP Server Audit
Package Hallucination Detection
Demos
Run a safe local demo that creates intentionally vulnerable fixtures, scans them, and cleans them up.
# MCP audit demo: tool poisoning, spoofed tool name, command execution, secret exposure
npx agent-security-scanner-mcp demo --type mcp --no-prompt
# Package hallucination demo: real imports mixed with fake AI-generated package names
npx agent-security-scanner-mcp demo --type packages --no-promptExpected demo shape:
{
"grade": "F",
"findings_count": 8,
"findings": [
{
"rule": "mcp.description-injection",
"severity": "ERROR",
"message": "Tool description contains imperative language directed at the LLM."
},
{
"rule": "mcp.tool-name-spoofing",
"severity": "ERROR",
"message": "Tool name is close to a well-known MCP tool name."
}
]
}Install In Your Agent
npx agent-security-scanner-mcp init claude-codeClient | Setup |
Claude Code |
|
Cursor |
|
Claude Desktop |
|
Windsurf |
|
Cline |
|
Kilo Code |
|
OpenCode |
|
Cody |
|
Interactive picker |
|
Then restart the client. Your agent can call the scanner as an MCP tool.
Agent Playbook
Paste this into an agent task when you want it to work safely:
Before trusting new code, dependencies, prompts, or MCP tools, run:
1. npx agent-security-scanner-mcp scan-project . --verbosity compact
2. npx agent-security-scanner-mcp scan-packages ./src/app.ts npm --verbosity compact when imports change
3. npx agent-security-scanner-mcp scan-mcp ./path/to/mcp-server --verbosity compact before adding MCP servers
4. npx agent-security-scanner-mcp scan-diff --base main --target HEAD before opening a PR
Fix high-confidence security findings before continuing.Common Workflows
Before You Trust An Agent-Written PR
npx agent-security-scanner-mcp scan-diff --base main --target HEAD --verbosity compact
npx agent-security-scanner-mcp scan-packages ./src/app.ts npm --verbosity compactBefore Installing An MCP Server
npx agent-security-scanner-mcp scan-mcp ./path/to/mcp-server --verbosity compactBefore Adding A Dependency Suggested By AI
npx agent-security-scanner-mcp check-package express npm
npx agent-security-scanner-mcp scan-packages ./package.json npm --verbosity compactAdd CI
npx agent-security-scanner-mcp init-ci githubGenerate Share Copy From A Real Scan
npx agent-security-scanner-mcp scan-project . --verbosity compact > scan-result.json
npx agent-security-scanner-mcp share-kit --scan-result scan-result.json --output share-kit.mdCLI Reference
Command | Use |
| Full project scan with A-F grade |
| Single-file security scan |
| Scan changed files only |
| Audit an MCP server before install |
| Detect prompt injection and jailbreak attempts |
| Pre-execution safety check for shell/file/network actions |
| Verify one package exists |
| Verify imports/dependencies in a file |
| Check local setup health |
| Generate repo-specific next steps |
| Generate public-safe launch/share copy |
| Export scan evidence to the ProofLayer Vanta integration |
All scanner outputs support context-friendly verbosity:
--verbosity minimal # counts only, best for CI
--verbosity compact # default, best for agents and humans
--verbosity full # audit/debug detailMCP Tools For Agents
When installed as an MCP server, agents get these tool families:
Tool family | Purpose |
| Code and repo security |
| MCP and AI skill security |
| Prompt/action safety |
| Package hallucination detection |
| Supply-chain and release evidence |
| SOC2/GDPR/AIUC-1 technical evidence |
| Runtime diagnostics |
Why Developers Install It
One
npxcommand gives an A-F security grade for AI-written code.MCP-specific checks catch risks that normal SAST tools miss.
Package hallucination detection checks 4.3M+ package names across npm, PyPI, RubyGems, crates.io, pub.dev, CPAN, and raku.land.
Output is compact by default so coding agents can read it without burning the context window.
Works as a CLI, MCP server, GitHub Action workflow, Apify Actor, and semantic review agent.
MIT licensed.
Semantic Code Review
cr-agent is bundled with the npm package for LLM-powered semantic review. It reads project intent, then looks for code that violates that intent.
npx cr-agent analyze ./path/to/project -p claude-cli --verbose
npx cr-agent analyze ./path/to/project -p openai --format sarifUse it when rule-based scanning is not enough and the question is, "Does this code make sense for what this project is supposed to do?"
SBOM And Compliance Evidence
npx agent-security-scanner-mcp sbom-generate .
npx agent-security-scanner-mcp sbom-vulnerabilities .
npx agent-security-scanner-mcp sbom-check-hallucinations .
npx agent-security-scanner-mcp evaluate-compliance . --framework soc2-technicalUseful before releases, SOC 2 evidence collection, vendor reviews, and AI-generated dependency changes.
Apify Actor
Run the scanner as an Apify Actor when you want a hosted API or scheduled scans:
{
"actorId": "folkloric_morale/agent-security-scanner",
"input": {
"target": "repository",
"repoUrl": "https://github.com/your-org/your-agent.git",
"repositoryScanMode": "quick",
"includeTestFiles": false,
"maxRepositoryFiles": 150,
"severityThreshold": "medium"
}
}Latest Release
v4.5.5 reduces Dockerfile scan noise: chmod 755 no longer reports as dangerous, while world-writable and setuid/setgid modes still flag. The latest product loop reports 0.9463 precision and a 0.0530 false-positive rate.
Detailed release history lives in CHANGELOG.md. The older README-embedded changelog is archived at archive/README_CHANGELOG_ARCHIVE.md.
FAQ
Is this only for MCP servers? No. It scans normal repos, diffs, prompts, actions, packages, SBOMs, MCP servers, and AI skills.
Does it send my source code anywhere?
Rule-based CLI and MCP scans are local. cr-agent uses the provider you choose for semantic review.
Is it a replacement for npm audit? No. It complements npm audit by catching AI-specific risks: hallucinated packages, prompt injection, MCP tool poisoning, unsafe agent actions, and vulnerable generated code.
What should I run first?
Run npx agent-security-scanner-mcp scan-project . --verbosity compact.
Links
License
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityAmaintenanceMCP security scanner for AI agents - detects prompt injection, secrets, PII, and vets MCP servers before installationLast updatedApache 2.0
- AlicenseAqualityFmaintenanceSecurity scanner for AI agent packages that enables AI agents to audit MCP servers and packages for vulnerabilities, prompt injection, and supply chain attacks.Last updated5243AGPL 3.0

AgentAuditofficial
Alicense-qualityDmaintenanceEnables AI agents to scan MCP servers and AI packages for vulnerabilities, prompt injection, and supply chain attacks.Last updated24AGPL 3.0- Alicense-qualityAmaintenanceReal security scanners for AI coding agents — SAST (441 rules), secret detection (419+ patterns), dependency CVEs (OSV.dev), MCP/skill vetting, MITRE ATT&CK. Open-source, Rust, freeLast updated27Apache 2.0
Related MCP Connectors
Zero-config MCP security scanner for AI-generated apps. 25K+ vulnerability patterns.
Security firewall for AI agents — scans MCP calls for injection, secrets, and risks.
Pay-per-call cybersecurity for AI agents: vuln scans, threat intel, compliance, code security.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/sinewaveai/agent-security-scanner-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server