Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

nmap-mcp-server

MCP.Pizza Chef: PhialsBasement

The nmap-mcp-server is a Model Context Protocol (MCP) server that integrates NMAP's powerful network scanning capabilities with AI assistants. It provides a standardized interface for AI models to execute network analysis, port scanning, version detection, and security assessments through conversational AI workflows. Designed for Windows environments with Node.js and TypeScript, this server leverages NMAP's native command-line interface to ensure reliable and consistent scanning results. It supports quick scans, full port scans, and custom timing templates, making it a versatile tool for automated network security tasks within AI-driven applications.

Use This MCP server To

Automate network port scanning via AI assistants Perform security assessments through conversational AI Detect open ports and services on target hosts Integrate NMAP scans into AI-driven workflows Conduct version detection of network services Run custom timed network scans programmatically

README

MCP NMAP Server

A Model Context Protocol (MCP) server that enables AI assistants to perform network scanning operations using NMAP. This server provides a standardized interface for AI models to interact with NMAP, making it possible to perform network analysis and security assessments through AI conversations.

Prerequisites

  • Windows operating system
  • Node.js (v18 or higher)
  • NMAP installed and accessible from Windows command line
  • TypeScript for development

Installation

Install the package globally using npm:

npm install -g mcp-nmap-server

Or install locally in your project:

npm install mcp-nmap-server

Features

The server provides access to NMAP's core functionality through a simple interface. It supports quick scans, full port scans, version detection, and custom timing templates. The implementation uses NMAP's native command-line interface, ensuring reliability and consistency with standard NMAP operations.

Configuration with Claude Desktop

To use this server with Claude Desktop on Windows, you'll need to configure it in the Claude configuration file located at: C:\Users\YOUR_USERNAME\AppData\Roaming\Claude\config.json

Add the NMAP server to your configuration by adding it to the mcpServers section. Here's a complete example of a Claude Desktop configuration file:

{
    "mcpServers": {
        "nmap": {
            "command": "node",
            "args": [
                "C:\\Users\\YOUR_USERNAME\\Downloads\\mcp-nmap-server\\dist\\index.js"
            ]
        }
    },
    "globalShortcut": "Ctrl+Q"
}

Replace YOUR_USERNAME with your Windows username and adjust the path to where you've installed the NMAP server.

Usage with AI

Once configured, AI assistants like Claude can use the server through the run_nmap_scan function. The function accepts the following parameters:

{
    target: string;            // Host or network to scan
    ports?: string;           // Optional port specification (e.g., "80,443" or "1-1000")
    scanType?: 'quick' | 'full' | 'version';  // Scan type (default: 'quick')
    timing?: number;          // NMAP timing template 0-5 (default: 3)
    additionalFlags?: string; // Optional additional NMAP flags
}

Example conversation with Claude:

Human: Can you scan localhost for open ports?

Claude: I'll help you scan localhost using NMAP.

<runs nmap scan with parameters>
target: "localhost"
scanType: "quick"
timing: 3

License

MIT License

Support

For issues, suggestions, or contributions, please visit the GitHub repository.

nmap-mcp-server FAQ

How do I install the nmap-mcp-server?
Install it globally with 'npm install -g mcp-nmap-server' or locally with 'npm install mcp-nmap-server'.
What are the prerequisites for running nmap-mcp-server?
You need Windows OS, Node.js v18 or higher, NMAP installed and accessible via command line, and TypeScript for development.
How does nmap-mcp-server interact with NMAP?
It uses NMAP's native command-line interface to perform scans, ensuring reliability and consistency with standard NMAP operations.
Can I customize scan types with nmap-mcp-server?
Yes, it supports quick scans, full port scans, version detection, and custom timing templates.
Is nmap-mcp-server compatible with AI models from different providers?
Yes, it is designed to work with AI assistants using MCP, compatible with models like OpenAI, Claude, and Gemini.
How do I configure nmap-mcp-server with AI assistants?
Configuration details are provided in the documentation, typically involving setting up the MCP client to communicate with the server.
Does nmap-mcp-server support platforms other than Windows?
Currently, it requires Windows OS due to dependencies on NMAP's command-line availability on Windows.
What programming languages are used in nmap-mcp-server development?
It is developed using Node.js and TypeScript.