
Snyk Agent Scan
OfficialScans AI agents, MCP servers, and agent skills for security vulnerabilities including prompt injections, malware payloads, and credential issues. Auto-discovers components from Claude, Cursor, Windsurf, and other agent platforms.
Security scanner for AI agents, MCP servers, and agent skills. Automatically scan code for vulnerabilities, license issues, and security risks in your AI-assisted development workflow. 1,700+ GitHub stars.
What it does
- Auto-discover MCP configurations and agent tools
- Scan for prompt injection vulnerabilities
- Detect malware payloads in natural language
- Check for credential handling issues
- Identify tool poisoning and shadowing attacks
- Scan Claude, Cursor, Windsurf, and Gemini CLI setups
Best for
About Snyk Agent Scan
Snyk Agent Scan is an official MCP server published by Snyk that provides AI assistants with tools and capabilities via the Model Context Protocol. Security scanner for AI agents, MCP servers, and agent skills. Automatically scan code for vulnerabilities, license issu It is categorized under auth security, developer tools.
How to install
You can install Snyk Agent Scan in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.
License
Snyk Agent Scan is released under the Apache-2.0 license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.
Snyk Agent Scan
Discover and scan agent components on your machine for prompt injections
and vulnerabilities (including agents, MCP servers, skills).
NEW Read our technical report on the emerging threats of the agent skill eco-system published together with Agent Scan 0.4, which adds support for scanning agent skills.
Agent Scan helps you keep an inventory of all your installed agent components (harnesses, MCP servers, skills) and scans them for common threats like prompt injections, sensitive data handling, or malware payloads hidden in natural language.
Highlights
- Auto-discover MCP configurations, agent tools, skills
- Scanning of Claude, Cursor, Windsurf, Gemini CLI, and other agents.
- Detects 15+ distinct security risks across MCP servers and agent skills:
Quick Start
To get started:
- Sign up at Snyk and get an API token from https://app.snyk.io/account (API Token → KEY → click to show).
- Set the token as an environment variable before running any scan:
export SNYK_TOKEN=your-api-token-here - Have uv installed on your system.
Scanning
To run a full scan of your machine (auto-discovers agents, MCP servers, skills), run:
uvx snyk-agent-scan@latest --skills
This will scan for security vulnerabilities in servers, skills, tools, prompts, and resources. It will automatically discover a variety of agent configurations, including Claude Code/Desktop, Cursor, Gemini CLI, and Windsurf. Omit --skills to skip skill analysis.
You can also scan particular configuration files:
# scan mcp configurations
uvx snyk-agent-scan@latest ~/.vscode/mcp.json
# scan a single agent skill
uvx snyk-agent-scan@latest --skills ~/path/to/my/SKILL.md
# scan all claude skills
uvx snyk-agent-scan@latest --skills ~/.claude/skills
Example Run
Scanner Capabilities
Agent Scan is a security scanning tool to both scan and inspect the supply chain of agent components on your machine. It scans for common security vulnerabilities like prompt injections, tool poisoning, toxic flows, or vulnerabilities in agent skills.
Agent Scan operates in two main modes which can be used jointly or separately:
-
Scan Mode: The CLI command
snyk-agent-scanscans the current machine for agents and agent components such as skills and MCP servers. Upon completion, it will output a comprehensive report for the user to review. -
Background Mode (MDM, Crowdstrike). Agent Scan scans the machine in regular intervals in the background, and reports the results to a Snyk Evo instance. This can be used by security teams to monitor the company-wide agent supply chain in a central location. To set this up, please contact us.
How It Works
Scanning
Agent Scan searches through your local agent's configuration files to find agents, skills, and MCP servers. For MCP, it connects to servers and retrieves tool descriptions.
It then validates the components, both with local checks and by invoking the Agent Scan API. For this, skills, agent applications, tool names, and descriptions are shared with Snyk. By using Agent Scan, you agree to the Snyk terms of use for Agent Scan.
A unique, persistent, and anonymous ID is assigned to your scans for analysis. You can opt out of sending this information using the --opt-out flag.
Agent Scan does not store or log any usage data, i.e. the contents and results of your MCP tool calls.
CLI Parameters
Agent Scan provides the following commands:
snyk-agent-scan - Security scanner for agents, MCP servers, and skills
Common Options
These options are available for all commands:
--storage-file FILE Path to store scan results and scanner state (default: ~/.mcp-scan)
--base-url URL Base URL for the verification server
--verbose Enable detailed logging output
--print-errors Show error details and tracebacks
--full-toxic-flows Show all tools that could take part in toxic flow. By default only the top 3 are shown.
--json Output results in JSON format instead of rich text
Commands
scan (default)
Scan MCP configurations for security vulnerabilities in tools, prompts, and resources.
snyk-agent-scan scan [CONFIG_FILE...]
Options:
--checks-per-server NUM Number of checks to perform on each server (default: 1)
--server-timeout SECONDS Seconds to wait before timing out server connections (default: 10)
--suppress-mcpserver-io BOOL Suppress stdout/stderr from MCP servers (default: True)
--skills Autodetects and analyzes skills
--skills PATH_TO_SKILL_MD_FILE Analyzes the specific skill
--skills PATHS_TO_DIRECTORY Recursively detects and analyzes all skills in the directory
inspect
Print descriptions of tools, prompts, and resources without verification.
snyk-agent-scan inspect [CONFIG_FILE...]
Options:
--server-timeout SECONDS Seconds to wait before timing out server connections (default: 10)
--suppress-mcpserver-io BOOL Suppress stdout/stderr from MCP servers (default: True)
help
Display detailed help information and examples.
snyk-agent-scan help
Examples
# Scan all known MCP configs
snyk-agent-scan
# Scan a specific config file
snyk-agent-scan ~/custom/config.json
# Just inspect tools without verification
snyk-agent-scan inspect
Demo
This repository includes a vulnerable MCP server that can demonstrate Model Context Protocol security issues that Agent Scan finds.
How to demo MCP security issues?
- Clone this repository
- Create an
mcp.jsonconfig file in the cloned git repository root directory with the following contents:
{
"mcpServers": {
"Demo MCP Server": {
"type": "stdio",
"command": "uv",
"args": ["run", "mcp", "run", "demoserver/server.py"],
},
},
}
- Run Agent Scan:
uvx --python 3.13 snyk-agent-scan@latest scan --full-toxic-flows mcp.json
Note: if you place the mcp.json configuration filepath elsewhere then adjust the args path inside the MCP server configuration to reflect the path to the MCP Server (demoserver/server.py) as well as the uvx command that runs Agent Scan with the correct filepath to mcp.json.
Agent Scan is closed to contributions
Agent Scan does not accept external contributions at this time.
We welcome suggestions, bug reports, or feature requests as GitHub issues.
Development Setup
To run Agent Scan from source, follow these steps:
uv run pip install -e .
uv run -m src.agent_scan.cli
Including Agent Scan results in your own project / registry
If you want to include Agent Scan results in your own project or registry, please reach out. There are designated APIs for this purpose. Using the standard Agent Scan API for large scale scanning is considered abuse and will result in your account being blocked.
Documentation
- Scanning — How scanning works, CLI parameters, and usage examples.
- Issue Codes — Reference for all security issues detected by Agent Scan.
Further Reading
- Introducing MCP-Scan
- MCP Security Notification Tool Poisoning Attacks
- WhatsApp MCP Exploited
- MCP Prompt Injection
- Toxic Flow Analysis
- Skills Report
Changelog
See CHANGELOG.md.
Alternatives
Related Skills
Browse all skillsSecurity audit and validation tools for the Agent Skills ecosystem. Scan skill packages for common vulnerabilities like credential leaks, unauthorized file access, and Git history secrets. Use when you need to audit skills for security before installation, validate skill packages against Agent Skills standards, or ensure your skills follow best practices.
Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin. it analyzes code for potential vulnerabilities like sql injection, xss, authentication flaws, and insecure dependencies. AI assistant uses this skill wh... Use when assessing security or running audits. Trigger with phrases like 'security scan', 'audit', or 'vulnerability'.
This skill allows Claude to conduct comprehensive security audits of code, infrastructure, and configurations. It leverages various tools within the security-pro-pack plugin, including vulnerability scanning, compliance checking, cryptography review, and infrastructure security analysis. Use this skill when a user requests a "security audit," "vulnerability assessment," "compliance review," or any task involving identifying and mitigating security risks. It helps to ensure code and systems adhere to security best practices and compliance standards.
Answer questions about the AI SDK and help build AI-powered features. Use when developers: (1) Ask about AI SDK functions like generateText, streamText, ToolLoopAgent, embed, or tools, (2) Want to build AI agents, chatbots, RAG systems, or text generation features, (3) Have questions about AI providers (OpenAI, Anthropic, Google, etc.), streaming, tool calling, structured output, or embeddings, (4) Use React hooks like useChat or useCompletion. Triggers on: "AI SDK", "Vercel AI SDK", "generateText", "streamText", "add AI to my app", "build an agent", "tool calling", "structured output", "useChat".
Use when working with the OpenAI API (Responses API) or OpenAI platform features (tools, streaming, Realtime API, auth, models, rate limits, MCP) and you need authoritative, up-to-date documentation (schemas, examples, limits, edge cases). Prefer the OpenAI Developer Documentation MCP server tools when available; otherwise guide the user to enable `openaiDeveloperDocs`.
Scan the agent workspace and memory logs for leaked API keys, tokens, or sensitive credentials. Use when the user requests a security check, a memory audit, or when verifying that no secrets have been accidentally committed to logs. Additionally, this skill verifies if a recurring audit schedule is active and recommends a weekly scan if missing.