home / mcp / nmap mcp server

NMAP MCP Server

Provides a simple MCP server to communicate with NMAP, enabling MCP client interactions.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "christopherwoodall-nmap-mcp": {
      "command": "mcp",
      "args": [
        "dev",
        "src/server.py"
      ]
    }
  }
}

You can run a Python-based MCP server that exposes an interface to communicate with NMAP, enabling MCP clients to interact with your NMAP workflows and results in a structured, consistent way.

How to use

To operate the NMAP MCP Server, start the server locally and connect your MCP client to it. The server exposes an MCP entry point that accepts client requests and returns results in a standardized format. You will typically run a local instance and then use your MCP client to invoke actions, submit scans, or retrieve results through the MCP protocol. Ensure you are running from a controlled environment so the server can access any required resources or network endpoints.

How to install

Prerequisites: you need Python 3 and a virtual environment tool available on your system.

1) Create and activate a virtual environment.

venv venv
source venv/bin/activate

2) Install the MCP server in editable mode so you can run it directly from your source tree.

pip install -e .

3) Start the MCP server for development.

mcp dev src/server.py

Additional content

Security and environment: run the server inside your trusted network or with proper authentication if you expose it externally. Use a dedicated virtual environment per project to isolate dependencies. If you need to adjust runtime behavior, consider configuring the server through environment variables or explicit runtime flags as your setup requires.