{"id":44809202,"url":"https://github.com/snyk/agent-scan","last_synced_at":"2026-04-07T13:01:10.643Z","repository":{"id":287241537,"uuid":"962024783","full_name":"snyk/agent-scan","owner":"snyk","description":"Security scanner for AI agents, MCP servers and agent skills.","archived":false,"fork":false,"pushed_at":"2026-04-07T11:24:02.000Z","size":2756,"stargazers_count":2069,"open_issues_count":24,"forks_count":197,"subscribers_count":14,"default_branch":"main","last_synced_at":"2026-04-07T11:26:24.353Z","etag":null,"topics":["agent","ai","mcp","modelcontextprotocol","security"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/snyk.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-04-07T14:31:26.000Z","updated_at":"2026-04-07T11:20:01.000Z","dependencies_parsed_at":"2025-05-05T09:51:24.516Z","dependency_job_id":"1656ed33-3727-4420-b749-228466363ac6","html_url":"https://github.com/snyk/agent-scan","commit_stats":null,"previous_names":["invariantlabs-ai/mcp-scan","snyk/agent-scan"],"tags_count":86,"template":false,"template_full_name":null,"purl":"pkg:github/snyk/agent-scan","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snyk%2Fagent-scan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snyk%2Fagent-scan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snyk%2Fagent-scan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snyk%2Fagent-scan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/snyk","download_url":"https://codeload.github.com/snyk/agent-scan/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snyk%2Fagent-scan/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31513382,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent","ai","mcp","modelcontextprotocol","security"],"created_at":"2026-02-16T16:00:19.732Z","updated_at":"2026-04-07T13:01:10.636Z","avatar_url":"https://github.com/snyk.png","language":"Python","readme":"\u003cp align=\"center\"\u003e\n  \u003ch1 align=\"center\"\u003e\n  Snyk Agent Scan\n  \u003c/h1\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  Discover and scan agent components on your machine for prompt injections\u003cbr/\u003e\n  and vulnerabilities (including agents, MCP servers, skills).\n\u003c/p\u003e\n\n\u003e **NEW** Read our [technical report on the emerging threats of the agent skill eco-system](.github/reports/skills-report.pdf) published together with Agent Scan 0.4, which adds support for scanning agent skills.\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://pypi.python.org/pypi/snyk-agent-scan\"\u003e\u003cimg src=\"https://img.shields.io/pypi/v/snyk-agent-scan.svg\" alt=\"snyk-agent-scan\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://pypi.python.org/pypi/snyk-agent-scan\"\u003e\u003cimg src=\"https://img.shields.io/pypi/l/snyk-agent-scan.svg\" alt=\"snyk-agent-scan license\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://pypi.python.org/pypi/snyk-agent-scan\"\u003e\u003cimg src=\"https://img.shields.io/pypi/pyversions/snyk-agent-scan.svg\" alt=\"snyk-agent-scan python version requirements\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg width=\"1304\" height=\"976\" alt=\"agent-scan-pretty\" src=\"https://github.com/user-attachments/assets/49c32115-703c-465f-bb09-1b6bae852253\" /\u003e\n\u003c/div\u003e\n\n\u003cbr\u003e\n\nAgent 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. **By default** it focuses on MCP servers; add `--skills` to autodiscover and scan agent skills.\n\n## Highlights\n\n- Auto-discover MCP configurations, agent tools, skills\n- Scanning of Claude, Cursor, Windsurf, Gemini CLI, and other agents.\n- Detects [15+ distinct security risks](docs/issue-codes.md) across MCP servers and agent skills:\n  - MCP: [Prompt Injection](docs/issue-codes.md#E001), [Tool Poisoning](docs/issue-codes.md#E001), [Tool Shadowing](docs/issue-codes.md#E002), [Toxic Flows](docs/issue-codes.md#ToxicFlows)\n  - Skills: [Prompt Injection](docs/issue-codes.md#E004), [Malware Payloads](docs/issue-codes.md#E006), [Untrusted Content](docs/issue-codes.md#W011), [Credential Handling](docs/issue-codes.md#W007), [Hardcoded Secrets](docs/issue-codes.md#W008)\n\n## Supported agents and capabilities\n\nAgent Scan auto-discovers agents and their capabilities (MCP servers or skills) when their install paths exist. The table reflects [well-known agent definitions](src/agent_scan/well_known_clients.py).\n\n- **✓**: at least one path is defined for that capability.\n- **✗**: the agent is listed for that OS but has no paths for that capability.\n- **—**: that agent is not included for that OS.\n- **Skills** columns apply when using `--skills`.\n\n| Agent | macOS MCP | macOS Skills | Linux MCP | Linux Skills | Windows MCP | Windows Skills |\n| --- | :---: | :---: | :---: | :---: | :---: | :---: |\n| Windsurf | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |\n| Cursor | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |\n| VS Code | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |\n| Claude Desktop | ✓ | ✗ | — | — | ✓ | ✗ |\n| Claude Code | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |\n| Gemini CLI | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |\n| OpenClaw | ✗ | ✓ | ✗ | ✓ | ✗ | ✓ |\n| Kiro | ✓ | ✗ | ✓ | ✗ | ✓ | ✗ |\n| OpenCode | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ |\n| Antigravity | ✓ | ✗ | ✓ | ✗ | ✓ | ✗ |\n| Codex | ✗ | ✓ | ✗ | ✓ | — | — |\n| Amazon Q | ✓ | ✗ | ✓ | ✗ | ✗ | ✗ |\n\n## Quick Start\n\nTo get started:\n\n1. **Sign up at [Snyk](https://snyk.io)** and get an API token from [https://app.snyk.io/account](https://app.snyk.io/account) (API Token → KEY → click to show).\n2. **Set the token as an environment variable** before running any scan:\n   ```bash\n   export SNYK_TOKEN=your-api-token-here\n   ```\n3. Have [uv](https://docs.astral.sh/uv/getting-started/installation/) installed on your system.\n\n### Scanning\n\nTo run a full scan of your machine (auto-discovers agents, MCP servers, skills), run:\n\n```bash\nuvx snyk-agent-scan@latest\n```\n\n\nThis 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.\n\nTo also auto-discover and scan agent skills, pass the `--skills` flag:\n\n```bash\nuvx snyk-agent-scan@latest --skills\n```\n\nYou can also scan particular MCP configuration files or skills:\n\n```bash\n# scan a specific mcp configuration\nuvx snyk-agent-scan@latest ~/.vscode/mcp.json\n# scan a single agent skill\nuvx snyk-agent-scan@latest --skills ~/path/to/my/SKILL.md\n# scan all claude skills\nuvx snyk-agent-scan@latest --skills ~/.claude/skills\n```\n\n#### Example Run\n\n[![Agent Scan security vulnerabilities demo](demo.svg)](https://asciinema.org/a/716858)\n\n## Scanner Capabilities\n\nAgent 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.\n\nAgent Scan operates in two main modes which can be used jointly or separately:\n\n1. **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.\n\n2. **Background Mode** (MDM, Crowdstrike). Agent Scan scans the machine in regular intervals in the background, and reports the results to a [Snyk Evo](https://evo.ai.snyk.io) 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](https://evo.ai.snyk.io/#contact-us).\n\n## How It Works\n\n### Scanning\n\nAgent 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.\n\nIt 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](./TERMS.md).\n\nA 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.\n\nAgent Scan does not store or log any usage data, i.e. the contents and results of your MCP tool calls.\n\n## CLI Parameters\n\nAgent Scan provides the following commands:\n\n```\nsnyk-agent-scan - Security scanner for agents, MCP servers, and skills\n```\n\n### Common Options\n\nThese options are available for all commands:\n\n```\n--storage-file FILE    Path to store scan results and scanner state (default: ~/.mcp-scan)\n--base-url URL         Base URL for the verification server\n--verbose              Enable detailed logging output\n--print-errors         Show error details and tracebacks\n--json                 Output results in JSON format instead of rich text\n```\n\n### Commands\n\n#### scan (default)\n\nScan MCP configurations for security vulnerabilities in tools, prompts, and resources.\n\n```\nsnyk-agent-scan scan [CONFIG_FILE...]\n```\n\nOptions:\n\n```\n--skills                          Also scan agent skills (default: off)\n--checks-per-server NUM           Number of checks to perform on each server (default: 1)\n--server-timeout SECONDS          Seconds to wait before timing out server connections (default: 10)\n--suppress-mcpserver-io BOOL      Suppress stdout/stderr from MCP servers (default: True)\n```\n\n#### inspect\n\nPrint descriptions of tools, prompts, and resources without verification.\n\n```\nsnyk-agent-scan inspect [CONFIG_FILE...]\n```\n\nOptions:\n\n```\n--server-timeout SECONDS      Seconds to wait before timing out server connections (default: 10)\n--suppress-mcpserver-io BOOL  Suppress stdout/stderr from MCP servers (default: True)\n```\n\n#### help\n\nDisplay detailed help information and examples.\n\n```bash\nsnyk-agent-scan help\n```\n\n### Examples\n\n```bash\n# Scan all known MCP configs\nsnyk-agent-scan\n\n# Scan all known MCP configs and agent skills\nsnyk-agent-scan --skills\n\n# Scan a specific config file\nsnyk-agent-scan ~/custom/config.json\n\n# Scan a specific skill file\nsnyk-agent-scan --skills ~/path/to/my/SKILL.md\n\n# Scan a directory for skills\nsnyk-agent-scan --skills ~/.claude/skills\n\n# Just inspect tools without verification\nsnyk-agent-scan inspect\n```\n\n## Demo\n\nThis repository includes a vulnerable MCP server that can demonstrate Model Context Protocol security issues that Agent Scan finds.\n\nHow to demo MCP security issues?\n\n1. Clone this repository\n2. Create an `mcp.json` config file in the cloned git repository root directory with the following contents:\n\n```jsonc\n{\n  \"mcpServers\": {\n    \"Demo MCP Server\": {\n      \"type\": \"stdio\",\n      \"command\": \"uv\",\n      \"args\": [\"run\", \"mcp\", \"run\", \"demoserver/server.py\"],\n    },\n  },\n}\n```\n\n3. Run Agent Scan: `uvx --python 3.13 snyk-agent-scan@latest scan --full-toxic-flows mcp.json`\n\nNote: 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`.\n\n## Agent Scan is closed to contributions\n\nAgent Scan does not accept external contributions at this time.\n\nWe welcome suggestions, bug reports, or feature requests as GitHub issues.\n\n## Development Setup\n\nTo run Agent Scan from source, follow these steps:\n\n```bash\nuv run pip install -e .\nuv run -m src.agent_scan.cli\n```\n\n## Including Agent Scan results in your own project / registry\n\nIf you want to include Agent Scan results in your own project or registry, please [reach out](https://evo.ai.snyk.io/#contact-us). 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.\n\n## Documentation\n\n- [Scanning](docs/scanning.md) — How scanning works, CLI parameters, and usage examples.\n- [Issue Codes](docs/issue-codes.md) — Reference for all security issues detected by Agent Scan.\n\n## Further Reading\n\n- [Introducing MCP-Scan](https://invariantlabs.ai/blog/introducing-mcp-scan)\n- [MCP Security Notification Tool Poisoning Attacks](https://invariantlabs.ai/blog/mcp-security-notification-tool-poisoning-attacks)\n- [WhatsApp MCP Exploited](https://invariantlabs.ai/blog/whatsapp-mcp-exploited)\n- [MCP Prompt Injection](https://simonwillison.net/2025/Apr/9/mcp-prompt-injection/)\n- [Toxic Flow Analysis](https://invariantlabs.ai/blog/toxic-flow-analysis)\n- [Skills Report](.github/reports/skills-report.pdf)\n\n## Changelog\n\nSee [CHANGELOG.md](CHANGELOG.md).\n","funding_links":[],"categories":["Python","Skills \u0026 Plugins","漏洞扫描","Security Notice","🔒 Security Notice","AI Red Teaming (Testing AI Targets)","MCP Servers \u0026 Protocol","🔒 安全通知"],"sub_categories":["☁️ Hosting \u0026 Deployment","Community Skills","方式 3: 聊天内自动安装"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnyk%2Fagent-scan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsnyk%2Fagent-scan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnyk%2Fagent-scan/lists"}