MCP-Scanner – Scan MCP Servers for vulnerabilities
MCP-Scanner – Scan MCP Servers for vulnerabilities
Homepage   /    health   /    MCP-Scanner – Scan MCP Servers for vulnerabilities

MCP-Scanner – Scan MCP Servers for vulnerabilities

Cisco-Ai-Defense 🕒︎ 2025-10-29

Copyright github

MCP-Scanner – Scan MCP Servers for vulnerabilities

A Python tool for scanning MCP (Model Context Protocol) servers and tools for potential security vulnerabilities. The MCP Scanner combines Cisco AI Defense inspect API, YARA rules and LLM-as-a-judge to detect malicious MCP tools. The MCP Scanner provides a comprehensive solution for scanning MCP servers and tools for security vulnerabilities. It leverages three powerful scanning engines (Yara, LLM-as-judge, Cisco AI Defense) that can be used together or independently. The SDK is designed to be easy to use while providing powerful scanning capabilities, flexible authentication options, and customization. Multiple Modes: Run scanner as a stand-alone CLI tool or REST API server Multi-Engine Security Analysis: Use all three scanning engines together or independently based on your needs. Comprehensive Scanning: Scan MCP tools, prompts, and resources for security vulnerabilities Explicit Authentication Control: Fine-grained control over authentication with explicit Auth parameters. OAuth Support: Full OAuth authentication support for both SSE and streamable HTTP connections. Custom Endpoints: Configure the API endpoint to support any Cisco AI Defense environments. MCP Server Integration: Connect directly to MCP servers to scan tools, prompts, and resources with flexible authentication. Customizable YARA Rules: Add your own YARA rules to detect specific patterns. Comprehensive Vulnerability Reporting: Detailed reports on detected vulnerabilities. Python 3.11+ uv (Python package manager) A valid Cisco AI Defense API Key (optional) LLM Provider API Key (optional) Tested LLMs: OpenAI GPT-4o and GPT-4.1 The fastest way to get started is using the mcp-scanner CLI command. Global flags (like --analyzers, --format, etc.) must be placed before a subcommand. remote: scan a remote MCP server (SSE or streamable HTTP). Supports --server-url, optional --bearer-token. stdio: launch and scan a stdio MCP server. Requires --stdio-command; accepts --stdio-args, --stdio-env, optional --stdio-tool. config: scan servers from a specific MCP config file. Requires --config-path; optional --bearer-token. known-configs: scan servers from well-known client config locations on this machine; optional --bearer-token. prompts: scan prompts on an MCP server. Requires --server-url; optional --prompt-name, --bearer-token. resources: scan resources on an MCP server. Requires --server-url; optional --resource-uri, --mime-types, --bearer-token. Note: Top-level flags (e.g., --server-url, --stdio-*, --config-path, --scan-known-configs) remain supported when no subcommand is used, but subcommands are recommended. The API server provides a REST interface to the MCP scanner functionality, allowing you to integrate security scanning into web applications, CI/CD pipelines, or other services. It exposes the same scanning capabilities as the CLI tool but through HTTP endpoints. Once running, the API server provides endpoints for: /scan-tool - Scan a specific tool on an MCP server /scan-all-tools - Scan all tools on an MCP server /scan-prompt - Scan a specific prompt on an MCP server /scan-all-prompts - Scan all prompts on an MCP server /scan-resource - Scan a specific resource on an MCP server /scan-all-resources - Scan all resources on an MCP server /health - Health check endpoint Documentation is available in docs/api-reference.md or as interactive documentation at http://localhost:8000/docs when the server is running. The scanner supports multiple output formats: summary: Concise overview with key findings detailed: Comprehensive analysis with full findings breakdown table: Clean tabular format by_severity: Results grouped by severity level raw: Raw JSON output For detailed documentation, see the docs/ directory: Architecture - System architecture and components Authentication - OAuth and security configuration Programmatic Usage - Programmatic usage examples and advanced usage API Reference - Complete REST API documentation Output Formats - Detailed output format options Distributed under the Apache 2.0 License. See LICENSE for more information. Project Link: https://github.com/cisco-ai-defense/mcp-scanner

Guess You Like

Prunella Scales, Sybil on ‘Fawlty Towers,’ dies at 93
Prunella Scales, Sybil on ‘Fawlty Towers,’ dies at 93
In an almost seven-decade care...
2025-10-29
HOMECOMING TEASERS: 27-29 October 2025
HOMECOMING TEASERS: 27-29 October 2025
Catch Homecoming on Mzansi Wet...
2025-10-28