Model Context Protocol server for PwnDoc pentest documentation
Features β’ Installation β’ Configuration β’ Usage β’ Documentation
PwnDoc MCP Server enables AI assistants to interact with your PwnDoc penetration testing documentation system through the Model Context Protocol. Query audits, manage findings, generate reports, and moreβall through natural language.
Both implementations have complete feature parity - all features work identically.
| Version | Best For | Size | Install |
|---|---|---|---|
| Python | Most users, extensibility | ~50MB | pip install pwndoc-mcp-server |
| Native C++ | Performance, minimal deps | ~5MB | Download binary |
- π 90 MCP Tools - Complete coverage of PwnDoc API (all endpoints)
- π Secure Authentication - JWT tokens with auto-refresh (both implementations)
- β‘ Rate Limiting - Built-in sliding window rate limiter (both implementations)
- π Automatic Retries - Exponential backoff for failed requests (both implementations)
- π Comprehensive Logging - Debug, file, and JSON logging (both implementations)
- π Cross-Platform - Linux, macOS, Windows support
- π³ Docker Ready - Pre-built container images
- π¦ Multiple Installation Methods - pip, apt, yum, binaries
- π Two Full Implementations - Python and C++ with complete feature parity
- π― Type Safety - Full mypy type checking (zero errors)
- β Well Tested - 111 tests, 100% quality checks passing
# Basic installation
pip install pwndoc-mcp-server
# With CLI enhancements
pip install pwndoc-mcp-server[cli]
# With all features
pip install pwndoc-mcp-server[all]Kali Linux Users: If you encounter errors during installation, use a virtual environment:
sudo apt update
sudo apt install -y python3-venv
python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install pwndoc-mcp-serverC++ implementation with complete feature parity - includes all Python features:
- β Rate limiting with sliding window algorithm
- β Automatic retries with exponential backoff
- β Token refresh using refresh tokens
- β Comprehensive error handling (typed exceptions)
- β Full logging support (info/warning/debug)
- β All 90 MCP tools
- β Complete CLI Tools - test, tools, config init, claude-install, claude-status
Download pre-built binaries from Releases:
| Platform | Binary |
|---|---|
| Linux x64 | pwndoc-mcp-linux-x64 |
| macOS x64 | pwndoc-mcp-macos-x64 |
| macOS ARM | pwndoc-mcp-macos-arm64 |
| Windows | pwndoc-mcp-windows-x64.exe |
# Linux/macOS
curl -LO https://github.com/walidfaour/pwndoc-mcp-server/releases/latest/download/pwndoc-mcp-linux-x64
chmod +x pwndoc-mcp-linux-x64
./pwndoc-mcp-linux-x64| Platform | Method | Command |
|---|---|---|
| Any | pip | pip install pwndoc-mcp-server |
| Any | pipx | pipx install pwndoc-mcp-server |
| Linux (Debian/Ubuntu) | apt | sudo apt install pwndoc-mcp-server |
| Linux (RHEL/CentOS) | yum | sudo yum install pwndoc-mcp-server |
| macOS | Homebrew | brew install pwndoc-mcp-server |
| Windows | Scoop | scoop install pwndoc-mcp-server |
| Any | Docker | docker pull ghcr.io/walidfaour/pwndoc-mcp-server |
| Any | Binary | Download from Releases |
# Python
git clone https://github.com/walidfaour/pwndoc-mcp-server.git
cd pwndoc-mcp-server/python
pip install -e .[dev]
# Native C++
cd ../native
mkdir build && cd build
cmake .. && makepwndoc-mcp config initThe interactive wizard will guide you through configuration and support both authentication methods.
You can authenticate using environment variables, config file, or CLI arguments.
Option 1: Username/Password (Recommended)
- β Automatically handles token generation and refresh
- β No manual token management required
- β Preferred when both credentials and token are provided
# Environment variables
export PWNDOC_URL="https://pwndoc.example.com"
export PWNDOC_USERNAME="your-username"
export PWNDOC_PASSWORD="your-password"
# Or CLI arguments
pwndoc-mcp serve --url https://pwndoc.example.com --username user --password pass
pwndoc-mcp test --url https://pwndoc.example.com -u user -p passOption 2: Pre-authenticated Token
- Use if you have a JWT token
β οΈ Requires manual renewal when expired- Only used if username/password not provided
# Environment variables
export PWNDOC_URL="https://pwndoc.example.com"
export PWNDOC_TOKEN="your-jwt-token"
# Or CLI arguments
pwndoc-mcp serve --url https://pwndoc.example.com --token your-jwt-tokenAuthentication Priority: When multiple methods are configured, the system uses this priority:
- Username/Password (if both provided) β automatic token refresh β
- Token (if username/password not provided) β manual renewal required
β οΈ
This means if you set all three (URL + username/password + token), it will use username/password and ignore the token.
Create ~/.pwndoc-mcp/config.yaml:
url: https://pwndoc.example.com
username: your-username
password: your-password
verify_ssl: true
timeout: 30# Configure your PwnDoc credentials
pwndoc-mcp config init
# Automatically install for Claude Desktop
pwndoc-mcp claude-install
# Check installation status
pwndoc-mcp claude-statusThis will automatically update the appropriate MCP configuration file:
- Linux:
~/.config/claude/mcp_servers.json - macOS:
~/Library/Application Support/Claude/mcp_servers.json - Windows:
%APPDATA%\Claude\mcp_servers.json
Alternatively, manually add to your Claude Desktop configuration (claude_desktop_config.json):
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"pwndoc": {
"command": "pwndoc-mcp",
"args": ["serve"],
"env": {
"PWNDOC_URL": "https://pwndoc.example.com",
"PWNDOC_USERNAME": "your-username",
"PWNDOC_PASSWORD": "your-password"
}
}
}
}{
"mcpServers": {
"pwndoc": {
"command": "/path/to/pwndoc-mcp-linux-x64",
"env": {
"PWNDOC_URL": "https://pwndoc.example.com",
"PWNDOC_TOKEN": "your-token"
}
}
}
}{
"mcpServers": {
"pwndoc": {
"command": "docker",
"args": ["run", "-i", "--rm",
"-e", "PWNDOC_URL=https://pwndoc.example.com",
"-e", "PWNDOC_TOKEN=your-token",
"ghcr.io/walidfaour/pwndoc-mcp-server:latest"
]
}
}
}# Test connection
pwndoc-mcp test
# List available tools
pwndoc-mcp tools
# Start MCP server
pwndoc-mcp serve
# Interactive config setup
pwndoc-mcp config init
# Claude Desktop integration
pwndoc-mcp claude-install # Install MCP config for Claude
pwndoc-mcp claude-status # Check installation status
pwndoc-mcp claude-uninstall # Remove MCP configThe server works with any MCP-compatible client, not just Claude Desktop:
stdio transport (default) - For client integrations:
pwndoc-mcp serve # Communicates via stdin/stdoutSSE transport - For web-based clients:
pwndoc-mcp serve --transport sse --host 0.0.0.0 --port 8080
# Access at: http://localhost:8080/mcpClient configuration examples:
Cline (VS Code)
Add to Cline MCP settings:
{
"mcpServers": {
"pwndoc": {
"command": "pwndoc-mcp",
"args": ["serve"],
"env": {
"PWNDOC_URL": "https://pwndoc.example.com",
"PWNDOC_USERNAME": "your-username",
"PWNDOC_PASSWORD": "your-password"
}
}
}
}Continue.dev
Add to Continue config:
{
"mcpServers": {
"pwndoc": {
"command": "pwndoc-mcp",
"args": ["serve"]
}
}
}Custom MCP Client
Connect to stdio transport:
import subprocess
process = subprocess.Popen(
["pwndoc-mcp", "serve"],
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
env={"PWNDOC_URL": "...", "PWNDOC_USERNAME": "...", "PWNDOC_PASSWORD": "..."}
)Or use SSE transport:
import requests
response = requests.post(
"http://localhost:8080/mcp",
json={"method": "tools/list"}
)docker run -it --rm \
-e PWNDOC_URL="https://pwndoc.example.com" \
-e PWNDOC_TOKEN="your-token" \
ghcr.io/walidfaour/pwndoc-mcp-server:latestComplete coverage of PwnDoc API - All 92 endpoints exposed as MCP tools (minus 2 internal auth endpoints)
list_auditsget_auditcreate_auditupdate_audit_generaldelete_auditget_audit_generalget_audit_networkupdate_audit_networkget_audit_sectionsupdate_audit_sectionstoggle_audit_approvalupdate_review_statusgenerate_audit_report
get_audit_findingsget_findingcreate_findingupdate_findingdelete_findingsort_findingsmove_findingsearch_findingsget_all_findings_with_context(comprehensive: extracts CWE, OWASP, strips HTML, full team info)
list_vulnerabilitiesget_vulnerabilities_by_localecreate_vulnerabilityupdate_vulnerabilitydelete_vulnerabilitybulk_delete_vulnerabilitiesexport_vulnerabilitiescreate_vulnerability_from_findingget_vulnerability_updatesmerge_vulnerability
list_clientscreate_clientupdate_clientdelete_clientlist_companiescreate_companyupdate_companydelete_company
list_usersget_userget_current_usercreate_userupdate_userupdate_current_userlist_reviewersget_totp_statussetup_totpdisable_totp(2FA/TOTP support)
Languages (4): list_languages create_language update_language delete_language
Audit Types (4): list_audit_types create_audit_type update_audit_type delete_audit_type
Vulnerability Types (4): list_vulnerability_types create_vulnerability_type update_vulnerability_type delete_vulnerability_type
Vulnerability Categories (4): list_vulnerability_categories create_vulnerability_category update_vulnerability_category delete_vulnerability_category
Sections (4): list_sections create_section update_section delete_section
Custom Fields (4): list_custom_fields create_custom_field update_custom_field delete_custom_field
get_settingsget_public_settingsupdate_settingsexport_settingsimport_settingslist_templatescreate_templateupdate_templatedelete_templatedownload_template
get_imagedownload_imageupload_imagedelete_image
get_statisticslist_roles
π‘ Tip: Use
pwndoc-mcp toolsto list all available tools with descriptions
- GitHub Pages: walidfaour.github.io/pwndoc-mcp-server
- Repository docs: docs/
Quick links:
pwndoc-mcp-server/
βββ python/ # Python implementation
β βββ src/pwndoc_mcp_server/
β βββ tests/
β βββ pyproject.toml
β βββ Dockerfile
βββ native/ # C++ implementation
β βββ src/
β βββ include/
β βββ CMakeLists.txt
βββ docs/ # Documentation
βββ assets/ # Branding assets
βββ debian/ # Debian packaging
βββ rpm/ # RPM packaging
βββ packaging/ # Homebrew/Scoop
βββ .github/ # CI/CD workflows
See SECURITY.md for reporting vulnerabilities.
Important: This tool handles sensitive penetration testing data. Use only on authorized systems.
Contributions welcome! See CONTRIBUTING.md for guidelines.
# First, configure git
git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"
# Clone and setup
git clone https://github.com/walidfaour/pwndoc-mcp-server.git
cd pwndoc-mcp-server/python
pip install -e .[dev]
pytestMIT License - see LICENSE for details.
- PwnDoc - The penetration testing documentation platform
- Walid Faour - security@walidfaour.com
Made with β€οΈ by Walid Faour