Cover image
Try Now
2025-01-30

模型上下文协议(MCP)服务器,使AI助手可以使用NMAP执行网络扫描操作

3 years

Works with Finder

1

Github Watches

3

Github Forks

9

Github Stars

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.

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Bora Yalcin
  • Evaluator for marketplace product descriptions, checks for relevancy and keyword stuffing.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Callycode Limited
  • A geek-themed horoscope generator blending Bitcoin prices, tech jargon, and astrological whimsy.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Khalid kalib
  • Write professional emails

  • XLwebDev.com
  • PR Professional: Guiding You to Get Media Placements and Publicity Quickly and Effectively

  • Jan Meindl
  • Builds new GPTs

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • OffchainLabs
  • 进行以太坊的实施

  • huahuayu
  • 统一的API网关,用于将多个Etherscan样区块链Explorer API与对AI助手的模型上下文协议(MCP)支持。

  • deemkeen
  • 用电源组合控制您的MBOT2:MQTT+MCP+LLM

    Reviews

    5 (1)
    Avatar
    user_OwHktkOu
    2025-04-16

    The nmap-mcp-server by PhialsBasement is an impressive tool for anyone looking to enhance their network scanning capabilities. Easy to use and integrates seamlessly with other systems, it provides comprehensive results efficiently. Highly recommended for both amateurs and professionals in cybersecurity! Check it out here: https://github.com/PhialsBasement/nmap-mcp-server