Skip to main content
Glama
Web Pentest MCP Server

Web Pentest MCP Server

by vutiendat284

🛡️ Controlled Web Pentest & Bug Bounty MCP Framework

English | Tiếng Việt

OWASP WSTG v4.2 Model Context Protocol Architecture Evidence Standard License

Controlled, Evidence-First AI Security Agent for Professional Bug Bounty Hunters & Enterprise Web Application Penetration Testing.


🌟 Core Philosophy: Ontology-Driven Security

Traditional automated vulnerability scanners and LLM-wrapper scripts suffer from severe hallucination, noisy false positives, and dangerous out-of-scope probes.

This Framework is architected upon Security Ontology & the IPOD Cycle:

  • Constants vs Variables: Security is the preservation of invariant system constants. Vulnerabilities are missing constraints (Missing Constants) at specific execution junctures.

  • The IPOD Cycle: Every finding is mapped directly across Input (Parameters/Headers) $\rightarrow$ Process (Auth/Parser/Query) $\rightarrow$ Output (Leak/Crash/Reflection) $\rightarrow$ Data (PII/Secret/State) $\rightarrow$ Loop (Stored drift).

  • Deterministic Boundary Protection: Pure Python non-LLM gatekeepers (ScopeGuard & ToolGateway) strictly enforce boundary permissions, preventing session self-destruction (/logout) and third-party SaaS pollution.


Related MCP server: keel

🎯 Human-in-the-Loop Architecture: The 3 Checkpoints

[Target Program] ──► [Checkpoint 1: Scope & Rules Authorization]
                             │ (Approved)
                             ▼
                     [Reconnaissance Pipeline] (crt.sh, subfinder, dnsrecon, httpx)
                             │
                             ▼
                     [Noise Filter & Parameter Normalization]
                             │
                             ▼
                     [Checkpoint 2: Attack Surface Triage] ◄── [Senior Pentester Review]
                             │ (Approved Entry Points)
                             ▼
                     [Granular WSTG Security Scanners]
                             │
                             ▼
                     [Checkpoint 3: Safe PoC Execution & Evidence Lock]
                             │
                             ▼
                     [OWASP Risk Engine & Dual-Rating] (CVSS v3.1 + VRT P1-P5)
  1. Checkpoint 1 (Scope Guardrail): Authorizes program boundary, wildcards, CIDR networks, and strict out-of-scope exclusions.

  2. Checkpoint 2 (Surface Triage): Filters static noise (.png, .css), deduplicates dynamic paths (/item?id={val}), and surfaces flagged sensitive entry points (auth, upload, admin, idor) for human approval before scanning.

  3. Checkpoint 3 (PoC & Evidence Verification): Requires explicit human confirmation prior to firing active payloads, locking raw HTTP responses and CLI output with cryptographic SHA-256 signatures.


🚀 Key Technical Features

  • Full OWASP WSTG v4.2 Coverage: 115 test cases pre-seeded with official documentation URLs and objectives.

  • Master Orchestrator Interface: High-level FastMCP tools reducing token consumption by >80% while preserving deep forensic inspection.

  • Hybrid Evidence Engine: Dual-layer recording supporting raw CLI execution stdout with SHA-256 hashes and 1-click reproducible cURL commands for one-shot Bug Bounty triage.

  • Contextual OWASP Risk Rating: 16 granular threat/vulnerability factors adjusted dynamically by Asset Criticality (Tier 1-3) and Data Sensitivity (Level 1-4).

  • Enterprise SQLite Foundation: Native WAL (Write-Ahead Logging) mode, enforced foreign key integrity, and zero-redundancy fingerprint deduplication (UNIQUE(fingerprint_hash)).


🛠️ MCP Tools Overview (9 Registered Tools)

Tool Name

Type

Description

manage_pentest_program

Lifecycle

View, create, update, and manage bug bounty/client engagement programs.

manage_scope_targets

Scope

Manage in-scope whitelist, CIDR blocks, and out-of-scope restrictions.

run_surface_recon

Recon

Multi-source subdomain discovery and live HTTP probing with static noise filtering.

triage_surface_entry_points

Checkpoint 2

Inspect, approve, or reject discovered sensitive entry points.

run_pentest_pipeline

Pipeline

1-Click execution across authorized surface profiles (recon_quick, recon_deep).

run_wstg_test

Granular

On-demand execution or re-testing of specific WSTG codes (WSTG-INFO-01..08, CONF-07..14, CLNT-09).

get_pentest_dashboard

Executive

Executive summary of findings distribution, WSTG progress %, and recent evidence.

inspect_finding_or_evidence

Forensics

