NmapMCP is an MCP server that integrates the Nmap network scanning utility into Model Context Protocol environments. It connects AI assistants and MCP-compatible platforms directly to local or network-accessible Nmap binary capabilities, allowing security engineers, network administrators, and penetration testers to execute network reconnaissance directly from an LLM prompt. Users can invoke various scanning techniques, such as SYN half-open scans, UDP scans, TCP connect scans, and FIN or idle stealth scans. The server enables automated asset inventory through ping sweeps, ARP discovery, and list scanning across IP ranges without probing ports. In addition, it allows automated operating system fingerprinting and service version detection to spot outdated or vulnerable software. Network teams can also run subdomain discovery through DNS brute forcing and accelerate recon by disabling reverse DNS lookups or targeting only top common ports.
Category: Cloud & Infrastructure
Tags: network-scanning, network security, nmap, reconnaissance, vulnerability assessment
bash npx -y @smithery/cli install @0xPratikPatil/nmapmcp --client claude 2. Alternatively, perform manual installation by cloning the repository: bash git clone https://github.com/0xPratikPatil/NmapMCP.git cd NmapMCP 3. Install the uv tool and create a virtual environment: bash curl -LsSf https://astral.sh/uv/install.sh | sh uv venv 4. Install project dependencies: bash uv pip install 5. Add NmapMCP to your claude_desktop_config.json file: json { "mcpServers": { "NmapMCP": { "command": "uv", "args": [ "--directory", "/path/to/NmapMCP", "run", "main.py" ] } } }Part of MCP Servers
NmapMCP is an open source Model Context Protocol server that exposes Nmap network scanning capabilities to AI assistants. It enables users to run host discovery, port scans, OS detection, and version detection directly from compatible MCP clients.
You can install it automatically for Claude Desktop using Smithery by running npx -y @smithery/cli install @0xPratikPatil/nmapmcp --client claude. Alternatively, clone the repository, set up a virtual environment using uv, install the dependencies, and configure your Claude Desktop JSON file.
NmapMCP executes various Nmap scan types, including SYN scans, UDP scans, FIN scans, Idle scans, TCP connect scans, ping scans, and ARP discovery. It also supports DNS brute forcing, OS detection, and service version detection.
NmapMCP works with any client that implements the Model Context Protocol, including Claude Desktop, when configured with the appropriate server command and arguments.
Yes, NmapMCP is open source software released under the MIT License on GitHub.