Skip to main content
Glama
mohdhaji87

Nmap MCP Server

by mohdhaji87

nmap_comprehensive_scan

Execute a thorough network scan using all detection methods, including port scanning, service discovery, and OS fingerprinting, to assess network security and identify vulnerabilities.

Instructions

Perform comprehensive scan with all detection methods

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
include_scriptsNo
portsNoall
targetsYes

Implementation Reference

  • The main handler function that executes the comprehensive Nmap scan, including SYN scan, service version detection, OS detection, optional default scripts, on specified targets and ports.
    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)
    Registers the 'nmap_comprehensive_scan' tool with FastMCP app using the @app.tool decorator, specifying 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), returns str.
    targets: str, ports: str = "all", include_scripts: bool = True ) -> str:

Other Tools

Related Tools

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