gc-nmap-mcp
TypeScript icon, indicating that this package has built-in type declarations

1.1.2 • Public • Published

Nmap MCP Server

A Model Context Protocol (MCP) server for interacting with the Nmap network scanner.

Features

  • Run Nmap scans with customizable parameters
  • Provides the full power of Nmap to AI assistants
  • Supports all Nmap scan types and options
  • Easy integration with Claude and other MCP-compatible AI assistants

Installation

# Install globally
npm install -g gc-nmap-mcp

# Or run directly without installing
npx gc-nmap-mcp

Configuration

This server requires the path to the Nmap executable to be set via the NMAP_PATH environment variable.

Example:

# Linux/macOS
export NMAP_PATH=/usr/bin/nmap

# Windows
set NMAP_PATH=C:\Program Files (x86)\Nmap\nmap.exe

Usage

Command Line

# With NMAP_PATH environment variable set
npx gc-nmap-mcp

With Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "nmap": {
      "command": "npx",
      "args": ["-y", "gc-nmap-mcp"],
      "env": {
        "NMAP_PATH": "C:\\Program Files (x86)\\Nmap\\nmap.exe"
      }
    }
  }
}

With Other MCP Clients

For other MCP clients, you can configure them to use this server with:

NMAP_PATH=/path/to/nmap npx gc-nmap-mcp

API

The server provides the following tool:

  • do-nmap: Run Nmap with specified target and arguments

License

Apache-2.0

Package Sidebar

Install

npm i gc-nmap-mcp

Weekly Downloads

5

Version

1.1.2

License

Apache-2.0

Unpacked Size

11.5 kB

Total Files

3

Last publish

Collaborators

  • ghostcrew