nmap-mcp for Openclaw

A specialized MCP server wrapping nmap to provide structured, scoped, and logged network scanning tools for AI agents.

sbmilburn
v1.0.0
Mar 5, 2026
1
1.2k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install nmap-mcp

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install nmap-mcp using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is nmap-mcp?

nmap-mcp is a sophisticated Model Context Protocol (MCP) server designed to bridge the gap between AI agents and professional-grade network scanning. By wrapping the industry-standard nmap utility, it provides 14 purpose-built tools that return data in structured JSON format rather than raw text. This Openclaw Skills entry is specifically engineered for security professionals and developers who need to perform host discovery, service fingerprinting, and vulnerability assessments within controlled, authorized environments.

The integration ensures that AI-driven security audits are both safe and efficient by implementing strict scope enforcement and audit logging. By providing structured output, it allows agents to reason about network topology, open ports, and service vulnerabilities more effectively than traditional command-line interactions.

nmap-mcp Use Cases

  • Automated asset discovery and host identification within authorized CIDR ranges.
  • Performing deep service and OS fingerprinting during routine security audits.
  • Executing Nmap Scripting Engine (NSE) scripts to identify specific vulnerabilities.
  • Maintaining persistent, queryable records of network scans for compliance and historical analysis.
  • Integrating real-time network reconnaissance into autonomous AI agent debugging and security workflows.

How nmap-mcp Works

  1. The AI agent initiates a scan request using one of the 14 available tools provided by this Openclaw Skills integration.
  2. The server validates the target IP address or range against a pre-configured allowed_cidrs list to ensure scope enforcement.
  3. The command is passed to the system nmap binary, utilizing elevated raw socket capabilities where necessary (e.g., for SYN or OS detection).
  4. The raw nmap output is captured and parsed into a clean, structured JSON format for easier machine consumption.
  5. The scan results are saved to a local directory for persistence and the action is recorded in a centralized audit log for transparency.

nmap-mcp Setup

First, ensure the system dependencies and Python libraries are installed:

pip install fastmcp python-nmap pyyaml

Grant the nmap binary raw socket capabilities to allow for SYN and OS detection scans without requiring full root privileges for every execution:

sudo setcap cap_net_raw+ep $(which nmap)

Configure your security parameters by editing the config.yaml file to define your allowed_cidrs. Finally, register the skill in your mcporter.json to make it available as part of your Openclaw Skills library.

nmap-mcp Data Schema & Taxonomy

The skill manages data across three primary layers to ensure reliability and traceability:

  • Configuration (YAML): Defines global settings including allowed_cidrs, binary paths, and execution timeouts.
  • Audit Logs (Text): A continuous log file (audit.log) that records every scan attempt, target, and timestamp.
  • Scan Repository (JSON): Individual scan results are stored as JSON files in a dedicated directory, allowing for retrieval using a unique scan ID.
Data Point Description
Host Status Up/Down state of the target
Port Data State, Protocol, and Service name
Fingerprints OS and Service version details
NSE Results Output from specialized nmap scripts

nmap-mcp Advanced Features

  • Strict CIDR-based scope enforcement to prevent unauthorized or accidental scanning of sensitive networks.
  • Support for privileged scanning modes including SYN, UDP, and ARP discovery using cap_net_raw.
  • Comprehensive NSE (Nmap Scripting Engine) support for vulnerability scanning and custom script execution.
  • Full scan persistence allowing agents to list and retrieve historical data without re-running scans.
  • Integrated audit logging for compliance-ready tracking of all network reconnaissance activities performed via Openclaw Skills.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*