{"id":47940774,"url":"https://github.com/daedalus/mcp-server-nmap","last_synced_at":"2026-04-04T08:01:49.090Z","repository":{"id":349090366,"uuid":"1200973046","full_name":"daedalus/mcp-server-nmap","owner":"daedalus","description":"MCP server that exposes the python-nmap library as MCP tools for network scanning operations.","archived":false,"fork":false,"pushed_at":"2026-04-04T06:12:11.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-04-04T07:25:03.305Z","etag":null,"topics":["mcp","network-scanner","nmap"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daedalus.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-04T03:41:34.000Z","updated_at":"2026-04-04T06:11:52.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/daedalus/mcp-server-nmap","commit_stats":null,"previous_names":["daedalus/mcp-server-nmap"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/daedalus/mcp-server-nmap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daedalus%2Fmcp-server-nmap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daedalus%2Fmcp-server-nmap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daedalus%2Fmcp-server-nmap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daedalus%2Fmcp-server-nmap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daedalus","download_url":"https://codeload.github.com/daedalus/mcp-server-nmap/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daedalus%2Fmcp-server-nmap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31392188,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T04:26:24.776Z","status":"ssl_error","status_checked_at":"2026-04-04T04:23:34.147Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mcp","network-scanner","nmap"],"created_at":"2026-04-04T08:01:23.962Z","updated_at":"2026-04-04T08:01:49.081Z","avatar_url":"https://github.com/daedalus.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mcp-server-nmap\n\nMCP server that exposes the python-nmap library as MCP tools for network scanning operations.\n\n[![PyPI](https://img.shields.io/pypi/v/mcp-server-nmap.svg)](https://pypi.org/project/mcp-server-nmap/)\n[![Python](https://img.shields.io/pypi/pyversions/mcp-server-nmap.svg)](https://pypi.org/project/mcp-server-nmap/)\n\n## What is this?\n\nThis MCP server wraps the python-nmap library, allowing AI assistants to perform network reconnaissance through MCP tools. It provides three scanning interfaces:\n\n1. **PortScanner** (synchronous) - Blocking scans that wait for completion\n2. **PortScannerAsync** (asynchronous) - Non-blocking scans with callbacks\n3. **PortScannerYield** (generator) - Streaming results as hosts are discovered\n\n## Prerequisites\n\n- [nmap](https://nmap.org/) must be installed on the system\n- Python 3.10+\n\n## Install\n\n```bash\npip install mcp-server-nmap\n```\n\n**mcp-name:** io.github.daedalus/mcp-server-nmap\n\n## MCP Server Registration\n\nAdd this to your MCP settings file:\n\n```json\n{\n  \"mcpServers\": {\n    \"mcp-server-nmap\": {\n      \"command\": \"mcp-server-nmap\"\n    }\n  }\n}\n```\n\nOr with custom nmap path:\n\n```json\n{\n  \"mcpServers\": {\n    \"mcp-server-nmap\": {\n      \"command\": \"mcp-server-nmap\",\n      \"env\": {\n        \"PATH\": \"/custom/path:$PATH\"\n      }\n    }\n  }\n}\n```\n\n## Available Tools\n\n### Initialization\n\n| Tool | Description |\n|------|-------------|\n| `port_scanner_init` | Initialize synchronous PortScanner |\n| `port_scanner_async_init` | Initialize async PortScannerAsync |\n| `port_scanner_yield_init` | Initialize generator-based PortScannerYield |\n\n### Scanning\n\n| Tool | Description |\n|------|-------------|\n| `port_scanner_scan` | Scan hosts with nmap (synchronous) |\n| `port_scanner_async_scan` | Scan hosts (async, non-blocking) |\n| `port_scanner_yield_scan` | Scan with streaming results |\n| `port_scanner_listscan` | List hosts without scanning |\n\n### Results \u0026 State\n\n| Tool | Description |\n|------|-------------|\n| `port_scanner_all_hosts` | Get all scanned hosts |\n| `port_scanner_has_host` | Check if host was scanned |\n| `port_scanner_get_item` | Get detailed host scan data |\n| `port_scanner_scaninfo` | Get scan configuration info |\n| `port_scanner_scanstats` | Get scan statistics |\n| `port_scanner_command_line` | Get nmap command used |\n| `port_scanner_csv` | Get CSV output |\n| `port_scanner_last_output` | Get raw nmap text output |\n\n### Async Control\n\n| Tool | Description |\n|------|-------------|\n| `port_scanner_async_still_scanning` | Check if scan in progress |\n| `port_scanner_async_stop` | Stop running scan |\n| `port_scanner_async_wait` | Wait for scan to complete |\n\n### XML Parsing\n\n| Tool | Description |\n|------|-------------|\n| `port_scanner_analyse_xml` | Parse existing nmap XML output |\n\n## Common Scan Workflows\n\n### Basic port scan\n\n```python\n# Initialize scanner\nport_scanner_init()\n\n# Scan target\nport_scanner_scan(hosts=\"192.168.1.1\", ports=\"22,80,443\", arguments=\"-sV\")\n\n# Get results\nport_scanner_get_item(host=\"192.168.1.1\")\n```\n\n### Service version detection\n\n```python\nport_scanner_scan(hosts=\"scanme.nmap.org\", arguments=\"-sV -sC\")\n```\n\n### Scan multiple hosts\n\n```python\nport_scanner_scan(hosts=\"192.168.1.1-254\", arguments=\"-sS -p 22\")\nport_scanner_all_hosts()\n```\n\n### Network sweep\n\n```python\nport_scanner_scan(hosts=\"192.168.1.0/24\", arguments=\"-sn\")\nport_scanner_csv()  # Export to CSV\n```\n\n## nmap Arguments Reference\n\n| Argument | Description |\n|----------|-------------|\n| `-sn` | Ping scan (host discovery) |\n| `-sS` | TCP SYN scan |\n| `-sT` | TCP connect scan |\n| `-sU` | UDP scan |\n| `-sV` | Service version detection |\n| `-sC` | Default scripts |\n| `-O` | OS detection |\n| `-p` | Port range |\n| `-oA` | Output all formats |\n\n## Development\n\n```bash\ngit clone https://github.com/daedalus/mcp-server-nmap.git\ncd mcp-server-nmap\npip install -e \".[test]\"\n\n# run tests\npytest\n\n# format\nruff format src/ tests/\n\n# lint\nruff check src/ tests/\n\n# type check\nmypy src/\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaedalus%2Fmcp-server-nmap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaedalus%2Fmcp-server-nmap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaedalus%2Fmcp-server-nmap/lists"}