Skip to content
MCP-Scan

MCP-Scan

NEW ACQUIRED
Category: AI Security
License: Free (Open-Source)
Suphi Cankurt
Suphi Cankurt
AppSec Enthusiast
Updated April 3, 2026
5 min read
Key Takeaways
  • Scans MCP server configurations for prompt injection, tool poisoning, tool shadowing, and cross-origin escalation attacks across Claude, Cursor, Windsurf, and other MCP clients.
  • Two operating modes: passive scan for one-time vulnerability checks, and active proxy for continuous runtime monitoring with guardrail enforcement.
  • Tool Pinning detects MCP rug pulls — silent changes to tool descriptions after installation — by tracking tool hashes over time.
  • Built by Invariant Labs (ETH Zurich spin-off), acquired by Snyk in June 2025. Now part of Snyk's agentic AI security stack.

MCP-Scan is an open-source security scanner that checks MCP (Model Context Protocol) server configurations for prompt injection, tool poisoning, cross-origin escalation, and rug pull attacks. It is the most widely adopted MCP security scanner, with over 2,000 GitHub stars, and serves as the foundation for Snyk’s enterprise Agent Scan product. The tool has been rebranded to Snyk Agent Scan following the acquisition, with the latest release being v0.4.13 (April 2026).

Built by Invariant Labs, an ETH Zurich spin-off co-founded in 2024 by professors Martin Vechev and Florian Tramer along with Marc Fischer, Mislav Balunovic, and Luca Beurer-Kellner, the project was one of the first tools built to address MCP security risks. The Invariant Labs team coined the term “tool poisoning” and documented several novel MCP attack vectors through their security research.

In June 2025, Snyk acquired Invariant Labs to accelerate its agentic AI security strategy. MCP-Scan remains open-source on GitHub and forms the foundation of Snyk’s broader Agent Scan product.

What is MCP-Scan?

MCP-Scan addresses a specific gap in the AI tooling ecosystem: MCP servers connect AI agents to external tools and data sources, but there was no standard way to verify that those connections are safe. A malicious or compromised MCP server can embed hidden instructions in tool descriptions, inject prompts that hijack agent behavior, or silently change its tools after installation.

The scanner works by reading local MCP configuration files, connecting to each configured server, retrieving tool descriptions, and analyzing them both locally and through the Invariant Guardrails API. It supports two operating modes for different security needs.

Prompt Injection & Tool Poisoning Detection
Analyzes MCP server tool descriptions for hidden malicious instructions, prompt injection payloads, and tool poisoning attacks. Uses both local checks and the Invariant Guardrails API to identify threats that could hijack agent behavior.
Tool Pinning (Rug Pull Prevention)
Tracks tool description hashes over time to detect MCP rug pulls — attacks where servers silently modify their tools after installation. Any change to a previously scanned tool triggers an alert, catching supply-chain-style attacks on MCP integrations.
Runtime Proxy Monitoring
The proxy mode sits between your MCP client and servers, monitoring all traffic in real time. Enforces guardrailing policies on tool calls and responses, including PII detection, secrets scanning, and custom rules — catching threats that static scans miss.

Key Features

FeatureDetails
Scan ModeOne-time static vulnerability check of configured MCP servers
Proxy ModeContinuous runtime monitoring and guardrail enforcement
Threat Detection15+ distinct security risks including prompt injection, tool poisoning, tool shadowing, toxic flows, cross-origin escalation
Tool PinningHash-based rug pull detection for installed tools
PII DetectionIdentifies personally identifiable information in MCP traffic
Secrets DetectionCatches exposed API keys, tokens, and credentials
Custom PoliciesUser-defined guardrailing rules for tool calls and responses
Client SupportClaude Desktop, Claude Code, Cursor, Windsurf, Gemini CLI, VS Code, OpenClaw, Kiro, Antigravity, Codex, Amazon Q
Platform SupportmacOS, Linux, Windows
Output FormatsTerminal report, JSON (for CI/CD integration)

Scan mode

The passive scan mode (mcp-scan scan) performs a one-time security audit of your MCP configuration. It reads the configuration files for your MCP client, connects to each server, retrieves tool descriptions, and checks them against known attack patterns. This is the quickest way to verify new MCP servers before trusting them with your AI agents.

Proxy mode

