pwn-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
pwn-mcp
A Model Context Protocol (MCP) server that assists CTF pwn workflows through AI-powered analysis and guidance. Designed for educational purposes with safety-first approach - generates templates with TODOs, not weaponized exploits.
π― Features
Smart Binary Analysis: Architecture, protections (NX/PIE/RELRO/Canary), PLT/GOT, sections, suspicious functions
Dynamic Execution: Controlled crashes with GDB integration, offset calculation, memory mapping
AI-Driven Strategy: Intelligent exploitation planning based on binary characteristics
Safe Templates: Pwntools scaffolds with educational TODOs
Session Management: Persistent analysis results and progress tracking
Extensible Design: Clean hexagonal architecture with pluggable adapters
Related MCP server: gdb-mcp
π Quick Start
Prerequisites
Node.js 18+ and npm
Linux/WSL2 environment (recommended)
Optional tools for enhanced features:
rizinorradare2- Deep static analysisgdbwithpwndbg/gef- Dynamic analysisgcc- Compiling test binariesPython 3 with
pwntools- Running generated exploits
Installation
Option 1: From Source
# Clone repository
git clone https://github.com/polarisxb/pwn-mcp.git
cd pwn-mcp
# Install and build
npm install
npm run --workspaces build
# Test installation
npm --workspace @pwn-mcp/mcp-server run smokeOption 2: Docker (Recommended)
# Pull latest image
docker pull ghcr.io/polarisxb/pwn-mcp:latest
# Run with your challenge directory
docker run -it -v "$PWD/challenges:/workspace" \
-e SAFE_MCP_DEEP_STATIC=true \
-e SAFE_MCP_GDB_EXEC=true \
ghcr.io/polarisxb/pwn-mcp:latestOption 3: Quick Install (Linux/WSL2)
# One-line installer
curl -sSL https://raw.githubusercontent.com/polarisxb/pwn-mcp/main/install.sh | bash
# Or with wget
wget -qO- https://raw.githubusercontent.com/polarisxb/pwn-mcp/main/install.sh | bashπ Usage
With Claude Desktop / Cursor
Add to MCP settings:
{
"mcpServers": {
"pwn-mcp": {
"command": "node",
"args": ["/path/to/pwn-mcp/packages/mcp-server/dist/server.js"],
"env": {
"SAFE_MCP_DEEP_STATIC": "true",
"SAFE_MCP_GDB_EXEC": "true"
}
}
}
}Start analyzing:
"Analyze this binary and find vulnerabilities"
"Help me exploit this stack overflow"
"Generate a pwntools template for this challenge"
Standalone Server
# Start MCP server
npm --workspace @pwn-mcp/mcp-server run start
# With feature flags
SAFE_MCP_DEEP_STATIC=true SAFE_MCP_GDB_EXEC=true \
npm --workspace @pwn-mcp/mcp-server run startTypical Workflow
Initialize session:
init_sessionwith target binaryAnalyze binary:
analyze_binaryto get facts (arch, protections, symbols)Plan strategy:
suggest_strategyfor exploitation approachFind offset:
run_localwith cyclic pattern, thencalculate_offsetsGenerate template:
gen_exploit_templatefor pwntools scaffoldExport report:
save_sessionandexport_reportfor documentation
π οΈ Architecture
pwn-mcp/
βββ packages/
β βββ core/ # Domain types and interfaces
β βββ adapters/ # Tool integrations (rizin, gdb)
β βββ orchestrator/ # Decision engine
β βββ templates/ # Code generators
β βββ config/ # Feature flags
β βββ storage/ # Session persistence
β βββ mcp-server/ # MCP protocol serverπ§ Configuration
Environment Variable | Description | Default |
| Enable Rizin for analysis | Auto-detect |
| Enable GDB for execution | Auto-detect |
π§ͺ Testing
# Basic smoke test
npm --workspace @pwn-mcp/mcp-server run smoke
# End-to-end test
npm --workspace @pwn-mcp/mcp-server run e2e
# Full test suite
npm testπ³ Docker Support
# Build locally
docker build -t pwn-mcp .
# Run with volume mount
docker run -it --rm \
-v "$PWD/challenges:/workspace" \
-e SAFE_MCP_DEEP_STATIC=true \
-e SAFE_MCP_GDB_EXEC=true \
pwn-mcp
# Development mode
docker run -it --rm \
-v "$PWD:/app" \
-w /app \
pwn-mcp \
npm run --workspaces buildπ Examples
Basic Stack Overflow
# Download a vulnerable binary
wget https://example.com/vuln_binary
# Analyze with pwn-mcp
echo '{"target": "./vuln_binary"}' | \
node packages/mcp-server/dist/server.js
# Follow AI guidance to exploitWith Real CTF Challenge
# Generated template example
from pwn import *
binary = './challenge'
elf = ELF(binary)
# TODO: Set up process/remote
p = process(binary)
# TODO: Find offset (from calculate_offsets)
offset = 72
# TODO: Build ROP chain
payload = b'A' * offset
payload += p64(0x401234) # TODO: Add gadgets
p.sendline(payload)
p.interactive()π€ Contributing
We welcome contributions! See CONTRIBUTING.md for guidelines.
Fork the repository
Create feature branch (
git checkout -b feature/amazing)Commit changes (
git commit -m 'Add amazing feature')Push branch (
git push origin feature/amazing)Open Pull Request
π License
MIT License - see LICENSE for details.
β οΈ Security & Ethics
Educational tool only - for learning and authorized CTF competitions
No weaponized exploits - generates templates with TODOs
Local execution only - no remote attack capabilities
User responsibility - ensure legal and ethical use
π Acknowledgments
pwntools - CTF framework
rizin - RE framework
Model Context Protocol - AI integration
CTF community for inspiration and feedback
Made with β€οΈ for the CTF community | Report Issues
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Hunt zero-days by talking to binaries. 40+ tools. Hosted, OAuth + SSO, invite: hi@byteray.ai
Offline methodology engine for authorized penetration testing, CTF, and security research.
AI pentesting: run scans, triage vulnerabilities, review PRs, manage schedules and assets.
Real-time CVE, exploit, and vulnerability intelligence for AI assistants (350K+ CVEs, 115K+ PoCs)
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceEnables stateful binary analysis and pwn research through GDB/pwndbg debugging capabilities. Supports loading binaries, setting breakpoints, memory analysis, compilation with sanitizers, and process management for vulnerability research.-
- AlicenseBqualityDmaintenanceEnables AI assistants to control GDB debugger via MCP protocol for local and remote debugging, supporting CTF Pwn, crash analysis, and ELF inspection.131MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP tool that enables AI agents to debug ELF binaries, particularly for CTF pwn challenges.38MIT
- FlicenseBqualityDmaintenanceA CTF Pwn AI-assisted debugging platform based on MCP, enabling AI to directly interact with remote GDB and CTF services for automated heap exploitation.5111-