Skip to main content
Glama

MCP Pentest - Automated Penetration Testing Framework

MCP (Model Context Protocol) server untuk automated penetration testing yang cerdas. Framework ini dapat secara otomatis melakukan reconnaissance, vulnerability scanning, dan controlled exploitation berdasarkan teknologi target yang terdeteksi.

šŸš€ Features

šŸ” Reconnaissance Tools

  • Port Scanning - Comprehensive Nmap integration dengan berbagai scan modes

  • Subdomain Enumeration - Certificate transparency logs + DNS bruteforcing

  • Technology Detection - Automatic web technology fingerprinting

  • Directory Bruteforcing - Intelligent directory and file discovery

šŸ›”ļø Vulnerability Assessment

  • Nuclei Integration - Automated vulnerability scanning dengan template database

  • Nikto Scanning - Web server vulnerability detection

  • SQLMap Integration - SQL injection testing

  • Custom Web Vulnerability Checks - XSS, Directory Traversal, Command Injection, dll

⚔ Exploitation Modules

  • Metasploit Integration - Automatic exploit search dan execution

  • Custom Exploit Attempts - Framework-specific exploitation

  • Technology-Specific Exploits - Targeted attacks berdasarkan tech stack

  • Proof-of-Concept Generation - Automated PoC creation

šŸ¤– Intelligent Workflow Engine

  • Adaptive Decision Making - AI-driven next step recommendations

  • Risk-Based Prioritization - Smart vulnerability prioritization

  • Technology-Aware Testing - Customized testing berdasarkan detected technologies

  • Automated Workflow Management - Sequential phase execution dengan dependency handling

šŸ“Š Comprehensive Reporting

  • Multi-Format Reports - HTML, PDF, JSON, Markdown output

  • Executive Summaries - Business-friendly risk assessments

  • Technical Details - Detailed vulnerability descriptions dan remediation

  • Evidence Collection - Automatic proof collection dan documentation

Related MCP server: INNP

šŸ“‹ Prerequisites

Required Tools

Pastikan tools berikut sudah terinstall di sistem:

# Network scanning
sudo apt install nmap

# Web vulnerability scanning
go install -v github.com/projectdiscovery/nuclei/v3/cmd/nuclei@latest

# Web server scanning
sudo apt install nikto

# SQL injection testing
sudo apt install sqlmap

# Optional: Metasploit (untuk advanced exploitation)
curl https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb > msfinstall
chmod 755 msfinstall
sudo ./msfinstall

Node.js Dependencies

npm install

šŸ› ļø Installation

  1. Clone repository

git clone <repository-url>
cd mcp-pentest
  1. Install dependencies

npm install
  1. Build project

npm run build
  1. Configure MCP client Tambahkan ke file konfigurasi MCP client Anda:

{
  "mcpServers": {
    "pentest": {
      "command": "node",
      "args": ["path/to/mcp-pentest/dist/index.js"],
      "env": {}
    }
  }
}

šŸŽÆ Usage Examples

Basic Automated Pentest

// Full scope automated pentest
await mcp.call("auto_pentest", {
  target: "example.com",
  scope: "full",
  intensity: "active"
});

Reconnaissance Only

// Port scanning
await mcp.call("nmap_scan", {
  target: "192.168.1.1",
  scan_type: "aggressive"
});

// Technology detection
await mcp.call("tech_detection", {
  url: "https://example.com"
});

// Subdomain enumeration
await mcp.call("subdomain_enum", {
  domain: "example.com"
});

Vulnerability Scanning

// Nuclei scan with specific templates
await mcp.call("nuclei_scan", {
  target: "https://example.com",
  templates: ["cves", "vulnerabilities"],
  severity: "high"
});

// SQL injection testing
await mcp.call("sqlmap_scan", {
  url: "https://example.com/login.php",
  data: "username=admin&password=test"
});

Exploitation Attempts

// Search for Metasploit modules
await mcp.call("metasploit_search", {
  service: "Apache 2.4.41",
  platform: "linux"
});

// Attempt exploitation
await mcp.call("exploit_attempt", {
  target: "192.168.1.100",
  vulnerability: "SQL Injection",
  payload: "UNION SELECT"
});

Intelligent Next Steps

// Get AI-powered recommendations
await mcp.call("suggest_next_steps", {
  scan_results: JSON.stringify(previousResults)
});

Report Generation

// Generate comprehensive report
await mcp.call("generate_report", {
  target: "example.com",
  format: "html"
});

šŸ”§ Configuration

Scan Intensity Levels