Deep inspector retrieving full IPOD analysis and immutable SHA-256 raw logs.

browse_wstg_catalog

Catalog

Search and lookup 115 OWASP testing methodologies and official reference URLs.


💻 Quick Start & Deployment

1. Prerequisites

  • Kali Linux 2026.x or Debian-based Linux

  • Python 3.11+

  • Tools: nmap, whatweb, wafw00f, subfinder, httpx-toolkit

2. Installation

git clone git@github.com:vutiendat284/ai-security-agent-mcp.git
cd ai-security-agent-mcp
python3 -m venv .venv
source .venv/bin/activate
pip install -e .

3. Launching FastMCP Server

# stdio mode (Claude Desktop, Antigravity IDE)
python3 -m web_pentest_mcp.server

# streamable-http mode
WEB_PENTEST_MCP_TRANSPORT=streamable-http python3 -m web_pentest_mcp.server

🔒 Confidentiality & Safe Harbors

This repository contains core framework orchestration, boundary enforcement, and reporting engines. Proprietary active exploit payloads, private vulnerability triage databases, and commercial Web SPA modules are maintained separately under commercial licensing.


📄 License & Author

  • Author: Senior Web Penetration Tester & AI Security Architect (CPENT, LPT, eWPT, LPIC)

  • License: Proprietary - All Rights Reserved. Contact author for enterprise commercial deployment.

Available Tools

10 tools
browse_wstg_catalogA

Tra cứu Từ điển Kiểm thử An ninh Chuẩn OWASP Web Security Testing Guide (WSTG) v4.2. Gồm 13 chuyên đề và 119 bài kiểm tra bảo mật từ workbook pentest 2026.

📌 HƯỚNG DẪN THỰC HIỆN:

  1. Tìm kiếm theo từ khóa: Nhập từ khóa kỹ thuật vào ô 'query' (ví dụ: 'header', 'ssl', 'injection', 'cors', 'auth').

  2. Lọc theo chuyên đề: Chọn tên nhóm từ danh sách Dropdown 'section' (ví dụ: 'Information Gathering', 'Configuration and Deployment Management').

  3. Phân trang: Điều chỉnh 'offset' và 'limit' nếu danh sách kết quả lớn.

💡 VÍ DỤ MINH HỌA:

  • Ví dụ 1: Tìm tất cả các bài kiểm tra bảo mật liên quan đến HTTP Header: browse_wstg_catalog(query="header", limit=10)

  • Ví dụ 2: Liệt kê các bài test thuộc nhóm Thu thập thông tin (INFO): browse_wstg_catalog(section="Information Gathering", limit=20)

Inputs: limit, query, offset, section. Returns: object

export_bugbounty_reportC

Bug Bounty One-Shot Triage Reporter (Phase 3 Engine). T? ??ng xu?t b?o c?o l? h?ng chu?n Markdown ph?c v? n?p HackerOne, Bugcrowd ho?c b?n giao Kh?ch h?ng Doanh nghi?p:

  • B?ng ch?ng 3 t?ng: L?nh cURL 1 ch?m, ??u ra terminal th?, m? b?m SHA-256 ??i chi?u to?n v?n.

  • ??nh gi? x?p h?ng k?p (Dual-Rating): ?i?m r?i ro OWASP Risk Rating k?t h?p Bug Bounty VRT (P1 - P5).

  • C? ch? khuy?t thi?u IPOD (Missing Constant) v? h??ng d?n v? l?i r? r?ng.

Inputs: finding_id, program_id, target_url. Returns: object

get_pentest_dashboardA

Executive Pentest Dashboard: Báo cáo Dashboard Điều hành Tổng quan Kết quả Pentest. Tổng hợp phân bố lỗ hổng theo mức độ nghiêm trọng (Critical, High, Medium, Low), tiến độ hoàn thành WSTG Checklist (%), và bằng chứng forensics SHA-256.

📌 HƯỚNG DẪN THỰC HIỆN:

  1. program_id: Chọn mã Program từ Dropdown để tổng hợp toàn bộ tài sản thuộc chương trình đó.

  2. target_url: (Tùy chọn) Điền URL nếu chỉ muốn lọc riêng cho 1 mục tiêu cụ thể.

  3. Để trống cả 2: Tổng hợp toàn bộ hệ thống.

💡 VÍ DỤ MINH HỌA:

  • Ví dụ 1: Xem dashboard dự án Cổng DVC: get_pentest_dashboard(program_id="PROG-DVC-QUANGNINH-2026")

  • Ví dụ 2: Xem kết quả cho riêng một máy chủ: get_pentest_dashboard(target_url="http://127.0.0.1:8000")

