nmap-mcp-server logo

nmap-mcp-server

by jarrodcoulter

This project provides a web-based chat interface using Gradio where users can interact with an AI assistant powered by the OpenAI API. The assistant is equipped with tools to interact with the local filesystem and perform network scans using a containerized Nmap server.

View on GitHub

Last updated: N/A

What is nmap-mcp-server?

This is a web application that integrates an AI assistant with Nmap network scanning capabilities. It uses the OpenAI Agents SDK, a Gradio frontend, and a containerized Nmap server to allow users to perform network scans through a conversational interface.

How to use nmap-mcp-server?

First, clone the repository and set your OpenAI API key as an environment variable. Then, build the Nmap Docker image and install the Python dependencies. Finally, run the app.py script to start the application and interact with the AI assistant through the Gradio web interface.

Key features of nmap-mcp-server

  • Conversational AI assistant

  • Filesystem access tool

  • Network scanning tools via Nmap

  • Web-based UI using Gradio

  • Containerized Nmap tool server using Docker

Use cases of nmap-mcp-server

  • Network reconnaissance

  • Security auditing

  • Vulnerability assessment

  • Automated network scanning

FAQ from nmap-mcp-server

What is the purpose of the MCP server?

The MCP (Model Context Protocol) server provides a standardized way for the AI agent to interact with external tools, in this case, the filesystem and the Nmap scanner.

Why is Nmap running in a Docker container?

Running Nmap in a Docker container ensures consistent dependency management and provides isolation for security purposes.

What are the prerequisites for running this application?

You need Python 3.9+, Docker, Node.js/npm, and an OpenAI API key.

How do I set the OpenAI API key?

You need to export your API key as an environment variable named OPENAI_API_KEY.

What Nmap scan types are supported?

The application supports ping scans, top 100 port scans, comprehensive scans, all 65535 ports scans, and SMB share enumeration scans.