Passive

  • Certificate transparency logs

  • DNS enumeration

  • Header analysis

  • Public information gathering

Active

  • Port scanning

  • Directory bruteforcing

  • Vulnerability scanning

  • Service enumeration

Aggressive

  • Full port range scanning

  • Intensive directory bruteforcing

  • Active exploitation attempts

  • Comprehensive vulnerability testing

Scope Options

Network

  • Port scanning

  • Service enumeration

  • Network vulnerability assessment

Web

  • Web application testing

  • Technology fingerprinting

  • Web vulnerability scanning

Full

  • Comprehensive assessment

  • Network + Web testing

  • Complete attack surface analysis

šŸ›”ļø Security Considerations

Ethical Usage

āš ļø IMPORTANT: Framework ini hanya boleh digunakan untuk:

  • Authorized penetration testing

  • Security research dengan permission

  • Testing terhadap sistem milik sendiri

  • Educational purposes

Safety Features

  • Rate limiting - Automatic request throttling

  • Timeout controls - Prevent long-running scans

  • Scope validation - Target validation dan restriction

  • Safe exploitation - Controlled dan reversible tests

  • Pastikan ada written authorization sebelum testing

  • Comply dengan local laws dan regulations

  • Respect responsible disclosure practices

  • Document semua testing activities

šŸ“Š Sample Output

Automated Pentest Results

{
  "workflow": {
    "target": "example.com",
    "scope": "full",
    "phases": [
      {
        "name": "reconnaissance",
        "status": "completed",
        "tools": ["nmap_scan", "subdomain_enum", "tech_detection"]
      }
    ],
    "results": {
      "reconnaissance": {
        "open_ports": [
          {"port": 80, "service": "http", "version": "Apache 2.4.41"},
          {"port": 443, "service": "https", "version": "Apache 2.4.41"}
        ],
        "technologies": [
          {"technology": "WordPress", "version": "5.8", "confidence": 95}
        ]
      },
      "vulnerabilities": [
        {
          "name": "Outdated WordPress",
          "severity": "medium",
          "description": "WordPress version 5.8 has known vulnerabilities"
        }
      ],
      "risk_score": 65,
      "threat_level": "medium"
    }
  }
}

šŸ”„ Workflow Engine

Framework menggunakan intelligent workflow engine yang dapat:

  1. Analyze scan results - Automatically interpret findings

  2. Make decisions - Determine next testing steps

  3. Adapt strategy - Modify approach based on discoveries

  4. Prioritize actions - Focus on high-impact vulnerabilities

  5. Generate insights - Provide actionable recommendations

Decision Making Logic

Reconnaissance → Technology Detection → Vulnerability Assessment → Risk Analysis → Exploitation → Reporting
     ↓              ↓                    ↓                    ↓             ↓            ↓
 Port Discovery → CMS/Framework → Targeted Scanning → Priority Queue → Controlled → Evidence
 Subdomain Enum → Version Info → Custom Checks → Risk Scoring → Attempts → Collection

šŸ—ļø Architecture

ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”    ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”    ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
│   MCP Client    │    │  MCP Protocol    │    │  Pentest Server │
│  (Claude/etc)   │◄──►│   Transport      │◄──►│    (Node.js)    │
ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜    ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜    ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜
                                                        │
                                               ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
                                               │ Tool Integration │
                                               │   - Nmap        │
                                               │   - Nuclei      │
                                               │   - Nikto       │
                                               │   - SQLMap      │
                                               │   - Metasploit  │
                                               ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜

šŸ¤ Contributing

  1. Fork repository

  2. Create feature branch

  3. Implement changes dengan tests

  4. Submit pull request

  5. Follow security best practices

šŸ“œ License

MIT License - See LICENSE file for details

āš ļø Disclaimer

Tool ini dibuat untuk tujuan educational dan authorized security testing. User bertanggung jawab untuk memastikan penggunaan yang legal dan ethical. Developer tidak bertanggung jawab atas penyalahgunaan tool ini.

šŸ†˜ Support

  • šŸ“– Documentation: Wiki

  • šŸ› Bug Reports: Issues

  • šŸ’¬ Discussions: Forum

  • šŸ“§ Contact: Email

Available Tools

27 tools
adaptive_strategyC

Generate adaptive penetration testing strategy based on detected services and OS

Inputs: ports (required), technologies (required), existing_vulns.

auto_pentestC

Perform comprehensive automated penetration test

Inputs: target (required), scope, intensity.

burp_active_scanC

Perform active vulnerability scan using Burp Suite

Inputs: target (required), scope.

burp_exportC

Export Burp Suite scan results