Inputs: program_id, target_url. Returns: object

inspect_finding_or_evidenceA

Deep Inspector: Điều tra chuyên sâu và thẩm định bằng chứng kỹ thuật. Cho phép truy xuất 100% dữ liệu gốc:

  • Nếu truyền finding_id: Trả về chi tiết điểm IPOD khuyết thiếu, giải pháp và ĐỦ 16 CHỈ SỐ GỐC OWASP Risk Rating.

  • Nếu truyền evidence_id: Trả về câu lệnh CLI đã chạy, raw stdout/stderr thô và mã băm SHA-256 bảo đảm tính toàn vẹn.

📌 HƯỚNG DẪN THỰC HIỆN:

  1. finding_id: Nhập ID lỗ hổng (ví dụ: 1) để xem chi tiết 16 chỉ số OWASP Risk Rating.

  2. evidence_id: Nhập ID bằng chứng (ví dụ: 5) để trích xuất command line thô và mã băm SHA-256.

💡 VÍ DỤ MINH HỌA:

  • Xem chi tiết lỗ hổng số 1: inspect_finding_or_evidence(finding_id=1)

  • Trích xuất bằng chứng số 3: inspect_finding_or_evidence(evidence_id=3)

Inputs: finding_id, evidence_id. Returns: object

manage_pentest_programA

Quản lý Vòng đời Chương trình Kiểm thử An ninh (Pentest Program Lifecycle Manager). Tập hợp toàn bộ các chức năng: XEM danh sách, TẠO MỚI, CẬP NHẬT và XÓA Chương trình. Mỗi Program là một dự án đánh giá độc lập, quản lý danh sách nhiều URLs/Tài sản (1:N Multi-Asset Scope).

📌 HƯỚNG DẪN THỰC HIỆN:

  1. action (Chọn hành động):

    • 'list': Liệt kê toàn bộ các Chương trình (hoặc xem chi tiết nếu chọn program_id).

    • 'create': Tạo mới một Chương trình kiểm thử bảo mật.

    • 'update': Cập nhật thông tin (Tên, Trạng thái, Thẩm quyền) của Chương trình đã chọn.

    • 'delete': Xóa vĩnh viễn Chương trình và toàn bộ tài sản trực thuộc khỏi CSDL.

  2. program_id: Chọn mã Program từ Dropdown có sẵn trong database (đối với list chi tiết, update, delete). Khi create, nếu để trống thì hệ thống TỰ ĐỘNG SINH mã chuẩn dạng PROG-YYYYMMDD-XXXXXX.

  3. program_name: Nhập tên dự án/chương trình kiểm thử (ví dụ: 'Đánh giá An ninh Cổng DVC Quảng Ninh 2026').

  4. status: Trạng thái chương trình ('active', 'draft', 'paused', 'closed').

  5. authorization_confirmed: Đánh dấu cam kết đã có thỏa thuận phê duyệt kiểm thử an ninh hợp pháp (Mặc định: True).

💡 VÍ DỤ MINH HỌA:

  • Ví dụ 1 (Xem tất cả): manage_pentest_program(action="list")

  • Ví dụ 2 (Tạo mới tự sinh ID): manage_pentest_program(action="create", program_name="Đánh giá An ninh Định kỳ 2026")

  • Ví dụ 3 (Cập nhật trạng thái): manage_pentest_program(action="update", program_id="PROG-DVC-QUANGNINH-2026", status="paused")

  • Ví dụ 4 (Xóa chương trình): manage_pentest_program(action="delete", program_id="PROG-DVC-QUANGNINH-2026")

⚠️ BƯỚC TIẾP THEO: Sau khi tạo Program, hãy dùng tool 'manage_scope_targets' (action='set_target') để thêm các URL/tài sản vào chương trình này.

Inputs: action, status, program_id, program_name, +1 more. Returns: object

manage_scope_targetsA

Quản lý Tài sản / Mục tiêu trong Phạm vi Kiểm thử (Scope Targets Manager). Thêm mới, Cập nhật (Upsert), Xóa, Liệt kê và Xác thực tính hợp pháp của URLs/Assets theo Program.

