Skip to main content

Agent supply chain security scanner.

Project description

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.

snyk-agent-scan snyk-agent-scan license snyk-agent-scan python version requirements

Agent Scan logo

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 MCP Security Vulnerabilities:
    • Prompt Injection Attacks
    • Tool Poisoning Attacks
    • Cross-origin escalation attacks (e.g. tool shadowing)
    • Toxic Flows
    • MCP rug pull attacks (detects changes to MCP tools via hashing)
  • Detects Agent Skill Vulnerabilities:
    • Prompt Injection Attacks, Malware Payloads
    • Exposure to untrusted third parties (e.g. moltbook)
    • Sensitive Data Handling
    • Hard-coded secrets

Quick Start

To get started, make sure you 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

Agent Scan security vulnerabilities demo

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:

  1. Scan Mode: The CLI command snyk-agent-scan scans 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.

  2. 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?

  1. Clone this repository
  2. Create an mcp.json config 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"],
    },
  },
}
  1. 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.

Further Reading

Changelog

See CHANGELOG.md.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

snyk_agent_scan-0.0.1.tar.gz (1.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

snyk_agent_scan-0.0.1-py3-none-any.whl (64.8 kB view details)

Uploaded Python 3

File details

Details for the file snyk_agent_scan-0.0.1.tar.gz.

File metadata

  • Download URL: snyk_agent_scan-0.0.1.tar.gz
  • Upload date:
  • Size: 1.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for snyk_agent_scan-0.0.1.tar.gz
Algorithm Hash digest
SHA256 a0f5fae5f18a6152fd717450820bb7d0751b4f2dc674d954f92a62248e18ebaf
MD5 2690c909edb5692c5093f1e5f7fb6918
BLAKE2b-256 7d39f01cc66f0045731a7a492e4ca570fd939b9feb7234eca2c2589aab0c85e7

See more details on using hashes here.

File details

Details for the file snyk_agent_scan-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: snyk_agent_scan-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 64.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for snyk_agent_scan-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2aeac9a1609f82f6945f36c146a9ad1b2de6e234786c6125ba0a577f17be603f
MD5 1e27c55cba80cf8048d6965bcbf76578
BLAKE2b-256 56e079a78d867b9abfb2ac41897548c6c6c413acf078d4a1a0035ed031c697a9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page