nuclei_scan
Execute Nuclei vulnerability scanner to identify security flaws in targets with enhanced logging and comprehensive parameter support for thorough security assessments.
Instructions
Execute Nuclei vulnerability scanner with enhanced logging and comprehensive parameter support.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| additional_args | No | ||
| author | No | ||
| automatic_scan | No | ||
| body | No | ||
| bulk_size | No | ||
| concurrency | No | ||
| custom_headers | No | ||
| debug | No | ||
| exclude_id | No | ||
| exclude_tags | No | ||
| follow_redirects | No | ||
| include_metadata | No | ||
| include_requests | No | ||
| include_responses | No | ||
| max_redirects | No | ||
| methods | No | ||
| new_templates | No | ||
| output_format | No | jsonl | |
| protocol_type | No | ||
| proxy | No | ||
| rate_limit | No | ||
| resolver | No | ||
| retries | No | ||
| scan_strategy | No | ||
| severity | No | ||
| silent | No | ||
| system_resolvers | No | ||
| tags | No | ||
| target | Yes | ||
| template | No | ||
| template_id | No | ||
| timeout | No | ||
| timestamp_enabled | No | ||
| user_agent | No | ||
| verbose | No |
Implementation Reference
- src/mcp_server/app.py:458-543 (handler)MCP tool handler for 'nuclei_scan'. This function defines the tool interface, collects parameters, sends them to the backend REST API endpoint '/api/nuclei' via BugBountyAPIClient, and returns the results with logging. This is the primary implementation of the MCP tool.@mcp.tool() def nuclei_scan( target: str, severity: str = "", tags: str = "", exclude_tags: str = "", template: str = "", template_id: str = "", exclude_id: str = "", author: str = "", protocol_type: str = "", output_format: str = "jsonl", include_requests: bool = True, include_responses: bool = False, include_metadata: bool = True, timestamp_enabled: bool = True, concurrency: int = 25, rate_limit: str = "", timeout: str = "", retries: str = "", bulk_size: str = "", follow_redirects: bool = True, max_redirects: str = "", custom_headers: str = "", proxy: str = "", user_agent: str = "", scan_strategy: str = "", resolver: str = "", system_resolvers: bool = False, methods: str = "", body: str = "", new_templates: bool = False, automatic_scan: bool = False, silent: bool = False, verbose: bool = False, debug: bool = False, additional_args: str = "", ) -> dict[str, Any]: """Run Nuclei scanner with enhanced logging and rich parameters.""" data = { "target": target, "severity": severity, "tags": tags, "exclude_tags": exclude_tags, "template": template, "template_id": template_id, "exclude_id": exclude_id, "author": author, "protocol_type": protocol_type, "output_format": output_format, "include_requests": include_requests, "include_responses": include_responses, "include_metadata": include_metadata, "timestamp_enabled": timestamp_enabled, "concurrency": concurrency, "rate_limit": rate_limit, "timeout": timeout, "retries": retries, "bulk_size": bulk_size, "follow_redirects": follow_redirects, "max_redirects": max_redirects, "custom_headers": custom_headers, "proxy": proxy, "user_agent": user_agent, "scan_strategy": scan_strategy, "resolver": resolver, "system_resolvers": system_resolvers, "methods": methods, "body": body, "new_templates": new_templates, "automatic_scan": automatic_scan, "silent": silent, "verbose": verbose, "debug": debug, "additional_args": additional_args, } logger.info(f"🎯 Starting Nuclei vulnerability scan on {target}") result = api_client.safe_post("api/nuclei", data) if result.get("success"): logger.info(f"✅ Nuclei scan completed on {target}") else: logger.error("❌ Nuclei scan failed") return result