PenTest MCP Server
Provides capabilities to detect and analyze exposed Git repositories on target servers to identify potential source code leaks.
Integrates security tools like graphql-cop to perform vulnerability assessments and security auditing of GraphQL endpoints.
Maps penetration testing findings to the OWASP Top 10 security standards for comprehensive and industry-aligned reporting.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@PenTest MCP ServerRun a quick security scan on example.com and analyze the findings."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ποΈ Architecture
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β $ pentest ask --query "scan for SQLi and XSS" \ β
β --target http://localhost:3000 --consent β
ββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββ
β Direct Python execution
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β GEMINI-POWERED AGENT (Python) β
β β
β Phase 1: PLAN β LLM selects tools from query β
β Phase 2: EXECUTE β Runs tools, collects findings β
β Phase 3: REPORT β LLM generates professional report β
β β
β βββββββββββββββ ββββββββββββββββ ββββββββββββββββββ β
β β Session β β Scan Mode β β Tool β β
β β Manager β β Orchestratorβ β Registry β β
β βββββββββββββββ ββββββββ¬ββββββββ ββββββββββββββββββ β
β β β
β ββββββββββββββββββΌβββββββββββββββββ β
β βΌ βΌ βΌ β
β ββββββββββββββ ββββββββββββββ ββββββββββββββββββ β
β β nmap β β sqlmap β β ffuf β β
β β nuclei β β dalfox β β nikto β β
β β sslyze β β commix β β gobuster β β
β β wafw00f β β arjun β β subfinder β β
β β ... 30+ β β ... β β ... β β
β ββββββββββββββ ββββββββββββββ ββββββββββββββββββ β
β β β
β βΌ β
β ββββββββββββββββββββββββ β
β β GEMINI API β β
β β (Flash Lite) β β
β β Triage Β· Analysis β β
β β CVSS Β· Reporting β β
β ββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ¨ Features
Feature | Description |
Natural Language Interface | Ask security questions in plain English β AI selects and runs appropriate tools |
3 Scan Modes | Quick (5-10 min), Medium (15-30 min), Extensive (45+ min) β each with distinct depth and AI analysis |
30+ Security Tools | nmap, sqlmap, nuclei, ffuf, dalfox, nikto, wafw00f, subfinder, sslyze, and more |
AI-Powered Analysis | Gemini AI (Flash Lite) performs vulnerability triage, CVSS scoring, and generates executive reports |
Automated Tool Selection |
|
Session Management | Track, pause, and resume security assessments across multiple targets |
OWASP Top 10 Coverage | Systematic scanning mapped to OWASP 2021 categories |
Smart Fallbacks | If a professional tool isn't installed, Python-native implementations fill the gap |
π Table of Contents
π Quick Start
Prerequisites
Python 3.11+
uv (Python package manager)
Gemini API Key (free tier available)
1. Clone & Install
git clone https://github.com/yourusername/pentest-ai-cli
cd pentest-ai-cli
# Install dependencies
uv sync2. Configure Environment
cp .env.example .envEdit .env and add your Gemini API key:
GEMINI_API_KEY=your_gemini_api_key_here3. Install Security Tools (Optional)
The server works with Python-native fallbacks, but for professional-grade scanning, install the external tools:
# macOS (Homebrew)
brew install nmap sqlmap
# Install ffuf (Go-based fuzzer)
go install github.com/ffuf/ffuf/v2@latest
# Install nuclei (vulnerability scanner)
go install github.com/projectdiscovery/nuclei/v3/cmd/nuclei@latest
# Install subfinder (subdomain discovery)
go install github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latestTip: Run
session_initto see which tools are detected on your system.
4. Start Scanning!
pentest ask \
--query "run a quick security scan" \
--target https://example.com \
--consentπ― Scan Modes
Quick Mode (5-10 minutes)
Fast triage for immediate risk assessment.
Test | Tool |
WAF Detection | wafw00f / custom |
DNS Enumeration | dnsrecon / custom |
Port Scan (top 20) | nmap / custom |
Header Analysis | custom |
TLS/SSL Audit | sslyze / custom |
Tech Fingerprinting | whatweb / custom |
Sensitive File Discovery | ffuf / custom |
Medium Mode (15-30 minutes)
Standard penetration test covering OWASP Top 10.
Test | Tool |
Everything in Quick | β |
Port Scan (top 100) | nmap |
XSS Scanning | dalfox / custom |
SQL Injection | sqlmap |
Directory Discovery | ffuf / gobuster |
CORS Misconfiguration | corscanner / custom |
Path Traversal | custom |
Open Redirect | custom |
CSRF Checks | custom |
Extensive Mode (45+ minutes)
Board-level comprehensive security assessment.
Test | Tool |
Everything in Medium | β |
Port Scan (top 1000) | nmap / masscan |
Subdomain Enumeration | subfinder / amass |
Advanced Fuzzing | wfuzz / ffuf |
SSRF Probing | custom |
Secret Scanning | trufflehog |
Git Exposure | git-dumper |
JWT Analysis | jwt_tool |
GraphQL Security | graphql-cop |
Command Injection | commix |
π§ Supported Tools
The server integrates 30+ security tools with automatic detection. If a tool isn't installed, Python-native fallbacks ensure the scan still runs.
Tool | Category | Required |
nmap | Port scanning | Optional (has fallback) |
sqlmap | SQL injection | Optional |
ffuf | Fuzzing / file discovery | Optional (has fallback) |
nuclei | Vulnerability scanning | Optional |
dalfox | XSS scanning | Optional |
subfinder | Subdomain discovery | Optional |
wafw00f | WAF detection | Optional (has fallback) |
sslyze | TLS/SSL audit | Optional (has fallback) |
nikto | Web server scanning | Optional |
gobuster | Directory brute-forcing | Optional |
whatweb | Tech fingerprinting | Optional (has fallback) |
wfuzz | Advanced fuzzing | Optional |
arjun | Hidden parameter discovery | Optional |
testssl | SSL/TLS testing | Optional |
masscan | Fast port scanning | Optional |
amass | OSINT / subdomain enum | Optional |
dnsrecon | DNS enumeration | Optional (has fallback) |
theHarvester | Email/domain OSINT | Optional |
retire.js | JS library CVE scanning | Optional |
trufflehog | Secret detection | Optional |
git-dumper | Git repo exposure | Optional |
commix | Command injection | Optional |
corscanner | CORS misconfiguration | Optional (has fallback) |
jwt_tool | JWT analysis | Optional |
graphql-cop | GraphQL security | Optional |
xsstrike | Advanced XSS | Optional |
hydra | Brute-forcing | Optional |
shodan | Internet intelligence | Optional |
enum4linux-ng | SMB enumeration | Optional |
π¬ Usage Examples
The pentest ask command uses Gemini AI to automatically plan and execute security scans based on natural language queries.
Quick vulnerability scan
pentest ask \
--query "scan for SQL injection and XSS vulnerabilities" \
--target http://localhost:3000 \
--consentFull OWASP Top 10 audit
pentest ask \
--query "perform a comprehensive OWASP Top 10 security audit" \
--target https://example.com \
--consentReconnaissance only
pentest ask \
--query "enumerate subdomains and check for exposed sensitive files" \
--target example.com \
--consentCustom report path
pentest ask \
--query "check security headers and TLS configuration" \
--target https://example.com \
--consent \
--output security-audit-2024.mdπ Full Documentation: See CLI_USAGE_GUIDE.md for detailed usage guide, examples, and troubleshooting.
π Project Structure
pentest-ai/
βββ pentest_mcp/
β βββ scan_modes.py # Quick/Medium/Extensive scan orchestration
β βββ agent.py # Standalone CLI orchestrator
β βββ session.py # Session state management
β βββ models.py # Pydantic data models
β βββ config.py # Environment & settings
β βββ cli.py # CLI interface (includes "ask" command)
β βββ cli_ui.py # Beautiful CLI UI components
β βββ tools/
β β βββ __init__.py # Python-native security tools
β β βββ professional.py # External tool wrappers (nmap, sqlmap, etc.)
β β βββ tool_registry.py # Tool execution and result processing
β βββ utils/
β βββ sanitizer.py # Input validation & sanitization
βββ tests/
β βββ test_system.py # System tests
βββ wordlists/ # Fuzzing wordlists for ffuf/gobuster
βββ reports/ # Generated scan reports (Markdown)
βββ CLI_USAGE_GUIDE.md # Example prompts and detailed usage guide
βββ pyproject.toml # Project dependencies & metadata
βββ Makefile # Development shortcuts
βββ install_tools.sh # Security tool installer script
βββ .env.example # Environment variable templateβοΈ Configuration
Environment Variables
Variable | Description | Default |
| Your Gemini API key | Required |
| LLM model for analysis |
|
| Max response tokens |
|
| LLM temperature |
|
| Session storage path |
|
| Logging verbosity |
|
| Max tools per |
|
AI Analysis Pipeline
Each scan mode uses distinct Gemini AI prompts calibrated to the scan depth:
Quick: Concise triage β focuses only on critical/high severity findings
Medium: OWASP Top 10 analysis with balanced risk assessment and remediation
Extensive: Board-level executive summary with exhaustive CVSS-scored findings, compliance mapping, and strategic recommendations
π Troubleshooting
Read-only file system Error
Reports are saved to <project_root>/reports/. Ensure the project directory is writable.
Gemini API Errors
Verify your API key:
echo $GEMINI_API_KEYCheck rate limits at aistudio.google.com
The server continues scanning even if Gemini is unavailable β raw tool output is still returned
Tools Not Detected
Install missing tools via Homebrew or your package manager. Python fallbacks cover core functionality even without external tools.
β οΈ Security Notice
This tool is for authorized security testing only.
Always obtain explicit written permission before scanning any target
Unauthorized testing violates the Computer Fraud and Abuse Act (CFAA), IT Act 2000/2008, and similar laws worldwide
The
consent_confirmedparameter exists as an ethical safeguard β never bypass itNever commit API keys to version control
π License
See LICENSE for details.
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/MohitSahoo/MCPToolForWebVulnerabilities-'
If you have feedback or need assistance with the MCP directory API, please join our Discord server