mcp-server-nmap
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-server-nmapScan scanme.nmap.org for open ports"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-server-nmap
MCP server that exposes the python-nmap library as MCP tools for network scanning operations.
What is this?
This MCP server wraps the python-nmap library, allowing AI assistants to perform network reconnaissance through MCP tools. It provides three scanning interfaces:
PortScanner (synchronous) - Blocking scans that wait for completion
PortScannerAsync (asynchronous) - Non-blocking scans with callbacks
PortScannerYield (generator) - Streaming results as hosts are discovered
Related MCP server: Nmap MCP Server
Prerequisites
nmap must be installed on the system
Python 3.10+
Install
pip install mcp-server-nmapmcp-name: io.github.daedalus/mcp-server-nmap
MCP Server Registration
Add this to your MCP settings file:
{
"mcpServers": {
"mcp-server-nmap": {
"command": "mcp-server-nmap"
}
}
}Or with custom nmap path:
{
"mcpServers": {
"mcp-server-nmap": {
"command": "mcp-server-nmap",
"env": {
"PATH": "/custom/path:$PATH"
}
}
}
}Available Tools
Initialization
Tool | Description |
| Initialize synchronous PortScanner |
| Initialize async PortScannerAsync |
| Initialize generator-based PortScannerYield |
Scanning
Tool | Description |
| Scan hosts with nmap (synchronous) |
| Scan hosts (async, non-blocking) |
| Scan with streaming results |
| List hosts without scanning |
Results & State
Tool | Description |
| Get all scanned hosts |
| Check if host was scanned |
| Get detailed host scan data |
| Get scan configuration info |
| Get scan statistics |
| Get nmap command used |
| Get CSV output |
| Get raw nmap text output |
Async Control
Tool | Description |
| Check if scan in progress |
| Stop running scan |
| Wait for scan to complete |
XML Parsing
Tool | Description |
| Parse existing nmap XML output |
Common Scan Workflows
Basic port scan
# Initialize scanner
port_scanner_init()
# Scan target
port_scanner_scan(hosts="192.168.1.1", ports="22,80,443", arguments="-sV")
# Get results
port_scanner_get_item(host="192.168.1.1")Service version detection
port_scanner_scan(hosts="scanme.nmap.org", arguments="-sV -sC")Scan multiple hosts
port_scanner_scan(hosts="192.168.1.1-254", arguments="-sS -p 22")
port_scanner_all_hosts()Network sweep
port_scanner_scan(hosts="192.168.1.0/24", arguments="-sn")
port_scanner_csv() # Export to CSVnmap Arguments Reference
Argument | Description |
| Ping scan (host discovery) |
| TCP SYN scan |
| TCP connect scan |
| UDP scan |
| Service version detection |
| Default scripts |
| OS detection |
| Port range |
| Output all formats |
Development
git clone https://github.com/daedalus/mcp-server-nmap.git
cd mcp-server-nmap
pip install -e ".[test]"
# run tests
pytest
# format
ruff format src/ tests/
# lint
ruff check src/ tests/
# type check
mypy src/This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseBqualityDmaintenanceExposes Nmap network scanning capabilities through a Model Context Protocol (MCP) server, allowing users to perform various types of network scans including vulnerability assessment, service detection, and OS fingerprinting.Last updated115
- Flicense-qualityDmaintenanceEnables network scanning and security assessment using Nmap through MCP, allowing AI assistants to perform port scans, service detection, and network reconnaissance on specified targets with configurable scan parameters.Last updated
- Alicense-qualityDmaintenanceEnables network security scanning using Nmap through MCP protocol. Supports quick port scans, full port scans with service detection, and custom Nmap commands with async task management.Last updated3MIT
- AlicenseAqualityFmaintenanceA production-ready MCP server that wraps Nmap to enable AI agents to perform automated network security assessments, including port scanning, host discovery, service detection, OS fingerprinting, and vulnerability scanning.Last updated613Apache 2.0
Related MCP Connectors
MCP server for Pentest-Tools.com: run scans, manage findings and reports via your preffered LLM.
Security scanner for MCP servers. Detect vulnerabilities, prompt injection, and tool poisoning.
Shodan InternetDB MCP — wraps Shodan InternetDB (internetdb.shodan.io)
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/daedalus/mcp-server-nmap'
If you have feedback or need assistance with the MCP directory API, please join our Discord server