📌 HƯỚNG DẪN THỰC HIỆN:

  1. program_id: Chọn mã Program từ danh sách Dropdown có sẵn trong database.

  2. action (Chọn hành động):

    • 'set_target' (Mặc định - Cơ chế Upsert): Thêm mới URL vào Program. Nếu URL đã tồn tại thì tự động cập nhật Asset Tier và Data Sensitivity! Không lo trùng lặp.

    • 'remove_target': Xóa / Thu hồi URL khỏi phạm vi được phép kiểm thử.

    • 'verify': Kiểm tra nhanh xem URL đã được cấp phép trong Program hay chưa.

    • 'list_targets': Liệt kê toàn bộ các URLs/tài sản và phân loại Tier + Data Sensitivity trong Program.

  3. target: Nhập URL hoặc IP/Domain mục tiêu (ví dụ: 'https://dichvucong.quangninh.gov.vn' hoặc '127.0.0.1:8000').

  4. asset_tier: Cấp độ tài sản (1: Critical Core [1.5x], 2: Standard Production [1.0x], 3: Staging/Dev [0.6x]).

  5. data_sensitivity: Cấp độ nhạy cảm dữ liệu (L1: Public [0.7x], L2: Internal [1.0x], L3: Confidential [1.2x], L4: Restricted [1.6x]).

💡 VÍ DỤ MINH HỌA:

  • Ví dụ 1: Thêm/cập nhật URL có dữ liệu PII vào chương trình: manage_scope_targets(action='set_target', program_id='PROG-DVC-QUANGNINH-2026', target='https://sso.quangninh.gov.vn', asset_tier='1', data_sensitivity='L3')

  • Ví dụ 2: Liệt kê các tài sản trong chương trình: manage_scope_targets(action='list_targets', program_id='PROG-DVC-QUANGNINH-2026')

  • Ví dụ 3: Kiểm tra quyền pháp lý trước khi chạy pipeline: manage_scope_targets(action='verify', program_id='PROG-DVC-QUANGNINH-2026', target='https://sso.quangninh.gov.vn')

Inputs: action, target, asset_tier, program_id, +1 more. Returns: object

run_pentest_pipelineA

Master Penetration Testing Pipeline: Kích hoạt Pipeline Kiểm thử Tự động 1 Chạm theo chuẩn OWASP WSTG v4.2. Tự động thu thập bằng chứng pháp lý (Forensics CLI stdout + SHA-256 hash), tính điểm rủi ro theo ma trận 16 chỉ số OWASP Risk Rating.

📌 HƯỚNG DẪN THỰC HIỆN:

  1. target_url: Nhập URL mục tiêu (ví dụ: 'http://127.0.0.1:8000' hoặc 'https://dichvucong.quangninh.gov.vn').

  2. program_id: Chọn mã Program từ Dropdown (hoặc để trống để hệ thống tự động nhận diện từ URL).

  3. test_scope: Chọn phạm vi kiểm thử qua Dropdown:

    • 'full': Quét toàn diện tất cả các bài test WSTG khả dụng song song.

    • 'section:WSTG-INFO': Quét nhóm Thu thập thông tin (Fingerprinting, OSINT, WAF).

    • 'section:WSTG-CONF': Quét nhóm Cấu hình & Headers (HSTS, CSP, X-Frame-Options).

    • 'objective:WSTG-INFO-02': Quét đúng 1 bài test cụ thể.

  4. scan_profile: Chọn cấu hình quét ('recon_quick': quét nhanh ~10-15s; 'recon_deep': quét chuyên sâu kèm Nmap).

  5. asset_tier: Cấp độ tài sản ('1'=Critical, '2'=Standard Production, '3'=Internal/Staging) để nhân hệ số rủi ro.

  6. data_sensitivity: Phân loại dữ liệu ('L1', 'L2', 'L3', 'L4').

💡 VÍ DỤ MINH HỌA:

  • Ví dụ 1: Quét toàn diện nhanh trên hệ thống nội bộ: run_pentest_pipeline(target_url="http://127.0.0.1:8000", test_scope="full", scan_profile="recon_quick")

  • Ví dụ 2: Quét chuyên đề Cấu hình Web Server (CONF): run_pentest_pipeline(target_url="http://127.0.0.1:8000", test_scope="section:WSTG-CONF")

⚠️ CHÚ Ý BẢO MẬT: Mục tiêu BẮT BUỘC phải được cấp phép trước qua 'manage_scope_targets'. Hệ thống sẽ TỪ CHỐI THỰC THI (BLOCKED - TARGET_OUT_OF_SCOPE) nếu chưa được xác nhận ủy quyền.

Inputs: target_url (required), asset_tier, program_id, test_scope, +2 more. Returns: object

run_surface_reconC

Surface Grapher: Qu?t trinh s?t b? m?t t?n c?ng ?a ngu?n (crt.sh, subfinder, dnsrecon, httpx). T? ??ng ?p d?ng B? l?c t?i nguy?n t?nh (Noise Filter) v? g?n c? c?c Entry Points kh? nghi ph?c v? Ch?t Ch?n 2.

