pwndoc-mcp-server 1.0.8__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pwndoc_mcp_server/__init__.py +87 -0
- pwndoc_mcp_server/cli.py +635 -0
- pwndoc_mcp_server/client.py +1122 -0
- pwndoc_mcp_server/config.py +414 -0
- pwndoc_mcp_server/logging_config.py +329 -0
- pwndoc_mcp_server/mcp_installer.py +348 -0
- pwndoc_mcp_server/server.py +1987 -0
- pwndoc_mcp_server/version.py +26 -0
- pwndoc_mcp_server-1.0.8.dist-info/METADATA +552 -0
- pwndoc_mcp_server-1.0.8.dist-info/RECORD +12 -0
- pwndoc_mcp_server-1.0.8.dist-info/WHEEL +4 -0
- pwndoc_mcp_server-1.0.8.dist-info/entry_points.txt +2 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Version helpers for PwnDoc MCP Server.
|
|
3
|
+
|
|
4
|
+
Centralizes version lookup so the CLI and server report the same value.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from importlib import metadata
|
|
8
|
+
|
|
9
|
+
PACKAGE_NAME = "pwndoc-mcp-server"
|
|
10
|
+
_FALLBACK_VERSION = "1.0.8"
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def get_version() -> str:
|
|
14
|
+
"""
|
|
15
|
+
Return the installed package version, falling back to a bundled default.
|
|
16
|
+
|
|
17
|
+
This ensures local source checkouts (or editable installs) still report a
|
|
18
|
+
sensible version while published wheels use the package metadata.
|
|
19
|
+
"""
|
|
20
|
+
try:
|
|
21
|
+
return metadata.version(PACKAGE_NAME)
|
|
22
|
+
except metadata.PackageNotFoundError:
|
|
23
|
+
return _FALLBACK_VERSION
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
__all__ = ["get_version", "PACKAGE_NAME"]
|
|
@@ -0,0 +1,552 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pwndoc-mcp-server
|
|
3
|
+
Version: 1.0.8
|
|
4
|
+
Summary: Model Context Protocol server for PwnDoc penetration testing documentation
|
|
5
|
+
Project-URL: Homepage, https://github.com/walidfaour/pwndoc-mcp-server
|
|
6
|
+
Project-URL: Documentation, https://github.com/walidfaour/pwndoc-mcp-server#readme
|
|
7
|
+
Project-URL: Repository, https://github.com/walidfaour/pwndoc-mcp-server
|
|
8
|
+
Project-URL: Issues, https://github.com/walidfaour/pwndoc-mcp-server/issues
|
|
9
|
+
Author-email: Walid Faour <security@walidfaour.com>
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
Keywords: documentation,mcp,penetration-testing,pentest,pwndoc,security,vulnerability
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Intended Audience :: Information Technology
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Operating System :: OS Independent
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
24
|
+
Classifier: Topic :: Security
|
|
25
|
+
Classifier: Topic :: Software Development :: Documentation
|
|
26
|
+
Requires-Python: >=3.8
|
|
27
|
+
Requires-Dist: httpx>=0.25.0
|
|
28
|
+
Requires-Dist: pyyaml>=6.0
|
|
29
|
+
Requires-Dist: rich>=13.0.0
|
|
30
|
+
Requires-Dist: typer>=0.9.0
|
|
31
|
+
Provides-Extra: all
|
|
32
|
+
Requires-Dist: aiohttp>=3.9.0; extra == 'all'
|
|
33
|
+
Requires-Dist: rich>=13.0.0; extra == 'all'
|
|
34
|
+
Requires-Dist: typer>=0.9.0; extra == 'all'
|
|
35
|
+
Provides-Extra: cli
|
|
36
|
+
Requires-Dist: rich>=13.0.0; extra == 'cli'
|
|
37
|
+
Requires-Dist: typer>=0.9.0; extra == 'cli'
|
|
38
|
+
Provides-Extra: dev
|
|
39
|
+
Requires-Dist: aiohttp>=3.9.0; extra == 'dev'
|
|
40
|
+
Requires-Dist: black>=23.0.0; extra == 'dev'
|
|
41
|
+
Requires-Dist: mypy>=1.0.0; extra == 'dev'
|
|
42
|
+
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
|
|
43
|
+
Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
|
|
44
|
+
Requires-Dist: pytest>=7.0.0; extra == 'dev'
|
|
45
|
+
Requires-Dist: rich>=13.0.0; extra == 'dev'
|
|
46
|
+
Requires-Dist: ruff>=0.1.0; extra == 'dev'
|
|
47
|
+
Requires-Dist: typer>=0.9.0; extra == 'dev'
|
|
48
|
+
Requires-Dist: types-pyyaml>=6.0.0; extra == 'dev'
|
|
49
|
+
Provides-Extra: sse
|
|
50
|
+
Requires-Dist: aiohttp>=3.9.0; extra == 'sse'
|
|
51
|
+
Description-Content-Type: text/markdown
|
|
52
|
+
|
|
53
|
+
# PwnDoc MCP Server
|
|
54
|
+
|
|
55
|
+
<p align="center">
|
|
56
|
+
<img src="https://raw.githubusercontent.com/walidfaour/pwndoc-mcp-server/main/assets/banner.svg" alt="PwnDoc MCP Server Banner" width="800">
|
|
57
|
+
</p>
|
|
58
|
+
|
|
59
|
+
<p align="center">
|
|
60
|
+
<strong>Model Context Protocol server for PwnDoc pentest documentation</strong>
|
|
61
|
+
</p>
|
|
62
|
+
|
|
63
|
+
<p align="center">
|
|
64
|
+
<a href="https://github.com/walidfaour/pwndoc-mcp-server/actions"><img src="https://img.shields.io/github/actions/workflow/status/walidfaour/pwndoc-mcp-server/ci.yml?style=flat-square" alt="Build Status"></a>
|
|
65
|
+
<a href="https://pypi.org/project/pwndoc-mcp-server/"><img src="https://img.shields.io/pypi/v/pwndoc-mcp-server?style=flat-square" alt="PyPI Version"></a>
|
|
66
|
+
<a href="https://pypi.org/project/pwndoc-mcp-server/"><img src="https://img.shields.io/pypi/pyversions/pwndoc-mcp-server?style=flat-square" alt="Python Versions"></a>
|
|
67
|
+
<a href="https://github.com/walidfaour/pwndoc-mcp-server/blob/main/LICENSE"><img src="https://img.shields.io/github/license/walidfaour/pwndoc-mcp-server?style=flat-square" alt="License"></a>
|
|
68
|
+
<a href="https://walidfaour.github.io/pwndoc-mcp-server"><img src="https://img.shields.io/badge/docs-GitHub%20Pages-blue?style=flat-square" alt="Documentation"></a>
|
|
69
|
+
</p>
|
|
70
|
+
|
|
71
|
+
<p align="center">
|
|
72
|
+
<a href="#-features">Features</a> β’
|
|
73
|
+
<a href="#-installation">Installation</a> β’
|
|
74
|
+
<a href="#%EF%B8%8F-configuration">Configuration</a> β’
|
|
75
|
+
<a href="#-usage">Usage</a> β’
|
|
76
|
+
<a href="#-documentation">Documentation</a>
|
|
77
|
+
</p>
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## π― Overview
|
|
82
|
+
|
|
83
|
+
PwnDoc MCP Server enables AI assistants to interact with your PwnDoc penetration testing documentation system through the [Model Context Protocol](https://modelcontextprotocol.io/). Query audits, manage findings, generate reports, and moreβall through natural language.
|
|
84
|
+
|
|
85
|
+
### Two Implementations
|
|
86
|
+
|
|
87
|
+
| Version | Best For | Size | Install |
|
|
88
|
+
|---------|----------|------|---------|
|
|
89
|
+
| [**Python**](#python-installation) | Most users, extensibility | ~50MB | `pip install pwndoc-mcp-server` |
|
|
90
|
+
| [**Native C++**](#native-installation) | Portability, minimal deps | ~5MB | [Download binary](https://github.com/walidfaour/pwndoc-mcp-server/releases) |
|
|
91
|
+
|
|
92
|
+
## β¨ Features
|
|
93
|
+
|
|
94
|
+
- π **90 MCP Tools** - Complete coverage of PwnDoc API (all endpoints)
|
|
95
|
+
- π **Secure Authentication** - JWT tokens with auto-refresh
|
|
96
|
+
- β‘ **Rate Limiting** - Built-in sliding window rate limiter
|
|
97
|
+
- π **Automatic Retries** - Exponential backoff for failed requests
|
|
98
|
+
- π **Comprehensive Logging** - Debug, file, and JSON logging
|
|
99
|
+
- π **Cross-Platform** - Linux, macOS, Windows support
|
|
100
|
+
- π³ **Docker Ready** - Pre-built container images
|
|
101
|
+
- π¦ **Multiple Installation Methods** - pip, apt, yum, binaries
|
|
102
|
+
- π **Native Binary** - Optional C++ implementation for portability
|
|
103
|
+
- π― **Type Safety** - Full mypy type checking (zero errors)
|
|
104
|
+
- β
**Well Tested** - 111 tests, 100% quality checks passing
|
|
105
|
+
|
|
106
|
+
## π₯ Installation
|
|
107
|
+
|
|
108
|
+
### Python Installation
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
# Basic installation
|
|
112
|
+
pip install pwndoc-mcp-server
|
|
113
|
+
|
|
114
|
+
# With CLI enhancements
|
|
115
|
+
pip install pwndoc-mcp-server[cli]
|
|
116
|
+
|
|
117
|
+
# With all features
|
|
118
|
+
pip install pwndoc-mcp-server[all]
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
**Kali Linux Users:** If you encounter errors during installation, use a virtual environment:
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
sudo apt update
|
|
125
|
+
sudo apt install -y python3-venv
|
|
126
|
+
python3 -m venv venv
|
|
127
|
+
source venv/bin/activate
|
|
128
|
+
pip install --upgrade pip
|
|
129
|
+
pip install pwndoc-mcp-server
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### Native Installation
|
|
133
|
+
|
|
134
|
+
Download pre-built binaries from [Releases](https://github.com/walidfaour/pwndoc-mcp-server/releases):
|
|
135
|
+
|
|
136
|
+
| Platform | Binary |
|
|
137
|
+
|----------|--------|
|
|
138
|
+
| Linux x64 | `pwndoc-mcp-linux-x64` |
|
|
139
|
+
| macOS x64 | `pwndoc-mcp-macos-x64` |
|
|
140
|
+
| macOS ARM | `pwndoc-mcp-macos-arm64` |
|
|
141
|
+
| Windows | `pwndoc-mcp-windows-x64.exe` |
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
# Linux/macOS
|
|
145
|
+
curl -LO https://github.com/walidfaour/pwndoc-mcp-server/releases/latest/download/pwndoc-mcp-linux-x64
|
|
146
|
+
chmod +x pwndoc-mcp-linux-x64
|
|
147
|
+
./pwndoc-mcp-linux-x64
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### Installation Matrix
|
|
151
|
+
|
|
152
|
+
| Platform | Method | Command |
|
|
153
|
+
|----------|--------|---------|
|
|
154
|
+
| **Any** | pip | `pip install pwndoc-mcp-server` |
|
|
155
|
+
| **Any** | pipx | `pipx install pwndoc-mcp-server` |
|
|
156
|
+
| **Linux (Debian/Ubuntu)** | apt | `sudo apt install pwndoc-mcp-server` |
|
|
157
|
+
| **Linux (RHEL/CentOS)** | yum | `sudo yum install pwndoc-mcp-server` |
|
|
158
|
+
| **macOS** | Homebrew | `brew install pwndoc-mcp-server` |
|
|
159
|
+
| **Windows** | Scoop | `scoop install pwndoc-mcp-server` |
|
|
160
|
+
| **Any** | Docker | `docker pull ghcr.io/walidfaour/pwndoc-mcp-server` |
|
|
161
|
+
| **Any** | Binary | [Download from Releases](https://github.com/walidfaour/pwndoc-mcp-server/releases) |
|
|
162
|
+
|
|
163
|
+
### From Source
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
# Python
|
|
167
|
+
git clone https://github.com/walidfaour/pwndoc-mcp-server.git
|
|
168
|
+
cd pwndoc-mcp-server/python
|
|
169
|
+
pip install -e .[dev]
|
|
170
|
+
|
|
171
|
+
# Native C++
|
|
172
|
+
cd ../native
|
|
173
|
+
mkdir build && cd build
|
|
174
|
+
cmake .. && make
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## βοΈ Configuration
|
|
178
|
+
|
|
179
|
+
### Quick Start (Interactive Setup)
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
pwndoc-mcp config init
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
The interactive wizard will guide you through configuration and support both authentication methods.
|
|
186
|
+
|
|
187
|
+
### Authentication Methods
|
|
188
|
+
|
|
189
|
+
You can authenticate using **environment variables**, **config file**, or **CLI arguments**.
|
|
190
|
+
|
|
191
|
+
**Option 1: Username/Password (Recommended)**
|
|
192
|
+
- β
Automatically handles token generation and refresh
|
|
193
|
+
- β
No manual token management required
|
|
194
|
+
- β
**Preferred** when both credentials and token are provided
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
# Environment variables
|
|
198
|
+
export PWNDOC_URL="https://pwndoc.example.com"
|
|
199
|
+
export PWNDOC_USERNAME="your-username"
|
|
200
|
+
export PWNDOC_PASSWORD="your-password"
|
|
201
|
+
|
|
202
|
+
# Or CLI arguments
|
|
203
|
+
pwndoc-mcp serve --url https://pwndoc.example.com --username user --password pass
|
|
204
|
+
pwndoc-mcp test --url https://pwndoc.example.com -u user -p pass
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
**Option 2: Pre-authenticated Token**
|
|
208
|
+
- Use if you have a JWT token
|
|
209
|
+
- β οΈ Requires manual renewal when expired
|
|
210
|
+
- Only used if username/password not provided
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
# Environment variables
|
|
214
|
+
export PWNDOC_URL="https://pwndoc.example.com"
|
|
215
|
+
export PWNDOC_TOKEN="your-jwt-token"
|
|
216
|
+
|
|
217
|
+
# Or CLI arguments
|
|
218
|
+
pwndoc-mcp serve --url https://pwndoc.example.com --token your-jwt-token
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
**Authentication Priority:**
|
|
222
|
+
When multiple methods are configured, the system uses this priority:
|
|
223
|
+
1. **Username/Password** (if both provided) β automatic token refresh β
|
|
224
|
+
2. **Token** (if username/password not provided) β manual renewal required β οΈ
|
|
225
|
+
|
|
226
|
+
This means if you set all three (URL + username/password + token), it will use username/password and ignore the token.
|
|
227
|
+
|
|
228
|
+
### Configuration File
|
|
229
|
+
|
|
230
|
+
Create `~/.pwndoc-mcp/config.yaml`:
|
|
231
|
+
|
|
232
|
+
```yaml
|
|
233
|
+
url: https://pwndoc.example.com
|
|
234
|
+
username: your-username
|
|
235
|
+
password: your-password
|
|
236
|
+
verify_ssl: true
|
|
237
|
+
timeout: 30
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
## π₯οΈ Claude Desktop Integration
|
|
241
|
+
|
|
242
|
+
### Automatic Installation (Recommended)
|
|
243
|
+
|
|
244
|
+
```bash
|
|
245
|
+
# Configure your PwnDoc credentials
|
|
246
|
+
pwndoc-mcp config init
|
|
247
|
+
|
|
248
|
+
# Automatically install for Claude Desktop
|
|
249
|
+
pwndoc-mcp claude-install
|
|
250
|
+
|
|
251
|
+
# Check installation status
|
|
252
|
+
pwndoc-mcp claude-status
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
This will automatically update the appropriate MCP configuration file:
|
|
256
|
+
- **Linux**: `~/.config/claude/mcp_servers.json`
|
|
257
|
+
- **macOS**: `~/Library/Application Support/Claude/mcp_servers.json`
|
|
258
|
+
- **Windows**: `%APPDATA%\Claude\mcp_servers.json`
|
|
259
|
+
|
|
260
|
+
### Manual Installation
|
|
261
|
+
|
|
262
|
+
Alternatively, manually add to your Claude Desktop configuration (`claude_desktop_config.json`):
|
|
263
|
+
|
|
264
|
+
**macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
265
|
+
**Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
266
|
+
**Linux**: `~/.config/Claude/claude_desktop_config.json`
|
|
267
|
+
|
|
268
|
+
### Using Python (pip)
|
|
269
|
+
|
|
270
|
+
```json
|
|
271
|
+
{
|
|
272
|
+
"mcpServers": {
|
|
273
|
+
"pwndoc": {
|
|
274
|
+
"command": "pwndoc-mcp",
|
|
275
|
+
"args": ["serve"],
|
|
276
|
+
"env": {
|
|
277
|
+
"PWNDOC_URL": "https://pwndoc.example.com",
|
|
278
|
+
"PWNDOC_USERNAME": "your-username",
|
|
279
|
+
"PWNDOC_PASSWORD": "your-password"
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
### Using Native Binary
|
|
287
|
+
|
|
288
|
+
```json
|
|
289
|
+
{
|
|
290
|
+
"mcpServers": {
|
|
291
|
+
"pwndoc": {
|
|
292
|
+
"command": "/path/to/pwndoc-mcp-linux-x64",
|
|
293
|
+
"env": {
|
|
294
|
+
"PWNDOC_URL": "https://pwndoc.example.com",
|
|
295
|
+
"PWNDOC_TOKEN": "your-token"
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
### Using Docker
|
|
303
|
+
|
|
304
|
+
```json
|
|
305
|
+
{
|
|
306
|
+
"mcpServers": {
|
|
307
|
+
"pwndoc": {
|
|
308
|
+
"command": "docker",
|
|
309
|
+
"args": ["run", "-i", "--rm",
|
|
310
|
+
"-e", "PWNDOC_URL=https://pwndoc.example.com",
|
|
311
|
+
"-e", "PWNDOC_TOKEN=your-token",
|
|
312
|
+
"ghcr.io/walidfaour/pwndoc-mcp-server:latest"
|
|
313
|
+
]
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
## π Usage
|
|
320
|
+
|
|
321
|
+
### CLI Commands
|
|
322
|
+
|
|
323
|
+
```bash
|
|
324
|
+
# Test connection
|
|
325
|
+
pwndoc-mcp test
|
|
326
|
+
|
|
327
|
+
# List available tools
|
|
328
|
+
pwndoc-mcp tools
|
|
329
|
+
|
|
330
|
+
# Start MCP server
|
|
331
|
+
pwndoc-mcp serve
|
|
332
|
+
|
|
333
|
+
# Interactive config setup
|
|
334
|
+
pwndoc-mcp config init
|
|
335
|
+
|
|
336
|
+
# Claude Desktop integration
|
|
337
|
+
pwndoc-mcp claude-install # Install MCP config for Claude
|
|
338
|
+
pwndoc-mcp claude-status # Check installation status
|
|
339
|
+
pwndoc-mcp claude-uninstall # Remove MCP config
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
### Using with Other MCP Clients
|
|
343
|
+
|
|
344
|
+
The server works with **any MCP-compatible client**, not just Claude Desktop:
|
|
345
|
+
|
|
346
|
+
**stdio transport (default)** - For client integrations:
|
|
347
|
+
```bash
|
|
348
|
+
pwndoc-mcp serve # Communicates via stdin/stdout
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
**SSE transport** - For web-based clients:
|
|
352
|
+
```bash
|
|
353
|
+
pwndoc-mcp serve --transport sse --host 0.0.0.0 --port 8080
|
|
354
|
+
# Access at: http://localhost:8080/mcp
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
**Client configuration examples:**
|
|
358
|
+
|
|
359
|
+
<details>
|
|
360
|
+
<summary><b>Cline (VS Code)</b></summary>
|
|
361
|
+
|
|
362
|
+
Add to Cline MCP settings:
|
|
363
|
+
```json
|
|
364
|
+
{
|
|
365
|
+
"mcpServers": {
|
|
366
|
+
"pwndoc": {
|
|
367
|
+
"command": "pwndoc-mcp",
|
|
368
|
+
"args": ["serve"],
|
|
369
|
+
"env": {
|
|
370
|
+
"PWNDOC_URL": "https://pwndoc.example.com",
|
|
371
|
+
"PWNDOC_USERNAME": "your-username",
|
|
372
|
+
"PWNDOC_PASSWORD": "your-password"
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
```
|
|
378
|
+
</details>
|
|
379
|
+
|
|
380
|
+
<details>
|
|
381
|
+
<summary><b>Continue.dev</b></summary>
|
|
382
|
+
|
|
383
|
+
Add to Continue config:
|
|
384
|
+
```json
|
|
385
|
+
{
|
|
386
|
+
"mcpServers": {
|
|
387
|
+
"pwndoc": {
|
|
388
|
+
"command": "pwndoc-mcp",
|
|
389
|
+
"args": ["serve"]
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
```
|
|
394
|
+
</details>
|
|
395
|
+
|
|
396
|
+
<details>
|
|
397
|
+
<summary><b>Custom MCP Client</b></summary>
|
|
398
|
+
|
|
399
|
+
Connect to stdio transport:
|
|
400
|
+
```python
|
|
401
|
+
import subprocess
|
|
402
|
+
process = subprocess.Popen(
|
|
403
|
+
["pwndoc-mcp", "serve"],
|
|
404
|
+
stdin=subprocess.PIPE,
|
|
405
|
+
stdout=subprocess.PIPE,
|
|
406
|
+
env={"PWNDOC_URL": "...", "PWNDOC_USERNAME": "...", "PWNDOC_PASSWORD": "..."}
|
|
407
|
+
)
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
Or use SSE transport:
|
|
411
|
+
```python
|
|
412
|
+
import requests
|
|
413
|
+
response = requests.post(
|
|
414
|
+
"http://localhost:8080/mcp",
|
|
415
|
+
json={"method": "tools/list"}
|
|
416
|
+
)
|
|
417
|
+
```
|
|
418
|
+
</details>
|
|
419
|
+
|
|
420
|
+
### Docker
|
|
421
|
+
|
|
422
|
+
```bash
|
|
423
|
+
docker run -it --rm \
|
|
424
|
+
-e PWNDOC_URL="https://pwndoc.example.com" \
|
|
425
|
+
-e PWNDOC_TOKEN="your-token" \
|
|
426
|
+
ghcr.io/walidfaour/pwndoc-mcp-server:latest
|
|
427
|
+
```
|
|
428
|
+
|
|
429
|
+
## π§ Available Tools (90)
|
|
430
|
+
|
|
431
|
+
**Complete coverage of PwnDoc API** - All 92 endpoints exposed as MCP tools (minus 2 internal auth endpoints)
|
|
432
|
+
|
|
433
|
+
### Audits (13 tools)
|
|
434
|
+
- `list_audits` `get_audit` `create_audit` `update_audit_general` `delete_audit`
|
|
435
|
+
- `get_audit_general` `get_audit_network` `update_audit_network`
|
|
436
|
+
- `get_audit_sections` `update_audit_sections`
|
|
437
|
+
- `toggle_audit_approval` `update_review_status` `generate_audit_report`
|
|
438
|
+
|
|
439
|
+
### Findings (9 tools)
|
|
440
|
+
- `get_audit_findings` `get_finding` `create_finding` `update_finding` `delete_finding`
|
|
441
|
+
- `sort_findings` `move_finding` `search_findings`
|
|
442
|
+
- `get_all_findings_with_context` (comprehensive: extracts CWE, OWASP, strips HTML, full team info)
|
|
443
|
+
|
|
444
|
+
### Vulnerability Templates (9 tools)
|
|
445
|
+
- `list_vulnerabilities` `get_vulnerabilities_by_locale` `create_vulnerability` `update_vulnerability` `delete_vulnerability`
|
|
446
|
+
- `bulk_delete_vulnerabilities` `export_vulnerabilities` `create_vulnerability_from_finding`
|
|
447
|
+
- `get_vulnerability_updates` `merge_vulnerability`
|
|
448
|
+
|
|
449
|
+
### Clients & Companies (8 tools)
|
|
450
|
+
- `list_clients` `create_client` `update_client` `delete_client`
|
|
451
|
+
- `list_companies` `create_company` `update_company` `delete_company`
|
|
452
|
+
|
|
453
|
+
### Users & Authentication (11 tools)
|
|
454
|
+
- `list_users` `get_user` `get_current_user` `create_user` `update_user` `update_current_user`
|
|
455
|
+
- `list_reviewers`
|
|
456
|
+
- `get_totp_status` `setup_totp` `disable_totp` (2FA/TOTP support)
|
|
457
|
+
|
|
458
|
+
### Data Types & Configuration (22 tools)
|
|
459
|
+
**Languages** (4): `list_languages` `create_language` `update_language` `delete_language`
|
|
460
|
+
|
|
461
|
+
**Audit Types** (4): `list_audit_types` `create_audit_type` `update_audit_type` `delete_audit_type`
|
|
462
|
+
|
|
463
|
+
**Vulnerability Types** (4): `list_vulnerability_types` `create_vulnerability_type` `update_vulnerability_type` `delete_vulnerability_type`
|
|
464
|
+
|
|
465
|
+
**Vulnerability Categories** (4): `list_vulnerability_categories` `create_vulnerability_category` `update_vulnerability_category` `delete_vulnerability_category`
|
|
466
|
+
|
|
467
|
+
**Sections** (4): `list_sections` `create_section` `update_section` `delete_section`
|
|
468
|
+
|
|
469
|
+
**Custom Fields** (4): `list_custom_fields` `create_custom_field` `update_custom_field` `delete_custom_field`
|
|
470
|
+
|
|
471
|
+
### Settings & Templates (10 tools)
|
|
472
|
+
- `get_settings` `get_public_settings` `update_settings` `export_settings` `import_settings`
|
|
473
|
+
- `list_templates` `create_template` `update_template` `delete_template` `download_template`
|
|
474
|
+
|
|
475
|
+
### Images (4 tools)
|
|
476
|
+
- `get_image` `download_image` `upload_image` `delete_image`
|
|
477
|
+
|
|
478
|
+
### Statistics & Metadata (4 tools)
|
|
479
|
+
- `get_statistics` `list_roles`
|
|
480
|
+
|
|
481
|
+
> π‘ **Tip:** Use `pwndoc-mcp tools` to list all available tools with descriptions
|
|
482
|
+
|
|
483
|
+
[Full tool documentation β](https://walidfaour.github.io/pwndoc-mcp-server/tools)
|
|
484
|
+
|
|
485
|
+
## π Documentation
|
|
486
|
+
|
|
487
|
+
- **GitHub Pages**: [walidfaour.github.io/pwndoc-mcp-server](https://walidfaour.github.io/pwndoc-mcp-server)
|
|
488
|
+
- **Repository docs**: [GitHub Documentation](https://github.com/walidfaour/pwndoc-mcp-server/tree/main/docs)
|
|
489
|
+
|
|
490
|
+
Quick links:
|
|
491
|
+
- [Getting Started Guide](https://walidfaour.github.io/pwndoc-mcp-server/getting-started/quick-start)
|
|
492
|
+
- [Configuration Reference](https://walidfaour.github.io/pwndoc-mcp-server/getting-started/configuration)
|
|
493
|
+
- [Tool Reference](https://walidfaour.github.io/pwndoc-mcp-server/tools/overview)
|
|
494
|
+
- [Docker Deployment](https://walidfaour.github.io/pwndoc-mcp-server/user-guide/docker)
|
|
495
|
+
|
|
496
|
+
## π Project Structure
|
|
497
|
+
|
|
498
|
+
```
|
|
499
|
+
pwndoc-mcp-server/
|
|
500
|
+
βββ python/ # Python implementation
|
|
501
|
+
β βββ src/pwndoc_mcp_server/
|
|
502
|
+
β βββ tests/
|
|
503
|
+
β βββ pyproject.toml
|
|
504
|
+
β βββ Dockerfile
|
|
505
|
+
βββ native/ # C++ implementation
|
|
506
|
+
β βββ src/
|
|
507
|
+
β βββ include/
|
|
508
|
+
β βββ CMakeLists.txt
|
|
509
|
+
βββ docs/ # Documentation
|
|
510
|
+
βββ assets/ # Branding assets
|
|
511
|
+
βββ debian/ # Debian packaging
|
|
512
|
+
βββ rpm/ # RPM packaging
|
|
513
|
+
βββ packaging/ # Homebrew/Scoop
|
|
514
|
+
βββ .github/ # CI/CD workflows
|
|
515
|
+
```
|
|
516
|
+
|
|
517
|
+
## π Security
|
|
518
|
+
|
|
519
|
+
See [SECURITY.md](https://github.com/walidfaour/pwndoc-mcp-server/blob/main/SECURITY.md) for reporting vulnerabilities.
|
|
520
|
+
|
|
521
|
+
**Important:** This tool handles sensitive penetration testing data. Use only on authorized systems.
|
|
522
|
+
|
|
523
|
+
## π€ Contributing
|
|
524
|
+
|
|
525
|
+
Contributions welcome! See [CONTRIBUTING.md](https://github.com/walidfaour/pwndoc-mcp-server/blob/main/CONTRIBUTING.md) for guidelines.
|
|
526
|
+
|
|
527
|
+
```bash
|
|
528
|
+
# First, configure git
|
|
529
|
+
git config --global user.name "Your Name"
|
|
530
|
+
git config --global user.email "your.email@example.com"
|
|
531
|
+
|
|
532
|
+
# Clone and setup
|
|
533
|
+
git clone https://github.com/walidfaour/pwndoc-mcp-server.git
|
|
534
|
+
cd pwndoc-mcp-server/python
|
|
535
|
+
pip install -e .[dev]
|
|
536
|
+
pytest
|
|
537
|
+
```
|
|
538
|
+
|
|
539
|
+
## π License
|
|
540
|
+
|
|
541
|
+
MIT License - see [LICENSE](https://github.com/walidfaour/pwndoc-mcp-server/blob/main/LICENSE) for details.
|
|
542
|
+
|
|
543
|
+
## π Acknowledgments
|
|
544
|
+
|
|
545
|
+
- [PwnDoc](https://github.com/pwndoc/pwndoc) - The penetration testing documentation platform
|
|
546
|
+
- **Walid Faour** - security@walidfaour.com
|
|
547
|
+
|
|
548
|
+
---
|
|
549
|
+
|
|
550
|
+
<p align="center">
|
|
551
|
+
Made with β€οΈ by Walid Faour
|
|
552
|
+
</p>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
pwndoc_mcp_server/__init__.py,sha256=Pe4Dla23dC-j4jYsISvP4RIMmtKM0a7fuKGH8l835Wo,2072
|
|
2
|
+
pwndoc_mcp_server/cli.py,sha256=x6te9jK7NXqWmdt1-QonOI2J_y6ktjcHXp4AfGfK-Q4,23599
|
|
3
|
+
pwndoc_mcp_server/client.py,sha256=70IMTtH5m12YDkok9zOwvixN5A9tgrdc5b_-p0I0zNs,42230
|
|
4
|
+
pwndoc_mcp_server/config.py,sha256=rCe30UT7DASrz2qv_-lH2Qgl-0_bY_V_eueJliNn6y4,12854
|
|
5
|
+
pwndoc_mcp_server/logging_config.py,sha256=-FuabER6p4XL-AGY3wfLRy9cBHJO6WhvgCASTiqlKRs,10648
|
|
6
|
+
pwndoc_mcp_server/mcp_installer.py,sha256=xI5_s9e9p6DR_FqgforT_nHO9Q7uLpwaNV_1h5y3P68,9733
|
|
7
|
+
pwndoc_mcp_server/server.py,sha256=vNXtTlNN_jJnmtzR4h7ksYWUxJjNYyH5v-gcjf4MPIE,74734
|
|
8
|
+
pwndoc_mcp_server/version.py,sha256=v46b37bbWYttCe0QQZMuXn0409rT9RFTVJbLFYKGTiI,660
|
|
9
|
+
pwndoc_mcp_server-1.0.8.dist-info/METADATA,sha256=msERemmCBrF2xAhx86RRB-J3hQMYAYRxI3iDsCTwleE,17549
|
|
10
|
+
pwndoc_mcp_server-1.0.8.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
11
|
+
pwndoc_mcp_server-1.0.8.dist-info/entry_points.txt,sha256=ksxRAw6RhdIzBX3mDMpm42qiuAF9SBYgK8aoqBJqxPI,58
|
|
12
|
+
pwndoc_mcp_server-1.0.8.dist-info/RECORD,,
|