The active proxy mode (mcp-scan proxy) runs as a background service that intercepts all MCP traffic between your client and servers. Every tool call and response passes through the proxy, which applies guardrailing policies in real time. This catches dynamic attacks that only appear during actual tool execution — not in static tool descriptions.

Tool Pinning

One of MCP-Scan’s more novel features is Tool Pinning. When you first scan an MCP server, the tool hashes every tool description and stores the result. On subsequent scans, any change to a tool’s description triggers an alert. This directly addresses the “rug pull” attack vector: a server appears benign at installation time, then modifies its tool behavior later to inject malicious instructions.

CI/CD integration

MCP-Scan supports JSON output via the --json flag, so it fits naturally into automated pipelines. Teams building custom MCP server registries or internal tool catalogs can run MCP-Scan as a validation step before publishing new servers, catching vulnerabilities before they reach developers.

Invariant Labs research background

The team behind MCP-Scan pioneered much of the foundational MCP security research, coining terms like “tool poisoning” and “MCP rug pull” and publishing reproducible attack experiments. This research directly informed the scanner’s detection capabilities — each check maps to a real, demonstrated attack vector rather than theoretical risk.

Getting Started

1
Install MCP-Scan — Run uvx snyk-agent-scan@latest to install and run the scanner. Requires Python 3.13+ with uv package manager. A free Snyk account provides the API token needed for analysis.
2
Run your first scan — Execute snyk-agent-scan to automatically detect your MCP client configurations (Claude, Cursor, Windsurf, Gemini CLI, and more) and scan all configured servers for vulnerabilities. Use --skills to also scan agent skills.
3
Review findings — The scanner outputs a terminal report showing detected threats per server. Each finding includes the threat type (prompt injection, tool poisoning, etc.) and affected tool details.
4
Enable Tool Pinning — After the initial scan, tool hashes are stored locally. Future scans compare against these hashes to detect rug pull attacks — any silent changes to tool descriptions get flagged immediately.
5
Set up proxy monitoring — For continuous protection, run mcp-scan proxy as a background service. Configure guardrailing policies for PII detection, secrets scanning, and custom rules to enforce in real time.

When to use MCP-Scan

Best for anyone using MCP servers with AI coding assistants or agent frameworks. MCP-Scan is essential as the MCP ecosystem grows rapidly. The attack surface grows alongside the ecosystem — most MCP servers are community-contributed without formal security review. Running a scan before installing a new MCP server takes seconds and can prevent tool poisoning attacks that would otherwise silently compromise your AI agent’s behavior.

The proxy mode adds the most value for teams that use MCP servers in production workflows, where a one-time scan is not enough and continuous monitoring is needed to catch dynamic or time-delayed attacks.

Best for
Developers and security teams using MCP-enabled AI tools (Claude, Cursor, Windsurf) who need to verify that their MCP server integrations are safe from prompt injection, tool poisoning, and supply-chain attacks — especially when installing community-contributed servers.

For a broader overview of AI security tools, see the AI security tools guide. For authorization controls on MCP servers rather than vulnerability scanning, consider Cerbos. For a full agentic AI governance framework including MCP scanning, see Cisco DefenseClaw.

Note: Invariant Labs was acquired by Snyk in June 2025. MCP-Scan has been rebranded to Snyk Agent Scan (v0.4.13, April 2026) and is now part of Snyk's agentic AI security offering.

Frequently Asked Questions

What is MCP-Scan?
MCP-Scan is an open-source security tool that scans MCP (Model Context Protocol) server configurations for vulnerabilities like prompt injection, tool poisoning, and rug pulls. It was created by Invariant Labs, an ETH Zurich spin-off co-founded by professors Martin Vechev and Florian Tramer along with Marc Fischer, Mislav Balunovic, and Luca Beurer-Kellner. Later acquired by Snyk, MCP-Scan works with Claude Desktop, Cursor, Windsurf, and other MCP clients.
Is MCP-Scan free?
Yes, MCP-Scan is free and open-source under the Apache 2.0 license. The scan mode runs locally and uses the Invariant Guardrails API for analysis. Snyk also offers an enterprise-grade Agent Scan product that builds on MCP-Scan’s capabilities with continuous background monitoring.
What is an MCP rug pull?
An MCP rug pull is an attack where an MCP server silently changes its tool descriptions after installation. The tool appears safe during initial setup, but later modifies its behavior to inject malicious instructions. MCP-Scan’s Tool Pinning feature detects this by hashing tool descriptions and alerting on changes.