Inputs: program_id, root_domain. Returns: object

run_wstg_testA

Granular WSTG Test Dispatcher: Thực thi hoặc kiểm thử lại (Re-test) một mã kiểm tra WSTG đơn lẻ cụ thể.

📌 HƯỚNG DẪN THỰC HIỆN:

  1. wstg_code: Chọn mã bài kiểm tra từ Dropdown:

    • 'WSTG-INFO-01': Search Engine Recon & OSINT

    • 'WSTG-INFO-02': Fingerprint Web Server & Frameworks

    • 'WSTG-INFO-08': Fingerprint Web Application Firewall

    • 'WSTG-CONF-07': HTTP Strict Transport Security (HSTS)

    • 'WSTG-CONF-12': Content Security Policy (CSP) Analysis

    • 'WSTG-CONF-14': HTTP Security Headers Hardening

    • 'WSTG-CLNT-09': Clickjacking Defense & X-Frame-Options

  2. target_url: URL mục tiêu cần kiểm tra.

  3. program_id: Chọn mã Program tương ứng từ Dropdown (hoặc để trống để tự động nhận diện).

  4. data_sensitivity: Cấp độ nhạy cảm dữ liệu ('L1', 'L2', 'L3', 'L4') để nhân hệ số rủi ro tính Severity (mặc định tự động lấy theo target trong CSDL hoặc chọn mới).

💡 VÍ DỤ MINH HỌA:

  • Ví dụ: Kiểm tra chính sách CSP: run_wstg_test(wstg_code="WSTG-CONF-12", target_url="http://127.0.0.1:8000")

⚠️ CHÚ Ý BẢO MẬT: Mục tiêu BẮT BUỘC phải được cấp phép trước qua 'manage_scope_targets'.

Inputs: wstg_code, program_id, target_url, data_sensitivity. Returns: object

triage_surface_entry_pointsB

Human Checkpoint 2: Th?m ??nh v? Ph? duy?t B? m?t T?n c?ng (Surface Triage). Cho ph?p Chuy?n gia Pentest xem, duy?t (APPROVE) ho?c lo?i b? (REJECT) c?c ?i?m ch?m kh? nghi tr??c khi ch?y qu?t s?u.

Inputs: action, program_id, endpoint_id. Returns: object

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 10 tools

    Disambiguation3/5

    Most tools have distinct purposes, but there is meaningful overlap between run_pentest_pipeline and run_wstg_test because the pipeline can target a single WSTG objective while run_wstg_test also runs individual tests. run_surface_recon also partially overlaps with the pipeline's recon scan profiles. Descriptions help clarify when to use each, but an agent could still hesitate between them.

    Naming Consistency5/5

    All tool names use snake_case and generally follow a verb_noun pattern such as manage_pentest_program, run_wstg_test, get_pentest_dashboard, and export_bugbounty_report. The few compound names like inspect_finding_or_evidence remain readable and consistent with the set.

    Tool Count5/5

    The set contains 10 tools, which is well within the appropriate range for a focused pentest workflow. Each tool corresponds to a meaningful stage or operation: lifecycle management, scope, scanning, catalog lookup, evidence inspection, triage, and reporting.

    Completeness4/5

    The surface covers the core pentest lifecycle from program and scope management through scanning, triage, inspection, and reporting. Minor gaps remain around explicitly listing or managing findings beyond inspecting by ID, such as listing all findings or updating finding status, but these are workable given the dashboard and report tools.

    Maintenance

    ActivityMaintained
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • -
      license
      Not graded
      quality
      Not graded
      maintenance
      Enables ethical security testing and attack surface management through SSL certificate validation, CVE queries, subdomain enumeration, security header analysis, and comprehensive reconnaissance capabilities. Designed for authorized penetration testing workflows with responsible disclosure practices.
      -
    • A
      license
      C
      quality
      D
      maintenance
      Enables authorized pentest and bug bounty workflows from any MCP client, with scoped recon, per-host rate limits, and scanner output turned into deduplicated, triaged finding cards.
      9
      23 PyPI
      2
      MIT
    • A
      license
      B
      quality
      B
      maintenance
      Enables AI agents to conduct authorized pentests and bug-bounty workflows with scope enforcement, audit logging, reconnaissance, safe vulnerability checks, payload/wordlist generation, and professional report generation.
      14
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables MCP clients to carry out a compliant, non-destructive, auditable authorized security-testing workflow — project intake, scope reading, asset discovery, non-destructive verification, evidence collection, and report-draft generation with manual submission tracking — where every outbound action is gated by scope checks, one-time human confirmation tokens, rate limits, and append-only audit logging.
      MIT