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.
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)
- Clone the repository (or pull the prebuilt image if available):
git clone <your-repo-url>
cd pentest-mcp-server
- 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
- 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
- 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"
]
}
}
}
- 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
cortex-scout
An advanced web extraction and meta-search engine for AI agents. It features native parallel searching, Human-in-the-Loop (HITL) authentication fallback, and LLM-optimized data synthesis for deep web research.
mcp-ssh-orchestrator
Secure SSH access for AI agents via MCP. Execute commands across your server fleet with policy enforcement, network controls, and comprehensive audit logging.
mcp_documents_reader
Model Context Protocol (MCP) server exposes tools to read multiple document types including DOCX, PDF, Excel, and TXT. This has been tested on Trae Desktop.
slack
Session-based Slack MCP for Claude and MCP clients: local-first workflows, secure-default HTTP.
shodan
Shodan MCP server for Claude, Cursor & VS Code. 20 tools for passive reconnaissance, CVE/CPE intelligence, DNS analysis, and device search. 4 tools work free without an API key. OSINT and vulnerability research from your IDE.
nmap
MCP server for AI-powered network scanning with Nmap. Port scanning, service detection, OS fingerprinting, and vulnerability scanning for AI agents. By Vorota AI.