nmap-mcp is a production-ready Model Context Protocol (MCP) server that wraps Nmap, the industry-standard network scanner, to enable AI agents to perform automated network security assessments. Built by Vorota AI, it provides 6 scanning tools, 9 scan types, and 6 timing templates -- making it the most comprehensive Nmap integration for AI-powered security workflows available today.
MCP server for AI-powered network scanning with Nmap. Port scanning, service detection, OS fingerprinting, and vulnerability scanning for AI agents. By Vorota AI.
ดาว
17
เครื่องมือ
—
อัปไทม์
—
Quick Start
Build and run nmap-mcp with Docker (includes Nmap):
docker build -t nmap-mcp https://github.com/vorotaai/nmap-mcp.git
docker run --rm -i nmap-mcp
nmap-mcp from Vorota AI exposes 6 specialized scanning tools to any MCP-compatible AI agent:
Port Scanning -- TCP Connect, SYN stealth, UDP, FIN, XMAS, NULL, and ACK scan types with configurable port ranges and timing templates (T0 through T5).
Host Discovery -- Ping-sweep an entire subnet to find live hosts before deeper scanning.
Service Detection -- Identify running services and their exact versions on open ports with adjustable probe intensity (0-9).
OS Fingerprinting -- Determine operating systems through TCP/IP stack analysis.
Vulnerability Scanning -- Run Nmap Scripting Engine (NSE) scripts in safe categories to detect known vulnerabilities.
Quick Scan -- Fast top-N port scan with aggressive timing for rapid reconnaissance.
All tools include built-in input validation, network size limits, and timeout enforcement to prevent misuse.
Recommended Workflow
For a thorough AI-powered security assessment, nmap-mcp tools are designed to be used in sequence:
Discover Hosts -- Use discover-hosts to find live targets on the network.
Quick Scan -- Run quick-scan on discovered hosts for a fast overview of open ports.
Port Scan -- Use scan-ports with specific scan types for deeper port analysis.
Detect Services -- Run detect-services on open ports to identify software versions.
Detect OS -- Use detect-os to fingerprint the operating system (requires root).
Scan Vulnerabilities -- Run scan-vulnerabilities to check for known security issues.
AI agents like Claude, Cursor, and VS Code Copilot can orchestrate this entire workflow automatically in a single conversation.
Authorization is required. nmap-mcp is a security tool that performs network scanning. You must ensure:
You have explicit authorization to scan any target network or host.
You comply with all applicable laws and organizational policies.
You use this tool only in environments where you have permission to conduct security assessments.
Safety Measures
nmap-mcp by Vorota AI implements multiple layers of security to prevent misuse:
Input validation -- All inputs are validated against a set of forbidden characters (;, |, &, $, `, (, ), {, }, <, >, newlines) to prevent command injection attacks.
Network size limits -- Scans are limited to a maximum of 256 hosts by default (equivalent to a /24 subnet). This is configurable via NMAP_MAX_TARGETS.
Restricted NSE categories -- Only safe script categories are allowed: auth, default, discovery, safe, version, and vuln. Dangerous categories like exploit, dos, and intrusive are blocked.
Configurable timeouts -- All scans have a configurable timeout with a hard maximum of 600 seconds to prevent runaway processes.
No shell execution -- All Nmap commands are executed using Python's subprocess module with argument lists, never through a shell. This eliminates shell injection vectors entirely.
FAQ
What is nmap-mcp?
nmap-mcp is a Model Context Protocol (MCP) server built by Vorota AI that enables AI agents to perform Nmap network scans. It wraps the full power of Nmap -- port scanning, host discovery, service detection, OS fingerprinting, and vulnerability scanning -- into 6 structured tools that AI assistants like Claude, Cursor, and VS Code Copilot can call directly.
How do I use Nmap with AI agents?
Build the nmap-mcp Docker image and configure it as an MCP server in your AI client (Claude Desktop, Claude Code, Cursor, VS Code, Windsurf, or Cline). Once connected, you can ask the AI to scan networks, detect services, fingerprint operating systems, and find vulnerabilities using natural language. The AI agent will call the appropriate nmap-mcp tools and interpret the results for you.
Is nmap-mcp safe to use?
Yes. nmap-mcp includes multiple safety mechanisms: input validation to prevent command injection, network size limits to avoid scanning overly broad ranges, restricted NSE script categories that exclude dangerous scripts, configurable timeouts, and no shell execution. However, network scanning itself requires authorization -- always ensure you have permission before scanning any target.
What MCP clients are supported?
nmap-mcp works with all MCP-compatible clients, including Claude Desktop, Claude Code, Cursor, VS Code (via GitHub Copilot), Windsurf, and Cline. Any client that supports the Model Context Protocol's stdio transport can connect to nmap-mcp.
Contributing
Contributions are welcome. To set up the development environment:
git clone https://github.com/vorotaai/nmap-mcp.git
cd nmap-mcp
uv sync --all-groups
Running Tests
uv run pytest
Code Quality
uv run ruff check .
uv run ruff format .
Please open an issue or pull request on GitHub for bugs, feature requests, or improvements.
MCP server for AI-powered network scanning with Nmap. Port scanning, service detection, OS fingerprinting, and vulnerability scanning for AI agents. By Vorota AI.
คัดลอกคอนฟิก stdio สำหรับ Cursor, Claude Desktop, Claude Code หรือ VS Code ได้ในหน้านี้ คอนฟิกนี้ใช้การติดตั้งของผู้เผยแพร่ ไม่ใช่พร็อกซีของ PlugMCP
Nmap ต้องใช้ API key ไหม?
ระเบียนนี้ไม่ได้ระบุตัวแปรสภาพแวดล้อมที่จำเป็น
Nmap ใช้ทรานสปอร์ตแบบใด?
Nmap ทำงานแบบโลคัลผ่าน stdio
Nmap ถูกตรวจสอบล่าสุดเมื่อใด?
ตรวจสอบล่าสุดเมื่อ 2026-10-27 MCP server for AI-powered network scanning with Nmap. Port scanning, service detection, OS fingerprinting, and vulnerability scanning for AI agents. By Vorota AI.