freshcrate
Home > MCP Servers > mcp-scan

mcp-scan

Security scanner for MCP server configurations. Detects secrets, CVEs, permission issues, and exfiltration vectors across 10 AI tool clients.

Description

Security scanner for MCP server configurations. Detects secrets, CVEs, permission issues, and exfiltration vectors across 10 AI tool clients.

README

mcp-scan

CI npm version npm downloads License: MIT GitHub StarsOpen-source security scanner for Model Context Protocol (MCP) servers.

MCP servers run with full access to your filesystem, API keys, and network. mcp-scan audits every MCP server configuration on your system โ€” detecting leaked secrets, prompt injection risks, supply-chain vulnerabilities, and data flow issues before they become incidents.

npx mcp-scan@latest

No installation. No sign-up. No telemetry. Zero network requests during scanning.


MCP servers are the new attack surface for AI-powered development. They run silently alongside your AI tools with shell access, filesystem permissions, and network egress. A single malicious or misconfigured server can exfiltrate API keys, inject instructions into your AI sessions, or become a supply-chain entry point.

mcp-scan was built after analyzing hundreds of publicly available MCP server configs and finding patterns that existing security tools miss: credential relay, prompt injection via tool descriptions, typosquatting near popular packages, and data sent to unexpected endpoints.

Featured in Stytch Engineering Blog: "npm-audit for MCP security: A deep-dive on mcp-scan"


What It Detects

Check Severity Description
Data Exfiltration CRITICAL Tool reads filesystem/DB/clipboard and sends data to a network endpoint
Credential Relay CRITICAL Environment variables or secrets passed to external APIs or processes
Known Malicious Package CRITICAL Config references packages on the known-bad list
Exposed Secret CRITICAL Hardcoded API keys, tokens, or passwords in config
Prompt Injection HIGH Instructions embedded in tool names or descriptions
Obfuscated Network HIGH Server uses base64, hex, or reversed URLs to hide endpoints
Data-in-URL Exfil HIGH Potential exfiltration via long strings in URL query parameters
Typosquatting HIGH Package name closely resembles a trusted popular package
Supply Chain Risk HIGH Low-trust package with no history, stars, or maintainers
PII Exposure HIGH Server handles sensitive personal data without proper controls
Outdated Package MEDIUM Package has known vulnerabilities in the installed version
Overly Broad Permissions MEDIUM Server requests filesystem or shell access it does not need
Telemetry Tracking MEDIUM Server contacts known analytics or tracking domains
Privacy Gaps MEDIUM Missing data retention, deletion, or encryption-at-rest policies
Unverified Source LOW Package not from a verified registry or organization
Data Minimization LOW Tool requests significantly more data fields than necessary
Missing Transport LOW MCP server communicates over unencrypted transport

Supported AI Tools

mcp-scan automatically detects configurations for 16+ AI tool clients:

Category Tools
AI Assistants Claude Desktop, Claude Code, Gemini CLI, Codex CLI
Editors VS Code, Cursor, Windsurf, Zed
AI Coding Tools Cline, Roo Code, Continue, Amp, Plandex
Other ChatGPT Desktop, GitHub Copilot

v2.0 Features

  • Data Flow Analysis โ€” Trace where your data goes after MCP processes it
  • Network Egress Monitor โ€” See every endpoint your servers contact
  • Privacy Assessment โ€” One-command PII and compliance report
  • Policy Engine โ€” Custom security rules in .mcp-scan-policy.yml
  • Compliance Mapping โ€” SOC 2, GDPR, HIPAA, PCI-DSS, NIST 800-53
  • SBOM Generation โ€” CycloneDX and SPDX output
  • GitHub Action โ€” Scan on every PR with SARIF upload to GitHub Security tab
  • 17+ Scanners โ€” Secrets, supply chain, prompt injection, data flow, and more

All Commands

# Full security scan (auto-detects all AI tool configs)
npx mcp-scan@latest

