NMAP
Enables AI assistants to perform network scanning operations using NMAP, offering a standardized interface for network analysis and security assessments through AI conversations.
What is NMAP?
NMAP is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to enables ai assistants to perform network scanning operations using nmap, offering a standardized interface for network analysis and security assessments through ai conversations.
Enables AI assistants to perform network scanning operations using NMAP, offering a standardized interface for network analysis and security assessments through AI conversations.
This server falls under the Security category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Enables AI assistants to perform network scanning operations
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx mcp-nmap-serverConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use NMAP
The NMAP MCP Server bridges AI assistants and the nmap network scanner, exposing a single well-defined tool that lets Claude and other LLMs perform network reconnaissance and port scanning through natural-language requests. Security analysts and DevOps engineers can ask questions like 'what ports are open on 192.168.1.1?' and receive structured scan results without ever leaving their AI conversation. It supports quick, full, and service-version scan types along with custom nmap flags for advanced use cases.
Prerequisites
- nmap installed and accessible on PATH (https://nmap.org/download.html)
- Node.js 18 or later installed
- npm or npx available
- An MCP client such as Claude Desktop
- Appropriate network permissions — some scan types require root/administrator privileges
Install nmap on your system
The MCP server is a wrapper around the nmap binary, which must be installed separately. Install it with your system package manager.
# macOS
brew install nmap
# Debian/Ubuntu
sudo apt-get install nmap
# Windows — download installer from https://nmap.org/download.htmlInstall the MCP server package
Install the mcp-nmap-server npm package globally so it can be called from Claude Desktop.
npm install -g mcp-nmap-serverLocate the installed binary path
Find the absolute path to the installed server's index.js file. You will need this for the Claude Desktop configuration.
npm root -gConfigure Claude Desktop
Add the server to your Claude Desktop configuration file. Use the full absolute path to the dist/index.js file inside the globally installed package directory.
{
"mcpServers": {
"nmap": {
"command": "npx",
"args": ["-y", "mcp-nmap-server"]
}
}
}Restart Claude Desktop
Fully quit and relaunch Claude Desktop so it picks up the new MCP server configuration. On macOS use Cmd+Q, not just closing the window.
Test with a simple scan
Ask Claude to scan localhost to verify the integration is working. The run_nmap_scan tool will execute and return open ports.
NMAP Examples
Client configuration
Claude Desktop config using npx to run the NMAP MCP server without a global install.
{
"mcpServers": {
"nmap": {
"command": "npx",
"args": ["-y", "mcp-nmap-server"]
}
}
}Prompts to try
Example requests you can make to Claude once the NMAP server is connected.
- "Scan localhost for open ports using a quick scan"
- "Run a full port scan on 192.168.1.10 and tell me what services are running"
- "Do a version detection scan on ports 22, 80, and 443 of my-server.local"
- "Scan the network range 192.168.1.0/24 with timing template 2 to avoid detection"Troubleshooting NMAP
Error: nmap not found or ENOENT when running scans
The nmap binary must be installed and on your system PATH. Run 'which nmap' (macOS/Linux) or 'where nmap' (Windows) to verify. If missing, install via brew, apt, or the official nmap installer.
Permission denied errors during scan
Full and SYN scans require root/administrator privileges. Either run Claude Desktop as administrator, or use the 'quick' scanType which works without elevated permissions.
Server not appearing in Claude Desktop tools list
Ensure you fully restarted Claude Desktop after editing the config. Check the config JSON is valid (no trailing commas) and that the npx command resolves correctly by running 'npx -y mcp-nmap-server' in your terminal.
Frequently Asked Questions about NMAP
What is NMAP?
NMAP is a Model Context Protocol (MCP) server that enables ai assistants to perform network scanning operations using nmap, offering a standardized interface for network analysis and security assessments through ai conversations. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install NMAP?
Follow the installation instructions on the NMAP GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with NMAP?
NMAP works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is NMAP free to use?
Yes, NMAP is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.
NMAP Alternatives — Similar Security Servers
Looking for alternatives to NMAP? Here are other popular security servers you can use with Claude, Cursor, and VS Code.
Casdoor
★ 13.6kAn open-source Agent-first Identity and Access Management (IAM) /LLM MCP & agent gateway and auth server with web UI supporting OpenClaw, MCP, OAuth, OIDC, SAML, CAS, LDAP, SCIM, WebAuthn, TOTP, MFA, Face ID, Google Workspace, Azure AD
ghidraMCP
★ 9.0kAn Model Context Protocol server that enables LLMs to autonomously reverse engineer applications by exposing Ghidra's decompilation and analysis tools. It allows AI agents to list code structures, rename methods, and analyze binaries directly through
HexStrike AI
★ 8.9kHexStrike AI MCP Agents is an advanced MCP server that lets AI agents (Claude, GPT, Copilot, etc.) autonomously run 150+ cybersecurity tools for automated pentesting, vulnerability discovery, bug bounty automation, and security research. Seamlessly b
IDA Pro MCP
★ 8.7kEnables AI-assisted reverse engineering in IDA Pro by providing tools to analyze binaries, decompile functions, manage comments, search patterns, and interact with the IDA database through natural language.
Anthropic Cybersecurity Skills
★ 6.6k754 structured cybersecurity skills for AI agents · Mapped to 5 frameworks: MITRE ATT&CK, NIST CSF 2.0, MITRE ATLAS, D3FEND & NIST AI RMF · agentskills.io standard · Works with Claude Code, GitHub Copilot, Codex CLI, Cursor, Gemini CLI & 20+ platform
Hooker
★ 5.1k🔥🔥 hooker is a Frida-based reverse engineering toolkit for Android. It offers a user-friendly CLI, universal scripts, auto hook generation, memory roaming to detect activities/services, one-click SOCKS5 proxy setup, Frida JustTrustMe, and BoringSSL u
Browse More Security MCP Servers
Explore all security servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up NMAP in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use NMAP?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.