Snyk Agent Scan logo

Snyk Agent Scan

OrganizationPopular
snyk

Security scanner for AI agents, MCP servers and agent skills.

Publishersnyk
Repositoryagent-scan
LanguagePython
Forks
219
Stars
2.4K
Available tools
0
Transport typestdio
Categories
LicenseApache-2.0
Links
  • Connect tools to AI workflows

    Snyk Agent Scan exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    2.4K stars and 219 forks from the linked repository.

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, and skills) and scans them for common threats like prompt injections, sensitive data handling, or malware payloads hidden in natural language. Ignore analysis on skills by using --no-skills.

Security Warning

⚠️ IMPORTANT: Scanning MCP configurations will execute the commands defined in them.

When Agent Scan scans an MCP configuration file, it starts the stdio MCP servers by executing the commands and arguments specified in the config. This is necessary to retrieve tool descriptions and perform security analysis.

Recommendations:

  • Run scans inside a sandbox (Docker container, VM, or disposable environment) when evaluating untrusted or third-party MCP configs
  • Review the consent prompt carefully during interactive scans, it shows the exact command and arguments that will be executed for each server
  • Use --dangerously-run-mcp-servers only in trusted environments where you've verified all MCP server commands

By default, Agent Scan requires explicit user consent (y/n) before starting each stdio MCP server during interactive runs. This gives you control over what gets executed on your system.

Highlights

Supported agents and capabilities

Agent Scan auto-discovers agents and their capabilities (MCP servers or skills) when their install paths exist. The table reflects well-known agent definitions.

  • : at least one path is defined for that capability.
  • : the agent is listed for that OS but has no paths for that capability.
  • : that agent is not included for that OS.
  • Skills Skills can be ignored by using --no-skills
AgentmacOS MCPmacOS SkillsLinux MCPLinux SkillsWindows MCPWindows Skills
Windsurf
Cursor
VS Code
Claude Desktop
Claude Code
Gemini CLI
OpenClaw
Amp
Kiro
OpenCode
Antigravity
Codex
Amazon Q✓ (WSL)

Quick Start

To get started:

  1. Sign up at Snyk and get an API token from https://app.snyk.io/account (API Token → KEY → click to show).
  2. Set the token as an environment variable before running any scan:
    bash
    export SNYK_TOKEN=your-api-token-here
  3. Have uv installed on your system.

Scanning

To run a full scan of your machine (auto-discovers agents, MCP servers, skills), run:

bash
uvx snyk-agent-scan@latest

This will scan for security vulnerabilities in MCP servers, tools, prompts, and resources. It will automatically discover a variety of agent configurations, including Claude Code/Desktop, Cursor, Gemini CLI, and Windsurf.

bash
uvx snyk-agent-scan@latest

You can also scan particular MCP configuration files or skills:

bash
# scan a specific mcp configuration
uvx snyk-agent-scan@latest ~/.vscode/mcp.json
# scan a single agent skill
uvx snyk-agent-scan@latest ~/path/to/my/SKILL.md
# scan all claude skills
uvx snyk-agent-scan@latest ~/.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.

Interactive Consent for MCP Servers

⚠️ Security Note: Scanning an MCP config executes the commands defined in it. Always review what will be executed before approving.

By default, Agent Scan prompts for user consent before starting each stdio MCP server during interactive runs. This consent flow:

  • Shows the server name, command, and environment variables (redacted) that will be executed
  • Allows you to approve or decline each server individually
  • Prevents potentially untrusted servers from running without your explicit permission
  • Records declined servers with a user_declined error (they are never started)

Best Practices:

  • Review the command and arguments carefully before approving
  • When scanning untrusted or third-party MCP configs, run Agent Scan inside a sandbox (Docker, VM, or disposable environment)
  • Decline any servers with unfamiliar or suspicious commands

For non-interactive environments (e.g., CI/CD pipelines), you must use the --dangerously-run-mcp-servers flag to bypass the consent prompt and start all servers automatically. Only use this flag in trusted environments where all MCP server commands have been verified.

Analysis and Validation

Agent Scan 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.

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
--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 stderr from stdio MCP servers (stdout carries the JSON-RPC protocol
                                  and is never shown). Default: False for interactive runs (stderr is streamed
                                  with a [server-name] prefix), True otherwise.
--dangerously-run-mcp-servers     ⚠️ DANGER: Skip the interactive consent prompt and automatically start every
                                  stdio MCP server listed in the scanned configs. Only use in trusted
                                  environments where you've verified all MCP server commands.
--no-skills                       Skip analysis on skills.

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 stderr from stdio MCP servers (stdout carries the JSON-RPC protocol
                                  and is never shown). Default: False for interactive runs (stderr is streamed
                                  with a [server-name] prefix), True otherwise.
--dangerously-run-mcp-servers     ⚠️ DANGER: Skip the interactive consent prompt and automatically start every
                                  stdio MCP server listed in the scanned configs. Only use in trusted
                                  environments where you've verified all MCP server commands.

help

Display detailed help information and examples.

bash
snyk-agent-scan help

Examples

bash
# Scan all known MCP configs and agent skills
snyk-agent-scan

# Scan a specific config file
snyk-agent-scan ~/custom/config.json

# Scan a specific skill file
snyk-agent-scan ~/path/to/my/SKILL.md

# Scan a directory for skills
snyk-agent-scan ~/.claude/skills

# Just inspect tools without verification
snyk-agent-scan inspect

# Skip consent prompts and run all servers (ONLY for CI/CD or fully trusted environments)
snyk-agent-scan --dangerously-run-mcp-servers

# Suppress MCP server stderr output during scanning
snyk-agent-scan --suppress-mcpserver-io=true

# CI mode (requires --dangerously-run-mcp-servers in non-interactive environments)
snyk-agent-scan --ci --dangerously-run-mcp-servers

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:
jsonc
{
  "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:

bash
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

Changelog

See CHANGELOG.md.

Installation

TypingMind
Prerequisites:

Node.js 18+

{
  "mcpServers": {
    "snyk-agent-scan": {
      "command": "uvx",
      "args": [
        "--python",
        "3.13",
        "snyk-agent-scan@latest",
        "scan",
        "--full-toxic-flows",
        "mcp.json"
      ]
    }
  }
}

Use Snyk Agent Scan MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Snyk Agent Scan is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Snyk Agent Scan as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Snyk Agent Scan MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "snyk-agent-scan": {
      "command": "npx",
      "args": [
        "-y",
        "null"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Snyk Agent Scan MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Snyk Agent Scan MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Snyk Agent Scan to help me with this task?
Snyk Agent Scan
Sure. I read it.
Here is what I found using Snyk Agent Scan.

Frequently asked questions

What is the Snyk Agent Scan MCP server used for?

Snyk Agent Scan is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Snyk Agent Scan MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Snyk Agent Scan with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Snyk Agent Scan MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Snyk Agent Scan connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Snyk Agent Scan MCP to TypingMind?

Snyk Agent Scan runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does Snyk Agent Scan MCP provide in TypingMind?

Snyk Agent Scan exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Snyk Agent Scan MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Snyk Agent Scan requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