# Output as JSON for CI/CD pipelines
npx mcp-scan@latest --json

# Privacy impact assessment and data map
npx mcp-scan@latest privacy

# Compliance report (SOC 2, GDPR, HIPAA, PCI-DSS, NIST 800-53)
npx mcp-scan@latest compliance

# Software Bill of Materials (CycloneDX or SPDX)
npx mcp-scan@latest sbom

# Validate custom security policies
npx mcp-scan@latest policy

# CI mode โ€” exit 1 if findings above threshold
npx mcp-scan@latest --ci --severity-threshold HIGH

GitHub Actions Integration

Add mcp-scan to your CI pipeline. Results appear in the GitHub Security tab via SARIF 2.1.0:

steps:
  - uses: actions/checkout@v4

  - name: Scan MCP configurations
    uses: rodolfboctor/mcp-scan@v2
    with:
      severity-threshold: MEDIUM
      sarif-upload: true

Custom Security Policies

Define your own rules in .mcp-scan-policy.yml:

rules:
  - name: no-external-endpoints
    description: Block servers contacting endpoints outside your org domain
    match:
      network_egress:
        not_in_domain: "*.mycompany.com"
    severity: HIGH

  - name: require-approved-packages
    description: Only allow packages from your approved list
    match:
      package:
        not_in_allowlist: true
    severity: CRITICAL

Compliance Mapping

Framework Controls Covered
SOC 2 CC6.1, CC6.6, CC6.7, CC7.1
GDPR Art. 25, Art. 32, Art. 33
HIPAA 164.312(a)(1), 164.312(e)(1)
PCI-DSS Req. 6, Req. 10, Req. 11
NIST 800-53 CA-7, RA-5, SA-11, SI-2

Privacy & Security Architecture

mcp-scan runs entirely locally. It reads config files from disk, performs all analysis in-process, and never sends data anywhere.

  • Zero network requests during scanning
  • No API keys required
  • No data leaves your machine
  • No account or sign-up needed
  • Fully open source โ€” audit the code yourself

Roadmap

  • v2.1 โ€” Runtime Monitoring
  • v2.2 โ€” Sandboxed Execution
  • v2.3 โ€” Real-Time Alerting

Installation

Use without installing (always latest version):

npx mcp-scan@latest

Install globally:

npm install -g mcp-scan
mcp-scan

Contributing

Issues and PRs welcome. See CONTRIBUTING.md for guidelines.

For security disclosures: see SECURITY.md.


License

MIT โ€” built by Abanoub Rodolf Boctor ยท ThynkQ

Release History

VersionChangesUrgencyDate
v2.0.0# mcp-scan v2.0: Data Controls for MCP Servers MCP servers run with full access to your filesystem, your API keys, and your network. Until now, there was no way to know where your data goes after an MCP server processes it. mcp-scan v2.0 changes that. ## What's new **Data Flow Analyzer** - Static analysis that traces data from sensitive sources (filesystem reads, environment variables, clipboard) to external sinks (HTTP endpoints, process execution). If an MCP server can read your files and aMedium3/28/2026

Dependencies & License Audit

Loading dependencies...

Similar Packages

terminal-mcp๐Ÿ–ฅ๏ธ Enhance your terminal interactions by allowing AI to see and control your session for real-time debugging and automation.main@2026-04-21
mcp-tidy๐Ÿงน Simplify your MCP servers with mcp-tidy, clearing server bloat to enhance performance and improve tool selection in Claude Code.main@2026-04-21
toolhive-studioToolHive is an application that allows you to install, manage and run MCP servers and connect them to AI agentsv0.30.0
website-design-systems-mcp๐ŸŽจ Extract complete design systems from websites and generate AI-ready skill.md files to replicate exact design elements efficiently.main@2026-04-21
google-workspace-mcp-with-scriptNo descriptionmain@2026-04-21