# agent-security-scanner-mcp [Health: Active]

**Category:** 🔒 Security  
**Repository:** https://github.com/sinewaveai/agent-security-scanner-mcp  
**GitHub Stars:** 124  
**npm Downloads (last month):** 5057  
**Views:** 4  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/agent-security-scanner-mcp

## Description
Security layer for AI agents: blocks prompt injection, detects fake packages, scans vulnerabilities.

## Tools
Capabilities this server exposes over MCP:

- **scan_security** — Scan a file for security vulnerabilities. Use verbosity='minimal' for counts only (~50 tokens), 'compact' (default) for actionable info (~200 tokens), 'full' for complete metadata.
- **fix_security** — Scan a file and return fixes. Use verbosity='minimal' for summary only, 'compact' (default) for fix list, 'full' for complete fixed file content.
- **record_security_outcome** — Record aggregate remediation outcomes after reviewing scanner findings. Sends counts only; never sends code, findings, paths, or rule IDs.
- **list_security_rules** — List all available security fix templates and their descriptions
- **check_package** — Check if a package name is legitimate or potentially hallucinated (AI-invented)
- **scan_packages** — Scan code for package imports and check for hallucinated (AI-invented) packages. Use verbosity='minimal' for counts, 'compact' (default) for flagged packages, 'full' for all details.
- **list_package_stats** — List statistics about loaded package lists for hallucination detection
- **scan_agent_prompt** — Scan a prompt for malicious intent. Returns BLOCK/WARN/LOG/ALLOW. Use verbosity='minimal' for action only, 'compact' (default) for findings, 'full' for audit details.
- **scan_git_diff** — Scan git diff for new security vulnerabilities. Only reports issues on changed lines. Use for PR reviews.
- **scan_project** — Scan an entire directory for security vulnerabilities with .gitignore support and security grading. Use verbosity='minimal' for grade + counts, 'compact' (default) for top issues, 'full' for all details.
- **scan_agent_action** — Pre-execution security check for agent actions (bash, file_write, file_read, http_request, file_delete, cron, process_spawn, git, docker). Returns ALLOW/WARN/BLOCK.
- **scan_mcp_server** — Scan an MCP server's source code for security vulnerabilities: overly broad permissions, missing input validation, data exfiltration, insecure patterns. Returns grade (A-F) and recommendations.
- **scan_skill** — Deep security scan of an OpenClaw skill. Multi-layer analysis: prompt injection detection, code analysis (AST+taint), ClawHavoc malware signatures, package supply chain verification, rug pull detection. Returns security grade A-F with detailed findings.
- **scanner_health** — Check plugin health: engine status, daemon status, package data availability
- **clawproof_health** — Alias for scanner_health (deprecated, use scanner_health instead)
- **score_aivss** — Score findings using OWASP AIVSS v2. Accepts any scanner output or raw findings JSON. Returns per-finding AIVSS scores (0-10) and aggregate posture. Use verbosity='minimal' for posture only, 'compact' (default) for scores, 'full' for all metrics.
- **get_compliance_controls** — Look up compliance controls with evaluation criteria. Supports multiple frameworks: aiuc-1 (default), soc2-technical, gdpr-technical. Filter by domain, control IDs, or OWASP LLM tags.
- **evaluate_compliance** — Evaluate a project against compliance frameworks (SOC2-technical, GDPR-technical, AIUC-1). Collects evidence from code scans, SBOM, vulnerability checks, and hallucination detection, then evaluates controls. Optionally saves timestamped evidence bundle.
- **sbom_generate** — Generate a CycloneDX v1.5 SBOM for a project. Discovers all dependencies (direct + transitive) from lock files and manifests across Node.js, Python, Go, Rust, Ruby, Java. Use verbosity='minimal' for counts, 'compact' (default) for component list, 'full' for complete CycloneDX JSON.
- **sbom_scan_vulnerabilities** — Cross-reference SBOM components against OSV.dev vulnerability database. Returns CVE IDs, CVSS scores, severity, and fix recommendations. Accepts directory_path (generates fresh) or sbom_path (loads saved artifact).
- **sbom_check_hallucinations** — Check all packages in an SBOM against official registries to detect hallucinated (AI-invented) package names. Supports npm, pypi, rubygems, dart, perl, raku, crates. Go/Java marked as unsupported.
- **sbom_diff** — Compare current project SBOM against a stored baseline. Reports added, removed, and version-changed packages. Use save_baseline=true to create initial baseline.
- **sbom_export_report** — Generate an HTML or JSON audit report from SBOM data, optionally enriched with vulnerability scan results. Suitable for PCI-DSS and compliance audits.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "agent-security-scanner-mcp": {
    "command": "npx",
    "args": ["-y","agent-security-scanner-mcp"]
  }
}
```

## Documentation

## What agent-security-scanner-mcp MCP server does

The agent-security-scanner-mcp MCP server examines code, repositories, MCP servers, prompts, agent actions, and package references for security and supply-chain risks. It is intended for workflows where an AI coding agent may trust new code, tools, documentation, dependencies, or generated commands.

Project and file scans can identify issues such as SQL injection, cross-site scripting, command injection, unsafe cryptography, and exposed secrets. MCP audits look for risks including instruction-like text in tool descriptions, names that resemble known tools, command execution concerns, and possible environment-variable exposure. Prompt and action checks address injection, jailbreak attempts, and potentially unsafe shell, file, or network operations.

Package checks verify whether AI-suggested imports or dependencies exist. SBOM commands generate CycloneDX data and scan dependencies through OSV.dev.

## How it works

The scanner is distributed as an npm package and can be run with `npx`. It accepts a project directory, file, diff range, MCP server path, prompt, action type, package name, or dependency file depending on the command. Output supports minimal counts, compact findings for agents and people, or full audit detail.

Project scans return an A-F security grade with findings. Diff scans focus on changed files, while semantic review uses project intent to identify context-aware issues when rule-based checks are insufficient. The package also includes commands for generating shareable scan material, exporting Vanta evidence, checking local setup health, and evaluating technical compliance controls.

## Setup and configuration

Run a project scan directly with `npx agent-security-scanner-mcp scan-project .`. Use `init` to install the scanner into Claude Code, Cursor, Claude Desktop, Windsurf, or Cline, then restart the client so the agent can call it as an MCP tool. The repository also documents setup commands for Kilo Code, OpenCode, and Cody, which are outside the compatible-client list used here.

For CI, `init-ci github` generates a GitHub workflow. A local demo can create test fixtures, scan them, and remove them afterward.

## Tools and capabilities

The agent-security-scanner-mcp MCP server exposes these tool families:

- `scan_security`, `fix_security`, `scan_git_diff`, and `scan_project` for repository and code security.
- `scan_mcp_server` and `scan_skill` for MCP and AI skill audits.
- `scan_agent_prompt` and `scan_agent_action` for prompt and action safety checks.
- `check_package` and `scan_packages` for package-existence and import verification.
- `sbom_generate`, `sbom_scan_vulnerabilities`, `sbom_diff`, and `sbom_export_report` for supply-chain evidence.
- `get_compliance_controls` and `evaluate_compliance` for SOC 2, GDPR, and AIUC-1 technical evidence.
- `scanner_health` for runtime diagnostics.

The CLI additionally provides `doctor`, `quickstart`, `share-kit`, and `export-vanta`. A bundled `cr-agent` command performs LLM-assisted semantic review and can emit SARIF output.

## Limitations and notes

The material describes detection and review workflows; it does not establish that every finding is automatically fixed or that a scan proves a project is secure. Package verification checks whether names exist, which addresses hallucinated or nonexistent packages but does not by itself establish that a dependency is safe.

The documented client setup covers Claude Code, Cursor, Claude Desktop, Windsurf, and Cline, with additional commands shown for other clients.

_Full upstream README: https://allmcps.com/mcp/agent-security-scanner-mcp/readme_

