Skip to main content
Glama
mohdhaji87

Nmap MCP Server

by mohdhaji87

nmap_comprehensive_scan

Perform a comprehensive network scan using all detection methods to identify open ports, services, operating systems, and vulnerabilities on specified targets.

Instructions

Perform comprehensive scan with all detection methods

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetsYes
portsNoall
include_scriptsNo

Implementation Reference

  • The async handler function implementing the nmap_comprehensive_scan tool logic, performing SYN scan, service version detection, OS detection, optional default scripts, with extended timeout.
    async def nmap_comprehensive_scan( targets: str, ports: str = "all", include_scripts: bool = True ) -> str: """Perform comprehensive scan with all detection methods.""" args = ["-sS", "-sV", "-O", "-p", ports] if include_scripts: args.append("--script=default") args.append(targets) result = run_nmap_command(args, timeout=600) # Longer timeout for comprehensive scan if result["success"]: return f"Comprehensive scan completed:\n\n{result['stdout']}" else: return f"Comprehensive scan failed:\n\n{result['stderr']}"
  • server.py:197-200 (registration)
    The @app.tool decorator registering the nmap_comprehensive_scan tool with its name and description.
    @app.tool( name="nmap_comprehensive_scan", description="Perform comprehensive scan with all detection methods" )
  • Input schema defined by function parameters with type hints: targets (str), ports (str, default 'all'), include_scripts (bool, default True), output str.
    async def nmap_comprehensive_scan( targets: str, ports: str = "all", include_scripts: bool = True ) -> str:

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mohdhaji87/Nmap-MCP-Server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server