$git clone https://github.com/cisco-ai-defense/mcp-scannerA Python tool for scanning MCP (Model Context Protocol) servers and tools for potential security findings. The MCP Scanner combines Cisco AI Defense inspect API, YARA rules and LLM-as-a-judge to detect malicious MCP tools.
| 1 | # MCP Scanner |
| 2 | |
| 3 | [](https://opensource.org/licenses/Apache-2.0) |
| 4 | [](https://www.python.org/downloads/) |
| 5 | [](https://pypi.org/project/cisco-ai-mcp-scanner/) |
| 6 | [](https://discord.com/invite/nKWtDcXxtx) |
| 7 | [](https://www.cisco.com/site/us/en/products/security/ai-defense/index.html) |
| 8 | [](https://learn-cloudsecurity.cisco.com/ai-security-framework) |
| 9 | |
| 10 | A Python tool for scanning MCP (Model Context Protocol) servers and tools for potential security findings. The MCP Scanner combines Cisco AI Defense inspect API, YARA rules and LLM-as-a-judge to detect malicious MCP tools. |
| 11 | |
| 12 | ## Overview |
| 13 | |
| 14 | The MCP Scanner provides a comprehensive solution for scanning MCP servers and tools for security findings. It leverages three powerful scanning engines (Yara, LLM-as-judge, Cisco AI Defense) that can be used together or independently. |
| 15 | |
| 16 | The SDK is designed to be easy to use while providing powerful scanning capabilities, flexible authentication options, and customization. |
| 17 | |
| 18 |  |
| 19 | |
| 20 | |
| 21 | ## Features |
| 22 | |
| 23 | - **Multiple Modes:** Run scanner as a stand-alone CLI tool or REST API server |
| 24 | - **Multi-Engine Security Analysis**: Use all three scanning engines together or independently based on your needs. |
| 25 | - **Vulnerable Packages Scanning**: Scan Python dependencies for known vulnerabilities (CVE/PYSEC/GHSA) using pip-audit integration. |
| 26 | - **Readiness Scanning**: Zero-dependency static analysis for production readiness issues (timeouts, retries, error handling). |
| 27 | - **Comprehensive Scanning**: Scan MCP tools, prompts, resources, and server instructions for security findings |
| 28 | - **Behavioural Code Scanning**: Scan Source code of MCP servers for finding threats. |
| 29 | - **VirusTotal Binary Scanning**: Automatically detect malware in binary files (images, PDFs, executables, archives) bundled with MCP servers using VirusTotal hash lookups. |
| 30 | - **PyPI Package Scanning**: Download and scan PyPI packages inside a Docker sandbox with behavioral analysis. |
| 31 | - **Behavioural Code Scanning**: Scan Source code of MCP servers for detecting threats. |
| 32 | - **Static/Offline Scanning**: Scan pre-generated JSON files without live server connections - perfect for CI/CD pipelines and air-gapped environments |
| 33 | - **Explicit Authentication Control**: Fine-grained control over authentication with explicit Auth parameters. |
| 34 | - **OAuth Support**: Full OAuth authentication support for both SSE and streamable HTTP connections. |
| 35 | - **Custom Endpoints**: Configure the API endpoint to support any Cisco AI Defense environments. |
| 36 | - **MCP Server Integration**: Connect directly to MCP servers to scan tools, prompts, and resources with flexible authentication. |
| 37 | - **Customizable YARA Rules**: Add your own YARA rules to detect specific patterns. |
| 38 | - **Comprehensive Reporting**: Detailed reports on detected security findings. |
| 39 | |
| 40 | |
| 41 | ## Installation |
| 42 | |
| 43 | ### Prerequisites |
| 44 | |
| 45 | - Python 3.11+ |
| 46 | - uv (Python package manager) |
| 47 | - A valid Cisco AI Defense API Key (optional) |
| 48 | - LLM Provider API Key (optional) |
| 49 | - VirusTotal API Key (optional, for binary file malware scanning) |
| 50 | |
| 51 | ### Installing as a CLI tool |
| 52 | |
| 53 | ```bash |
| 54 | uv tool install --python 3.13 cisco-ai-mcp-scanner |
| 55 | ``` |
| 56 | |
| 57 | Alternatively, you can install from source: |
| 58 | |
| 59 | ```bash |
| 60 | uv tool install --python 3.13 --from git+https://github.com/cisco-ai-defense/mcp-scanner cisco-ai-mcp-scanner |
| 61 | ``` |
| 62 | |
| 63 | |
| 64 | ### Installing for local development |
| 65 | |
| 66 | ```bash |
| 67 | git clone https://github.com/cisco-ai-defense/mcp-scanner |
| 68 | cd mcp-scanner |
| 69 | uv sync --python 3.13 |
| 70 | ``` |
| 71 | |
| 72 | ### Install as a dependenc |