Sponsored by Deepsite.site

NmapMCP

Created By
0xPratikPatil9 months ago
NmapMCP is a robust integration of the Nmap scanning tool with the Model Context Protocol (MCP), enabling seamless network scanning capabilities within MCP-compatible environments
Content

NmapMCP

smithery badge NmapMCP is a robust integration of the Nmap scanning tool with the Model Context Protocol (MCP), enabling seamless network scanning capabilities within MCP-compatible environments. This project allows users to perform various network scans, such as top ports scanning, DNS brute force, and more, directly through MCP interfaces.

Features

  • Top Ports Scanning: Quickly identify the most commonly used ports on target hosts to assess potential entry points.

  • DNS Brute Force: Discover subdomains associated with a target domain, aiding in comprehensive domain mapping.

  • List Scan: Obtain a list of active hosts within a specified range without port scanning, useful for network inventory.

  • OS Detection: Determine the operating system of a target host by analyzing network responses, assisting in vulnerability assessment.

  • Version Detection: Identify service versions running on open ports to detect outdated or vulnerable services.

  • FIN Scan: Perform stealthy scans by sending FIN packets to detect open ports without establishing a full connection.

  • Idle Scan: Conduct highly stealthy scans by leveraging idle hosts to probe target systems, minimizing detection risks.

  • Ping Scan: Detect active hosts in a network by sending ICMP echo requests, useful for network mapping.

  • SYN Scan: Perform half-open TCP scans to identify open ports without completing the TCP handshake, reducing detection likelihood.

  • TCP Connect Scan: Establish full TCP connections to probe open ports, useful when SYN scans are not feasible.

  • UDP Scan: Identify open UDP ports on a target host to detect services that do not use TCP.

  • Port Scan Only: Focus solely on scanning ports without additional host discovery, streamlining the scanning process.

  • No Port Scan: Perform host discovery without scanning ports, useful for identifying live hosts without probing services.

  • ARP Discovery: Identify active devices within a local network segment using ARP requests, effective in LAN environments.

  • Disable DNS Resolution: Perform scans without resolving IP addresses to hostnames, enhancing scan speed and reducing DNS query traffic.

Installation

Installing via Smithery

To install Nmap Integration for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @0xPratikPatil/nmapmcp --client claude

Manual Installation

  1. Clone the Repository:

    git clone https://github.com/0xPratikPatil/NmapMCP.git
    cd NmapMCP
    
  2. Install uv:

    curl -LsSf https://astral.sh/uv/install.sh | sh
    
  3. Create environment:

    uv venv
    
  4. Install dependencies from pyproject.toml

    uv pip install
    

    or

    uv pip install -r pyproject.toml
    

Configuration

To configure the Nmap MCP Server, edit the claude_desktop_config.json file located in the project root. This file allows you to set default scan arguments, define MCP tool behaviors, and adjust logging settings.

Example claude_desktop_config.json:

{
  "mcpServers": {
    "NmapMCP": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/NmapMCP",
        "run",
        "main.py"
      ]
    }
  }
}

Contributing

Contributions are welcome! To contribute:

  1. Fork the Repository: Click the "Fork" button at the top right of the repository page.

  2. Clone Your Fork:

    git clone https://github.com/0xPratikPatil/NmapMCP.git
    
  3. Create a New Branch:

    git checkout -b feature/your-feature-name
    
  4. Make Your Changes: Implement your feature or fix.

  5. Run Tests: Ensure all tests pass.

  6. Commit Changes:

    git commit -m "Add feature: your feature name"
    
  7. Push to Your Fork:

    git push origin feature/your-feature-name
    
  8. Submit a Pull Request: Navigate to the original repository and click "New Pull Request."

License

This project is licensed under the MIT License.

Acknowledgments

Special thanks to the Nmap and MCP communities for their invaluable tools and support.

Server Config

{
  "mcpServers": {
    "NmapMCP": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/NmapMCP",
        "run",
        "main.py"
      ]
    }
  }
}
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Playwright McpPlaywright MCP server
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
CursorThe AI Code Editor
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Amap Maps高德地图官方 MCP Server
ChatWiseThe second fastest AI chatbot™
Serper MCP ServerA Serper MCP Server
WindsurfThe new purpose-built IDE to harness magic
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
DeepChatYour AI Partner on Desktop
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Tavily Mcp