← Back to directory
A

Agent Security Scanner MCP Server

Community
Security scanning for AI coding agents.
GitHub source repository ↗
★ 121 Stars Category · Dev Tools Very popular Source revision 79e8779b4eec
49FMRS · D
Reliability
8/20
Security and permissions
10/20
Maintenance
8/20
Documentation
12/20
Setup experience
11/20

An MIT-licensed open-source security-scanning MCP server focused on AI-agent-specific risks, including prompt injection, MCP tool poisoning, package hallucinations, unsafe agent actions, and vulnerable generated code. The source confirms stdio transport and initialization commands for multiple clients, but does not provide a standalone authentication configuration example.

Read the FMRS scoring method →

Agent Security Scanner MCP Server is a stdio MCP server that checks code, MCP tools, prompts, and dependencies before an AI agent trusts them. It provides code and repository scanning, MCP server audits, prompt-injection detection, agent-action safety checks, package hallucination detection, SBOM and vulnerability scanning, compliance evidence evaluation, and auto-fix capabilities. Rule-based CLI and MCP scans run locally; semantic review uses the provider selected by the user.

Tools

scan_security
Scan a single file for security issues.
fix_security
Automatically fix security issues that support remediation.
scan_git_diff
Scan Git changes for security issues.
scan_project
Scan a complete project and produce an A-F security grade.
scan_mcp_server
Audit an MCP server before installation for tool and attack risks.
scan_skill
Scan an AI skill for security issues.
scan_agent_prompt
Detect prompt injection and jailbreak attempts.
scan_agent_action
Check shell, file, and network actions for safety before execution.
check_package
Verify whether a package exists in a specified ecosystem.
scan_packages
Verify imports or dependencies in a file to help detect package hallucinations.
sbom_generate
Generate a CycloneDX software bill of materials.
sbom_scan_vulnerabilities
Scan dependencies for vulnerabilities using OSV.dev.
sbom_diff
Compare software bill of materials differences.
sbom_export_report
Export an SBOM scan report.
get_compliance_controls
Retrieve technical compliance controls for SOC 2, GDPR, or AIUC-1.
evaluate_compliance
Evaluate technical compliance and generate evidence for a project.
scanner_health
Check scanner runtime health.

Setup

Run npx agent-security-scanner-mcp init claude-code, replacing claude-code with cursor, claude-desktop, windsurf, cline, kilo-code, opencode, or cody. Restart the client afterward. You can also run npx agent-security-scanner-mcp init to use the interactive picker.

Fit and risk

Best for

  • Developers using Claude Code, Cursor, Windsurf, Cline, OpenCode, or another supported AI coding client
  • Teams reviewing AI-generated code, MCP tools, prompts, and supply-chain risks
  • Teams needing security evidence before CI, releases, or vendor reviews

Not for

  • Users who only need traditional dependency vulnerability scanning
  • Users looking for a replacement for npm audit
  • Users needing hosted semantic review without configuring a model provider

Required permissions

  • Read access to projects, files, Git diffs, MCP servers, or dependency data being scanned
  • The auto-fix capability may require write access to project files
  • Semantic review uses the model provider selected by the user

Risks and side effects

  • AI-generated code may introduce SQL injection, XSS, command injection, unsafe cryptography, or secrets
  • MCP tools may contain description injection, tool-name spoofing, environment-variable exposure, or command-execution risks
  • AI-generated package names may not exist, creating package-squatting or dependency-confusion risks
  • Semantic review sends relevant content to the selected provider; rule-based scans and MCP scans run locally

Troubleshooting

  1. Run doctor to check local setup health
  2. Restart the configured AI client after initialization
  3. Run npx agent-security-scanner-mcp scan-project . --verbosity compact to verify the installation
  4. Use a supported client name: claude-code, cursor, claude-desktop, windsurf, cline, kilo-code, opencode, or cody
  5. Adjust output detail with minimal, compact, or full verbosity

Use cases

Scan AI-generated project code and diffs
Audit MCP servers before installation
Detect prompt injection and unsafe agent actions
Verify AI-suggested dependencies
Generate SBOMs, scan CVEs, and evaluate compliance

Supported clients

Claude CodeFull support
CursorFull support
Claude DesktopFull support
WindsurfFull support
ClineFull support
Kilo CodeFull support
OpenCodeFull support
CodyFull support