nmap-mcp-server
A Model Context Protocol (MCP) server that enables AI assistants to perform network scanning operations using NMAP
Documentation
DO NOT USE THIS UNLESS YOU ARE WILLING TO EXPOSE YOURSELF TO POSSIBLE VULNRABILITIES DUE TO PROMPT INJECTION. THIS REPOSITORY IS NOT BEING ACTIVELY WORKED UPON
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-serverOr install locally in your project:
npm install mcp-nmap-serverFeatures
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.
target: "localhost"
scanType: "quick"
timing: 3License
MIT License
Support
For issues, suggestions, or contributions, please visit the GitHub repository.
Frequently asked questions
What is nmap-mcp-server?
nmap-mcp-server is A Model Context Protocol (MCP) server that enables AI assistants to perform network scanning operations using NMAP
How do I install nmap-mcp-server?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is nmap-mcp-server open source?
Yes — it is hosted on GitHub at https://github.com/PhialsBasement/nmap-mcp-server and has 35 stars.
Related MCP tools
The all-in-one Desktop & Docker AI application with built-in RAG, AI agents, No-code agent builder, MCP compatibility, and more.
An AI-powered task-management system you can drop into Cursor, Lovable, Windsurf, Roo, and others. Built for the Model Context Protocol to enhance AI capabiliti
Fay是一个帮助数字人(2.5d、3d、移动、pc、网页)或大语言模型(openai兼容、deepseek)连通业务系统的mcp框架。 JavaScript-based implementation. Trusted by 12000+ developers.
CTTF: MCP integration between Cursor and Figma, allowing Cursor Agentic AI to communicate with Figma for reading designs and modifying them programmatically.
🔥 Official Firecrawl MCP Server - Adds powerful web scraping and search to Cursor, Claude and any other LLM clients. JavaScript-based implementation.
This is MCP server for Claude that gives it terminal control, file system search and diff file editing capabilities JavaScript-based implementation.
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP