NMAP is an MCP server that enables AI assistants to execute network scanning operations directly through the Model Context Protocol. It connects standard AI models to local installations of the NMAP network mapper utility via the Windows command line. Security engineers, network administrators, and penetration testers use this server to interactively discover hosts, evaluate open network ports, and audit infrastructure services during natural language conversations. By exposing the run_nmap_scan function, the server allows clients like Claude Desktop to initiate quick scans, perform comprehensive port enumerations, inspect service version signatures, and apply custom timing templates. It translates user queries into standard NMAP command-line executions, capturing the raw scan output and returning structured network intelligence directly to the AI model. This setup allows security practitioners to investigate network boundaries, detect misconfigurations, and analyze network visibility without needing to leave their development or chat environments.
Category: Cloud & Infrastructure
Tags: network-scanning, nmap, penetration-testing, security auditing, vulnerability assessment
npm install -g mcp-nmap-server or locally with npm install mcp-nmap-server. 3. Alternatively, install automatically for Claude Desktop using Smithery: npx -y @smithery/cli install mcp-nmap-server --client claude. 4. To configure Claude Desktop manually, open C:\Users\YOUR_USERNAME\AppData\Roaming\Claude\config.json. 5. Add the server entry under mcpServers pointing to your build: json { "mcpServers": { "nmap": { "command": "node", "args": ["C:\\Users\\YOUR_USERNAME\\Downloads\\mcp-nmap-server\\dist\\index.js"] } } } 6. Adjust the path to match your installation and restart Claude Desktop.Part of MCP Servers
The NMAP MCP Server is an open-source tool that exposes the native NMAP command-line utility to AI assistants using the Model Context Protocol. It allows AI models to run network scans and security audits.
You need a Windows operating system, Node.js version 18 or higher, and the NMAP utility installed and accessible via the Windows command line. TypeScript is required if you are modifying or developing the server.
You can install it automatically for Claude Desktop using the Smithery CLI with npx -y @smithery/cli install mcp-nmap-server --client claude. Alternatively, install it using npm install -g mcp-nmap-server and register the executable in your client config.
The run_nmap_scan function accepts a target host or network, an optional ports string such as 80,443 or 1-1000, a scanType parameter set to quick, full, or version, a timing template from 0 to 5, and optional additional NMAP flags.
Yes, the project is open source and licensed under the MIT License. The complete source code is hosted on GitHub at PhialsBasement/nmap-mcp-server.