Nmap MCP Server
by imjdl
The Nmap MCP Server provides access to nmap network scanning functionality through a Model Control Protocol (MCP) interface. It allows users to run scans, store results, and analyze them using AI prompts.
Last updated: N/A
What is Nmap MCP Server?
The Nmap MCP Server is a server that exposes nmap's network scanning capabilities via the Model Control Protocol (MCP). This allows for programmatic access to nmap, enabling automation and integration with other systems.
How to use Nmap MCP Server?
To use the server, first install the required dependencies (Python 3.10+, python-libnmap, and nmap). Then, run the server directly from the source or install it as a package. Available tools include run-nmap-scan
, get-scan-details
, and list-all-scans
. Available prompts include analyze-scan
. Use the provided example workflow to execute scans, retrieve details, list scans, and analyze results.
Key features of Nmap MCP Server
Run nmap scans with customizable options
Store and retrieve scan results
Analyze scan results using AI prompts
Access scans via nmap://scan/{scan_id} URI scheme
Use cases of Nmap MCP Server
Automated network inventory
Security vulnerability assessments
Network monitoring
Integration with security information and event management (SIEM) systems
FAQ from Nmap MCP Server
How do I install the server?
How do I install the server?
Install Python 3.10+, python-libnmap, and nmap. Then, either run the server directly from the source using python -m src.nmap_mcp
or install it as a package using pip install -e .
and run nmap-mcp
.
What are the requirements for running the server?
What are the requirements for running the server?
The server requires Python 3.10+, the python-libnmap library, and nmap installed on the system.
How do I run an nmap scan?
How do I run an nmap scan?
Use the run-nmap-scan
tool with the target and options parameters. For example: Call tool: run-nmap-scan Parameters: {"target": "192.168.1.0/24", "options": "-sV -p 22,80,443"}
How do I analyze a scan result?
How do I analyze a scan result?
Use the analyze-scan
prompt with the scan_id and focus parameters. For example: Get prompt: analyze-scan Parameters: {"scan_id": "<scan_id>", "focus": "security"}
What should I do if nmap is not found?
What should I do if nmap is not found?
Make sure nmap is installed and available in your PATH. Check the logs for which nmap executable is being used. The server will attempt to use the full path to nmap to avoid conflicts.