YP

yashpatil118/pentest-mcp-server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

7 stars 5 forks 质量 56 趋势 15MIT

AI-powered security testing for Claude Desktop. MCP server integrating 6 essential pentesting tools (nmap, nikto, sqlmap, wpscan, dirb, searchsploit) in a secure Kali Linux Docker container.

概览

is a modern, containerized penetration testing backend for MCP Servers. It exposes industry-standard security tools (Nmap, Nikto, SQLMap, WPScan, Dirb, Searchsploit) through a robust, scriptable API—enabling safe, automated, and repeatable security assessments from anywhere. - Control multiple pentest tools from a single interface. - Input sanitization, timeouts, and non-root execution. - Runs anywhere with Docker—no manual setup or dependencies. - Integrates seamlessly with FastMCP for scripting and orchestration. - Leverages the world’s most popular pentesting OS. - All main build and server files are inside the build/ directory. - The script/ directory contains build and test scripts. - readme.md is at the project root. - 🔒 Prevents command injection and enforces timeouts. - 🧰 Nmap, Nikto, SQLMap, WPScan, Dirb, Searchsploit. - 🐳 Secure, isolated, and reproducible environment. - ⚡ Exposes tools as callable MCP modules. - 📜 Easy monitoring and troubleshooting.

README

以下为原文 README 节选,完整内容请查看原文。

🛡️ PentestMCP Server

PentestMCP Server is a modern, containerized penetration testing backend for MCP Servers. It exposes industry-standard security tools (Nmap, Nikto, SQLMap, WPScan, Dirb, Searchsploit) through a robust, scriptable API—enabling safe, automated, and repeatable security assessments from anywhere.


✨ Why PentestMCP?

  • Unified API: Control multiple pentest tools from a single interface.
  • Safe by Design: Input sanitization, timeouts, and non-root execution.
  • Portable: Runs anywhere with Docker—no manual setup or dependencies.
  • Automation Ready: Integrates seamlessly with FastMCP for scripting and orchestration.
  • Kali Linux Power: Leverages the world’s most popular pentesting OS.

📁 Directory Structure

pentest-mcp-server/
├── build/
│   ├── dockerfile         # Docker instructions for building the Kali-based container
│   ├── requirements.txt   # Python dependencies for the server
│   └── server.py          # Main server logic exposing pentest tools via FastMCP
├── script/
│   ├── build.sh           # Script to build the Docker image
│   └── test.sh            # Script to test the Docker container
└── readme.md              # Project documentation
  • All main build and server files are inside the build/ directory.
  • The script/ directory contains build and test scripts.
  • readme.md is at the project root.

🚀 Features

  • 🔒 Safe Command Execution: Prevents command injection and enforces timeouts.
  • 🧰 Bundled Tools: Nmap, Nikto, SQLMap, WPScan, Dirb, Searchsploit.
  • 🐳 Dockerized: Secure, isolated, and reproducible environment.
  • ⚡ FastMCP API: Exposes tools as callable MCP modules.
  • 📜 Structured Logging: Easy monitoring and troubleshooting.

📦 Requirements

  • Docker (recommended)
  • Or: Python 3.8+ and Kali Linux with required tools installed

🏗️ Quickstart

1️⃣ Clone the Repository

git clone 
cd pentest-mcp-server

2️⃣ Build the Docker Image

chmod +x script/build.sh
./script/build.sh

3️⃣ Test the Container (Optional)

chmod +x script/test.sh
./script/test.sh

4️⃣ Configure Your MCP Client

Add this to your client config file:

{
    "mcpServers": {
       "pentest-mcp": {
            "command": "docker",
            "args": [
                "run",
                "--rm",
                "-i",
                "--cap-add", "NET_RAW",
                "--cap-add", "NET_ADMIN",
                "--network", "host",
                "pentest-mcp:latest"
在 GitHub 查看完整 README

安装

docker run --rm -i --cap-add NET_RAW --cap-add NET_ADMIN --network host pentest-mcp:latest
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "pentest-mcp": { "command": "docker", "args": [ "run", "--rm", "-i", "--cap-add", "NET_RAW", "--cap-add", "NET_ADMIN", "--network", "host", "pentest-mcp:latest" ] } } }