Get the FREE Ultimate OpenClaw Setup Guide →

PENTEST

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. Perform ethical security assessments through natural conversation.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio yashpatil118-pentest-mcp-server docker run --rm -i --cap-add NET_RAW --cap-add NET_ADMIN --network host pentest-mcp:latest

How to use

PentestMCP Server provides a unified, scriptable way to run a suite of popular penetration testing tools through the MCP API. The server is packaged as a Docker container based on Kali Linux and exposes tools such as Nmap, Nikto, SQLMap, WPScan, Dirb, and Searchsploit via FastMCP-compatible endpoints. Clients can issue standardized MCP module calls to these tools, enabling automated security assessments, result aggregation, and integration with orchestration platforms. Because the tools run inside a container with restricted, validated input handling and timeouts, you can safely script repeated scans against authorized targets from anywhere in your environment.

To use it, run the PentestMCP container through your MCP client configuration. The MCP client will serialize tool requests into the containerized service, which executes the requested tool, captures output, and returns structured results. You can combine multiple tools in a single workflow, apply common parameters (target IP, port ranges, enumeration flags), and chain results for reporting. The included tooling coverage makes it suitable for quick target reconnaissance (Nmap), web app scanning (Nikto, SQLMap, WPScan), directory discovery (Dirb), and vulnerability/offensive content search (Searchsploit).

Example workflows include: (1) host discovery and port enumeration with Nmap, (2) web app assessment using Nikto and WPScan, (3) targeted SQL injection testing with SQLMap, and (4) vulnerability sourcing with Searchsploit. The server enforces safe command execution, timeouts, and non-root execution to minimize risk while providing powerful capabilities through a clean API.

How to install

Prerequisites

  • Docker installed and running (recommended)
  • Optional: Kali Linux host with required tools if choosing non-Docker path
  • Access to the PentestMCP repository (clone from GitHub)

Install and run (Docker)

  1. Clone the repository (or pull the prebuilt image if available):
git clone <your-repo-url>
cd pentest-mcp-server
  1. Build the Docker image (if a local build is provided):
# If a build script is provided, use it
chmod +x script/build.sh
./script/build.sh
  1. Run the container as the MCP server (using the example MCP config in the README):
# Ensure latest image is available
docker pull pentest-mcp:latest

# Run container with host networking to access Kali tooling as needed
docker run --rm -i --network host pentest-mcp:latest
  1. Configure your MCP client to connect to the PentestMCP server (see Quickstart in README):
{
  "mcpServers": {
     "pentest-mcp": {
          "command": "docker",
          "args": [
              "run",
              "--rm",
              "-i",
              "--cap-add", "NET_RAW",
              "--cap-add", "NET_ADMIN",
              "--network", "host",
              "pentest-mcp:latest"
          ]
      }
  }
}
  1. Verify the server is reachable by issuing a basic MCP module call through your client.

Notes

  • If you prefer a non-Docker setup, follow the repo's guidance for Python/Kali-based installation and ensure the CLI tools are present.
  • Ensure you have proper permissions for scanning targets and that you operate within legal boundaries.

Additional notes

Tips and common issues:

  • Permissions: When running in Docker, you may need elevated privileges or capabilities (as shown with NET_RAW and NET_ADMIN) depending on the target tools used.
  • Network access: Using --network host allows tools to access network interfaces directly; ensure this aligns with your security policy.
  • Tool availability: The container relies on Kali Linux tooling. If a tool is missing, rebuild the image or install the specific tool inside the container.
  • Timeouts and sanitization: The server enforces input validation and timeouts to prevent abuse; tune per-tool timeout settings if needed via MCP parameters.
  • Env vars: If you later need to pass API keys or configuration per run, add them under the env section for the pentest-mcp server in the mcp_config.
  • Logging: Use the server’s structured logging to troubleshoot failed scans or unexpected tool output.

Related MCP Servers

Sponsor this space

Reach thousands of developers