agent-security-scanner-mcp

security MCP Server

Security scanner MCP server for AI coding agents. Prompt injection firewall, package hallucination detection (4.3M+ packages), 1000+ vulnerability rules with AST & taint analysis, auto-fix.

VerifiedInstall ReadyReviewed
securitysecurity
4 views111 stars10 forksv4.4.5MIT

Why This Matters

Discovered via github-seeds:mcp-hot and last synced 3mo ago.

VerifiedInstall ReadyReviewed
Source
github-seeds:mcp-hot
Stars
111
Last synced
3mo ago
Install
Instructions detected

Install

1. Install the package

npx -y agent-security-scanner-mcp

2. Add to claude_desktop_config.json

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

Config file location: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) / %APPDATA%\Claude\claude_desktop_config.json (Windows)

132
Tools
0
Resources
0
Prompts
Standard I/O
Transport

Available Tools (132)

SOC2-T005

Data exfiltration/exposure below threshold

Hallucinations

`sbom_check_hallucinations`

CRITICAL

85-100

Framework

Controls

GDPR-T001

Sensitive data exposure below threshold

bash

Destructive ops (rm -rf), RCE (curl\

scan_git_diff

Scan only changed files in git diff

GDPR-T002

Data exfiltration below threshold

Score

Action

Obfuscation

Base64 encoded commands, ROT13, fragmented instructions

fix_security

Auto-fix all detected vulnerabilities (120 fix templates)

scanner_health

Check plugin health: engine status, daemon status, package data availability

Operator

Description

check_package

Verify a package name isn't AI-hallucinated (4.3M+ packages)

scan_agent_action

Pre-execution safety check for agent actions (bash, file ops, HTTP). Returns ALLOW/WARN/BLOCK

sbom_export_report

Generate HTML or JSON audit report from SBOM with vulnerability data

sbom_diff

Compare current SBOM against baseline, detect added/removed/changed packages

8

Supply chain, code security, crypto, auth, drift

SOC2-T006

Cryptographic controls adequate

GDPR-T005

No critical third-party vulnerabilities

exists

Path value is present and non-null

sbom_check_hallucinations

Verify all SBOM packages exist in official registries

6

Data privacy, encryption, third-party risks

SOC2-T007

Authentication/authorization adequate

GDPR-T006

No hallucinated packages

eq

Exact equality

file_delete

Deleting sensitive or system paths

skill_path

string

target

string

A

0 critical/error issues

Python

SQL injection, command injection, deserialization, SSRF, path traversal

scan_project

Scan entire project with A-F security grading

list_security_rules

List available security rules and fix templates

Anthropic

✅ `ANTHROPIC_API_KEY`

SOC2-T004

No critical code security findings

GDPR-T003

Encryption/transport adequate

Drift

`sbom_diff`

file_path

string

package_name

string

context

object

Category

Examples

file_write

Writing to sensitive paths (/etc, /root, ~/.ssh)

update_baseline

boolean

Keyloggers

CGEventTapCreate, pynput, SetWindowsHookEx, NSEvent.addGlobalMonitor

exclude_patterns

array

scan_skill

Deep security scan of an OpenClaw skill: prompt injection, AST+taint code analysis, ClawHavoc malware signatures, supply chain, rug pull. Returns A-F grade

SOC2-T008

Dependency drift tracked

Source

Tools Used

lte

Less than or equal

HIGH

65-84

action_type

string

B

1-2 error issues, no critical

Java

SQL injection, XXE, LDAP injection, insecure deserialization, CSRF

Cursor

`npx agent-security-scanner-mcp init cursor`

Option

Type

Property

Value

Recommended

Why

sbom_generate

Generate CycloneDX v1.5 SBOM for a project (8 lock file formats, 7 manifest formats)

Provider

API Key Required

SOC2-T003

No hallucinated packages

prompt_text

string

NONE

0-19

manifest

boolean

include_patterns

array

F

11+ error issues or any critical

Regex

## Hallucination Detection Ecosystems

OpenCode

`npx agent-security-scanner-mcp init opencode`

severity_threshold

string

evaluate_compliance

Evaluate project against compliance frameworks with evidence collection

Gemfile

—

SOC2-T001

Software dependency inventory exists

Title

What It Checks

SBOM

`sbom_generate`

gte

Greater than or equal

MEDIUM

40-64

action_value

string

server_path

string

C

3-5 error issues

Go

SQL injection, command injection, path traversal, race conditions

Windsurf

`npx agent-security-scanner-mcp init windsurf`

suppress

array

Level

Tokens

Pattern

Build Tool

SOC2-T002

No critical dependency vulnerabilities

Vulnerabilities

`sbom_scan_vulnerabilities`

Vulnerability

Fix Strategy

LOW

20-39

verbosity

string

Layer

What It Checks

directory

string

D

6-10 error issues

PHP

SQL injection, XSS, command injection, deserialization, file inclusion

Cline

`npx agent-security-scanner-mcp init cline`

exclude

array

minimal

Aggregate results, avoid context overflow

16

AI agent security, prompt injection, hallucination

GDPR-T004

Third-party dependency inventory

output_format

string

ecosystem

string

file_read

Reading sensitive paths (private keys, credentials, /etc/passwd)

JavaScript

SQL injection, XSS, command injection, prototype pollution, insecure crypto

npm

~3.3M

Interactive

`npx agent-security-scanner-mcp init`

http_request

Requests to private IP ranges, suspicious exfiltration endpoints

base

string

Grade

Criteria

TypeScript

Same as JavaScript + type-specific patterns

PyPI

~554K

Flag

Description

Threat

What Happens

Language

Vulnerabilities Detected

Packages

Detection Method

Cody

`npx agent-security-scanner-mcp init cody`

context_filtering

boolean

full

Need complete audit trail

Included

> **Two package variants:** The base package (`agent-security-scanner-mcp`, 2.7 MB) includes 6 ecosystems. npm hallucination detection requires the full package (`agent-security-scanner-mcp-full`, 10.3 MB) because the npm registry bloom filter is 7.6 MB. --- ## Installation ### Install ```bash npm install -g agent-security-scanner-mcp ``` Or use directly with `npx` — no install required: ```bash npx agent-security-scanner-mcp ``` ### Prerequisites - **Node.js >= 18.0.0** (required) - **Python 3.x** (required for analyzer engine) - **PyYAML** (`pip install pyyaml`) — required for rule loading - **tree-sitter** (optional, for enhanced AST detection): `pip install tree-sitter tree-sitter-python tree-sitter-javascript` ### Client Setup

Client

Path

Scenario

Behavior

baseline

### Example Usage ```json // Minimal - just counts (~50 tokens) { "file_path": "app.py", "verbosity": "minimal" } // Returns: { "total": 5, "critical": 2, "warning": 3, "message": "Found 5 issue(s)" } // Compact - actionable info (~200 tokens, default) { "file_path": "app.py", "verbosity": "compact" } // Returns: { "issues": [{ "line": 42, "ruleId": "...", "severity": "error", "fix": "..." }] } // Full - complete metadata (~2,500 tokens) { "file_path": "app.py", "verbosity": "full" } // Returns: { "issues": [{ ...all fields including CWE, OWASP, references }] } ``` ### Recommended Verbosity by Scenario

Tool

minimal

OpenAI

✅ `OPENAI_API_KEY`

Parameter

Type

scan_packages

Bulk-check all imports in a file for hallucinated packages

sbom_scan_vulnerabilities

Cross-reference SBOM against OSV.dev for CVEs with severity filtering

compact

Need line numbers and fix suggestions

scan_security

98% reduction

scan_mcp_server

Scan MCP server source for vulnerabilities: unicode poisoning, name spoofing, rug pull detection, manifest analysis. Returns A-F grade

scan_agent_prompt

📖 Full documentation: [`code-review-agent/README.md`](./code-review-agent/README.md) --- ## 📦 SBOM / Supply Chain Analysis (New in v4.1.0) Generate Software Bill of Materials (SBOM) and analyze dependencies for vulnerabilities across your entire supply chain. ### Quick Start ```bash # Generate SBOM for current project npx agent-security-scanner-mcp sbom-generate . # Scan for vulnerabilities against OSV.dev npx agent-security-scanner-mcp sbom-vulnerabilities . # Check for hallucinated packages npx agent-security-scanner-mcp sbom-check-hallucinations . # Compare against baseline (CI/CD) npx agent-security-scanner-mcp sbom-diff . --save-baseline # First run npx agent-security-scanner-mcp sbom-diff . # Subsequent runs # Generate HTML audit report npx agent-security-scanner-mcp sbom-report . --format html ``` ### Supported Ecosystems

Exfiltration

Send code to webhook, read .env files, push to external repo

get_compliance_controls

Look up compliance controls with evaluation criteria (AIUC-1, SOC2, GDPR)

Manifests

CLI Fallback

Edit

MultiEdit", "command": "npx agent-security-scanner-mcp scan-security \"$TOOL_INPUT_file_path\" --verbosity minimal" } ] } } ``` ### Hook Behavior - **Non-blocking:** Hooks report findings but don't prevent file writes - **Minimal output:** Uses `--verbosity minimal` to avoid context overflow - **Automatic:** Runs on every file modification without manual intervention --- ## OpenClaw Integration [OpenClaw](https://openclaw.ai) is an autonomous AI assistant with broad system access. This scanner provides security guardrails for OpenClaw users. ### Install ```bash npx agent-security-scanner-mcp init openclaw ``` This installs a skill to `~/.openclaw/workspace/skills/security-scanner/`. ### OpenClaw-Specific Threats The scanner includes 30+ rules targeting OpenClaw's unique attack surface: