nmap-mcpserver
This is a Model Control Protocol (MCP) server that provides access to nmap network scanning functionality.
Documentation
Nmap MCP Server
This is a Model Control Protocol (MCP) server that provides access to nmap network scanning functionality.
Features
- Run nmap scans on specified targets with customizable options
- Store and retrieve scan results
- Analyze scan results using AI prompts
Installation
Requirements:
- Python 3.10+
- python-libnmap
- nmap (installed on the system)
pip install python-libnmapMake sure nmap is installed on your system:
# On Debian/Ubuntu
sudo apt-get install nmap
# On Fedora/CentOS
sudo dnf install nmapUsage
Running the Server
To run the server directly from the source code:
python -m src.nmap_mcpTo install the package and run as a command:
pip install -e .
nmap-mcpAvailable Tools
1. run-nmap-scan
2. get-scan-details
3. list-all-scans
Available Prompts
1. analyze-scan
Resources
Scan results are available as resources with the `nmap://scan/{scan_id}` URI scheme.
Example Workflow
1. Run a scan:
Call tool: run-nmap-scan
Parameters: {"target": "192.168.1.0/24", "options": "-sV -p 22,80,443"}2. Get scan details:
Call tool: get-scan-details
Parameters: {"scan_id": ""}3. List all scans:
Call tool: list-all-scans4. Analyze scan results:
Get prompt: analyze-scan
Parameters: {"scan_id": "", "focus": "security"}Security Considerations
This server executes nmap commands on your system. Be cautious when scanning networks you don't own or have permission to scan, as unauthorized scanning may be illegal in some jurisdictions.
Troubleshooting
If you encounter errors related to nmap not being found or being executed incorrectly:
1. Make sure nmap is installed and available in your PATH
2. Check the logs for which nmap executable is being used
3. The server will attempt to use the full path to nmap to avoid conflicts
Docker Usage
You can run the MCP server in a Docker container:
# Build the Docker image
docker build -t nmap-mcp-server .
# Run the Docker container
docker run -it --rm nmap-mcp-serverFor integration with the Glama MCP directory, the Docker container allows others to easily use this MCP server without worrying about installation dependencies.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Frequently asked questions
What is nmap-mcpserver?
nmap-mcpserver is This is a Model Control Protocol (MCP) server that provides access to nmap network scanning functionality.
How do I install nmap-mcpserver?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is nmap-mcpserver open source?
Yes — it is hosted on GitHub at https://github.com/imjdl/nmap-mcpserver and has 11 stars.
Related MCP tools
🙌 OpenHands: Code Less, Make More for the Model Context Protocol. Enhance AI assistants with powerful integrations. Python-based implementation.
Universal memory layer for AI Agents; Announcing OpenMemory MCP - local and secure memory management. Python-based implementation.
基于大模型搭建的聊天机器人,同时支持 微信公众号、企业微信应用、飞书、钉钉 等接入,可选择ChatGPT/Claude/DeepSeek/文心一言/讯飞星火/通义千问/ Gemini/GLM-4/Kimi/LinkAI,能处理文本、语音和图片,访问操作系统和互联网,支持基于自有知识库进行定制企业智能客服。
An LLM agent that conducts deep research (local and web) on any given topic and generates a long report with citations. Built for the Model Context Protocol to
🚀 The fast, Pythonic way to build MCP servers and clients Trusted by 19900+ developers. Trusted by 19900+ developers. Trusted by 19900+ developers.
🔥 MaxKB is an open-source platform for building enterprise-grade agents. MaxKB 是强大易用的开源企业级智能体平台。 for the Model Context Protocol. Enhance AI assistants with po
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP