MCP NMAP Server

by PhialsBasement
Verified

local-only server

The server can only run on the client’s local machine because it depends on local resources.

MCP NMAP 服务器

模型上下文协议 (MCP) 服务器,使 AI 助手能够使用 NMAP 执行网络扫描操作。该服务器为 AI 模型与 NMAP 交互提供了标准化接口,从而可以通过 AI 对话进行网络分析和安全评估。

先决条件

  • Windows操作系统
  • Node.js(v18 或更高版本)
  • NMAP 已安装并可从 Windows 命令行访问
  • 用于开发的 TypeScript

安装

通过 Smithery 安装

要通过Smithery自动为 Claude Desktop 安装 NMAP 服务器:

npx -y @smithery/cli install mcp-nmap-server --client claude

手动安装

使用 npm 全局安装包:

npm install -g mcp-nmap-server

或者在您的项目中本地安装:

npm install mcp-nmap-server

特征

该服务器通过简单的界面提供对 NMAP 核心功能的访问。它支持快速扫描、全端口扫描、版本检测和自定义计时模板。该实现使用 NMAP 的原生命令行界面,确保可靠性并与标准 NMAP 操作保持一致。

使用 Claude Desktop 进行配置

要在 Windows 上将此服务器与 Claude Desktop 一起使用,您需要在位于以下位置的 Claude 配置文件中进行配置: C:\Users\YOUR_USERNAME\AppData\Roaming\Claude\config.json

将 NMAP 服务器添加到mcpServers部分,并将其添加到您的配置中。以下是 Claude Desktop 配置文件的完整示例:

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

YOUR_USERNAME替换为您的 Windows 用户名,并将路径调整为您安装 NMAP 服务器的位置。

与人工智能的使用

配置完成后,像 Claude 这样的 AI 助手可以通过run_nmap_scan函数使用服务器。该函数接受以下参数:

{ 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 }

与 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

执照

MIT 许可证

支持

如有问题、建议或贡献,请访问 GitHub 存储库。

-
security - not tested
A
license - permissive license
-
quality - not tested

使AI助手能够使用NMAP执行网络扫描操作,为通过AI对话进行网络分析和安全评估提供标准化接口。

  1. Prerequisites
    1. Installation
      1. Installing via Smithery
      2. Manual Installation
    2. Features
      1. Configuration with Claude Desktop
        1. Usage with AI
          1. License
            1. Support
              ID: 4yj1if5lxy