Inputs: format, output_path.

burp_proxy_scanC

Perform passive scan through Burp Suite proxy

Inputs: target (required), duration.

burp_spiderC

Spider/crawl target using Burp Suite

Inputs: target (required).

burp_startC

Start Burp Suite Professional with API enabled

Inputs: jar_path, project_file, headless, memory.

burp_stopB

Stop Burp Suite instance

Inputs: no named parameters.

cve_discoveryC

Discover CVEs based on detected technologies and versions

Inputs: technologies (required).

directory_bruteforceC

Bruteforce directories and files on web server

Inputs: url (required), wordlist, extensions, use_seclists.

directory_scanC

Advanced directory scanning with dirb/dirsearch/gobuster/feroxbuster

Inputs: target (required), tool, recursive.

exploit_attemptC

Attempt exploitation using detected vulnerabilities

Inputs: target (required), vulnerability (required), payload.

fuzzing_directoriesC

Fuzz directories and files using ffuf/wfuzz

Inputs: target (required), tool, extensions.

fuzzing_parametersC

Fuzz extracted parameters with various payloads using ffuf/wfuzz

Inputs: parameters (required), tool.

generate_reportC

Generate comprehensive penetration test report

Inputs: target (required), format.

nikto_scanC

Run Nikto web vulnerability scanner

Inputs: url (required), port.

nmap_scanC

Perform comprehensive port scan using Nmap

Inputs: target (required), scan_type.

nuclei_scanC

Run Nuclei vulnerability scanner

Inputs: target (required), templates, severity.

parameter_extractionC

Extract parameters from web applications using Katana and manual methods

Inputs: target (required), depth.

sqlmap_scanC

Test for SQL injection vulnerabilities

Inputs: url (required), data, cookie.

subdomain_enumC

Enumerate subdomains of target domain using multiple methods

Inputs: domain (required), wordlist, use_subfinder, fuzz_tool.

suggest_next_stepsC

Analyze current findings and suggest next steps

Inputs: scan_results (required).

tech_detectionC

Detect technologies used by target website

Inputs: url (required).

test_active_directoryC

Comprehensive Active Directory penetration testing

Inputs: target (required), domain.

test_smb_serviceC

Comprehensive SMB/NetBIOS service testing

Inputs: target (required), port.

test_web_applicationC

Technology-specific web application penetration testing

Inputs: target (required), technologies (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.9/5.0

    Scored across 27 tools

    Disambiguation3/5

    Most tools have distinct purposes, but there is notable overlap in scanning and fuzzing categories. For example, directory_bruteforce, directory_scan, and fuzzing_directories could be confused for similar tasks, though their descriptions provide some differentiation. Similarly, burp_active_scan and nuclei_scan both target vulnerability scanning, potentially causing misselection.

    Naming Consistency4/5

    Tool names follow a consistent snake_case pattern throughout, which is predictable and readable. However, there is minor inconsistency in verb usage, such as 'scan' vs. 'enum' vs. 'discovery' for similar actions, and some tools use generic terms like 'test' or 'generate' without clear alignment. Overall, the naming is mostly consistent with only slight deviations.

    Tool Count2/5

    With 27 tools, the count feels excessive for a penetration testing server, leading to potential confusion and redundancy. While penetration testing is a broad domain, many tools overlap in functionality (e.g., multiple scanning and fuzzing tools), suggesting the set could be streamlined without losing coverage. This heavy tool count may overwhelm agents and reduce usability.

    Completeness4/5

    The tool set provides comprehensive coverage for penetration testing workflows, including reconnaissance, scanning, exploitation, and reporting. Minor gaps exist, such as lack of tools for post-exploitation activities or specific protocol testing beyond SMB and web applications, but core operations are well-covered. Agents can likely work around these gaps using existing tools.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      AI-powered cybersecurity automation platform with 150+ security tools and 12+ autonomous AI agents for penetration testing, vulnerability assessment, and bug bounty hunting. Enables comprehensive security testing through intelligent tool selection and automated workflows.
      3
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      AI-native security testing platform with native MCP support, enabling automated penetration testing, vulnerability discovery, and attack-chain analysis through conversational commands.
      Apache 2.0
    • A
      license
      C
      quality
      D
      maintenance
      Enables AI agents to orchestrate 25+ security tools for penetration testing through natural language, automating scans, vulnerability detection, and report generation.
      31
      MIT
    • F
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to perform safe, authorized penetration testing by managing engagements, enforcing scope and risk policies, and orchestrating tools like Nmap, Nuclei, and Subfinder.
      -