NMAP

v1.0.0Securitystable

Enables AI assistants to perform network scanning operations using NMAP, offering a standardized interface for network analysis and security assessments through AI conversations.

mcp-nmap-servermcpai-integration
Share:
46
Stars
0
Downloads
0
Weekly
0/5

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

Perform network scanning operations from AI agents
Enable network analysis and security assessments via AI
PhialsBasement

Maintainer

LicenseMIT License
Languagejavascript
Versionv1.0.0
UpdatedMay 5, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx mcp-nmap-server

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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.html
2

Install 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-server
3

Locate 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 -g
4

Configure 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"]
    }
  }
}
5

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.

6

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.6k

An 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.0k

An 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.9k

HexStrike 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.7k

Enables 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.6k

754 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.

Quick Config Preview

{ "mcpServers": { "mcp-nmap-server": { "command": "npx", "args": ["-y", "mcp-nmap-server"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides