Nmap MCP Server
Nmap MCP 서버
이는 nmap 네트워크 스캐닝 기능에 대한 액세스를 제공하는 모델 제어 프로토콜(MCP) 서버입니다.
특징
사용자 정의 가능한 옵션을 사용하여 지정된 대상에 대한 nmap 스캔을 실행합니다.
스캔 결과 저장 및 검색
AI 프롬프트를 사용하여 스캔 결과 분석
Related MCP server: Nmap MCP Server
설치
요구 사항:
파이썬 3.10+
파이썬-libnmap
nmap(시스템에 설치됨)
지엑스피1
시스템에 nmap이 설치되어 있는지 확인하세요:
# On Debian/Ubuntu
sudo apt-get install nmap
# On Fedora/CentOS
sudo dnf install nmap용법
서버 실행
소스 코드에서 직접 서버를 실행하려면:
python -m src.nmap_mcp패키지를 설치하고 명령으로 실행하려면:
pip install -e .
nmap-mcp사용 가능한 도구
실행-nmap-스캔
지정된 대상에 대해 nmap 스캔을 실행합니다.
매개변수:
target: 대상 호스트 또는 네트워크(예: 192.168.1.1 또는 192.168.1.0/24)options: Nmap 옵션(예: -sV -p 1-1000)
스캔 세부 정보 가져오기
특정 스캔에 대한 자세한 정보를 얻으세요
매개변수:
scan_id: 검색할 스캔의 ID
모든 스캔 목록
사용 가능한 모든 스캔 결과 나열
매개변수가 필요하지 않습니다
사용 가능한 프롬프트
분석-스캔
nmap 스캔 결과 분석
매개변수:
scan_id: 분석할 스캔의 IDfocus: 집중 분야(보안/서비스/개요)
자원
스캔 결과는 nmap://scan/{scan_id} URI 체계를 사용하여 리소스로 사용할 수 있습니다.
워크플로 예시
검사를 실행하세요:
Call tool: run-nmap-scan Parameters: {"target": "192.168.1.0/24", "options": "-sV -p 22,80,443"}스캔 세부 정보 받기:
Call tool: get-scan-details Parameters: {"scan_id": "<scan_id from previous step>"}모든 스캔을 나열하세요:
Call tool: list-all-scans검사 결과 분석:
Get prompt: analyze-scan Parameters: {"scan_id": "<scan_id>", "focus": "security"}
보안 고려 사항
이 서버는 사용자 시스템에서 nmap 명령을 실행합니다. 소유하지 않았거나 스캔 권한이 없는 네트워크를 스캔할 때는 주의하십시오. 일부 관할 지역에서는 무단 스캔이 불법일 수 있습니다.
문제 해결
nmap을 찾을 수 없거나 잘못 실행된 것과 관련된 오류가 발생하는 경우:
nmap이 설치되어 PATH에 사용 가능한지 확인하세요.
nmap 실행 파일이 사용되는 로그를 확인하세요.
서버는 충돌을 피하기 위해 nmap에 대한 전체 경로를 사용하려고 시도합니다.
Docker 사용법
Docker 컨테이너에서 MCP 서버를 실행할 수 있습니다.
# Build the Docker image
docker build -t nmap-mcp-server .
# Run the Docker container
docker run -it --rm nmap-mcp-serverGlama MCP 디렉토리와 통합하기 위해 Docker 컨테이너를 사용하면 다른 사용자가 설치 종속성을 걱정하지 않고도 이 MCP 서버를 쉽게 사용할 수 있습니다.
특허
이 프로젝트는 MIT 라이선스에 따라 라이선스가 부여되었습니다. 자세한 내용은 라이선스 파일을 참조하세요.
Available Tools
3 toolsget-scan-detailsC
Get detailed information about a specific scan
Inputs: scan_id (required).
list-all-scansB
List all available scan results
Inputs: no named parameters.
run-nmap-scanC
Run an nmap scan on specified targets
Inputs: target (required), options.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool has a clearly distinct purpose with no overlap: get-scan-details retrieves specific scan information, list-all-scans shows all available results, and run-nmap-scan performs new scans. The actions (get, list, run) and targets (details, scans, scan) are well-differentiated, making misselection unlikely.
All tools follow a consistent verb-noun pattern with hyphens (get-scan-details, list-all-scans, run-nmap-scan). The naming is predictable and readable, using clear action words and descriptive nouns without any deviations in style or convention.
With only 3 tools, the server feels thin for an nmap domain, which typically involves more operations like managing scan configurations, exporting results, or filtering scans. While the core functions are covered, the limited count may restrict agent flexibility in complex scenarios.
The tools cover the basic lifecycle of running, listing, and retrieving scans, but there are minor gaps such as updating or deleting scans, or handling scan parameters more granularly. Agents can work around these with the existing tools, but the surface is not fully comprehensive.
Related MCP Connectors
Security scanner for MCP servers. Detect vulnerabilities, prompt injection, and tool poisoning.
Scans remote MCP servers for protocol, security, and TLS issues; exposes scan tools via MCP.
MCP server for Pentest-Tools.com: run scans, manage findings and reports via your preffered LLM.
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
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.117-
- FlicenseNot gradedqualityDmaintenanceEnables 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.-
- AlicenseNot gradedqualityDmaintenanceEnables 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.3MIT
- AlicenseAqualityDmaintenanceA 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.617Apache 2.0