Skip to main content
Glama

run_nmap_scan

Execute network reconnaissance scans on IP addresses or ranges using Nmap to identify open ports, services, and vulnerabilities for security assessments.

Instructions

run an nmap scan on an ip or ip range (use the right nmap flags based on the first response)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ipsYes
flagsYes

Implementation Reference

  • The main handler function decorated with @mcp.tool decorator that registers and implements the 'run_nmap_scan' tool. It executes an nmap scan on the provided IPs using the specified flags, prepending default flags '-sV' and '-v', via the run_command utility.
    @mcp.tool(name="run_nmap_scan",description="run an nmap scan on an ip or ip range (use the right nmap flags based on the first response)") async def run_nmap_scan(ips:List[str],flags:List[str]): return run_command(["nmap","-sV","-v"]+flags+ips)
  • The @mcp.tool decorator registers the 'run_nmap_scan' tool with the MCP server, including its name and description.
    @mcp.tool(name="run_nmap_scan",description="run an nmap scan on an ip or ip range (use the right nmap flags based on the first response)")

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/YoussefSahnoun/PentestMCP'

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