Cover image
Try Now
2025-04-07

3 years

Works with Finder

1

Github Watches

3

Github Forks

6

Github Stars

OWASP MCP Server

A WebSocket-based Mission Control Protocol (MCP) server for OWASP ZAP security scanning, enabling real-time control and monitoring of security assessments.

Prerequisites

  • Python 3.8+
  • OWASP ZAP 2.12.0+
  • Java Runtime Environment (JRE) 8+
  • Sudo/Administrator privileges (required for ZAP)

Why MCP Server?

Feature MCP Server ZAP UI ZAP API
Automation ✅ Full ❌ Limited ✅ Basic
Real-time Updates ✅ WebSocket ✅ Visual ❌ Polling
CI/CD Integration ✅ Native ❌ Manual ✅ Complex
Batch Processing ✅ Yes ❌ No ✅ Limited
Learning Curve 🟡 Medium 🟢 Easy 🔴 Hard
Progress Tracking ✅ Real-time ✅ Visual ❌ Manual
Multiple Domains ✅ Concurrent ❌ Sequential 🟡 Limited
Error Handling ✅ Robust ✅ Basic ❌ Manual

Core Components

  • mcp_server.py - The engine that powers everything. Start this first - it's your security scanning powerhouse that connects to OWASP ZAP.

  • mcp_client.py - The brains behind the operation. A powerful SDK that other components use to talk to the server (you won't use this directly).

  • mcp_cli.py - Your go-to command line tool for scanning. Think of it as your Swiss Army knife for security scanning - simple to use, yet powerful.

  • test_client.py - A learning tool that shows you the ropes. Perfect for understanding how everything works or testing your setup.

Quick Start

  1. Install OWASP ZAP: Download from https://www.zaproxy.org/download/

  2. Setup Project:

    git clone https://github.com/shadsidd/Owasp-Zap-MCP-Server-Demo.git
    cd Owasp-Zap-MCP-Server-Demo
    python -m venv venv
    source venv/bin/activate  # Windows: .\venv\Scripts\activate
    pip install -r requirements.txt
    
  3. Start ZAP (requires sudo/admin privileges):

    # macOS/Linux
    sudo /Applications/ZAP.app/Contents/Java/zap.sh -daemon -port 8080
    
    # Windows (as Administrator)
    "C:\Program Files\OWASP\Zed Attack Proxy\zap.bat" -daemon -port 8080
    
  4. Start MCP Server:

    python mcp_server.py
    
  5. Use the CLI:

    # Quick spider scan (passive)
    python mcp_cli.py scan example.com
    
    # Full active scan (comprehensive)
    python mcp_cli.py fullscan example.com
    
    # Specific scan type with HTML report
    python mcp_cli.py scan --scan-type=active --output=html example.com
    
    # Multiple domains scan
    python mcp_cli.py scan domain1.com domain2.com
    
    # Scan from file
    python mcp_cli.py scan -f domains.txt
    

Example Files

The examples/ directory contains scripts demonstrating key features:

Security Scanning

  • basic_scan.py - Core scanning with error handling
  • authenticated_scan.py - Form-based and other authentication methods
  • scan_domains.py - Concurrent scanning of multiple domains
  • custom_scan_policy.py - Custom rules and thresholds

Integration & Monitoring

  • ci_cd_integration.py - CI/CD pipeline integration
  • real_time_monitor.py - Live progress and alert monitoring
  • team_notifications.py - Email, Slack, and Teams notifications
  • custom_rules.py - Specialized security rules

Important Notes

  1. Sudo Requirements:

    • OWASP ZAP requires sudo/administrator privileges to run
    • You will be prompted for your password when starting ZAP
  2. Port Configuration:

    • ZAP uses port 8080 by default
    • MCP Server uses port 3000
    • Ensure these ports are not in use before starting
  3. Common Issues:

    • If you see "Address already in use" error:
      # Check what's using port 8080
      sudo lsof -i :8080
      # Kill the process if needed
      sudo kill -9 <PID>
      
    • If ZAP fails to start, try:
      # Clear any existing ZAP processes
      pkill -f zap
      

Scan Types

The MCP Server supports multiple scan types:

  • Spider Scan (Default): Crawls the website to discover content, fastest but finds fewer issues
  • Active Scan: Performs security testing with actual attacks, finds more vulnerabilities
  • Full Scan: Comprehensive scanning (spider + active), provides the most thorough results

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • Yasir Eryilmaz
  • AI scriptwriting assistant for short, engaging video content.

  • Daren White
  • A supportive coach for mastering all Spanish tenses.

  • J. DE HARO OLLE
  • Especialista en juegos de palabras en varios idiomas.

  • albert tan
  • Japanese education, creating tailored learning experiences.

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • jae-jae
  • MCP服务器使用剧作《无头浏览器》获取网页内容。

  • HiveNexus
  • 一个适用于中小型团队的AI聊天机器人,支持DeepSeek,Open AI,Claude和Gemini等车型。 专为中小团队设计的ai聊天应用,支持deepSeek,打开ai,claude,双子座等模型。

  • ravitemer
  • 一个功能强大的Neovim插件,用于管理MCP(模型上下文协议)服务器

  • patruff
  • Ollama和MCP服务器之间的桥梁,使本地LLMS可以使用模型上下文协议工具

  • pontusab
  • 光标与风浪冲浪社区,查找规则和MCP

  • JackKuo666
  • 🔍使AI助手可以通过简单的MCP接口搜索和访问PYPI软件包信息。

  • av
  • 毫不费力地使用一个命令运行LLM后端,API,前端和服务。

    Reviews

    2 (1)
    Avatar
    user_MCYNAAGN
    2025-04-16

    Owasp-Zap-MCP-Server-Demo by shadsidd is a fantastic tool for anyone looking to enhance their web security testing capabilities. The demo server is easy to set up and integrates seamlessly with OWASP ZAP, making the testing process more efficient. Highly recommend checking out the GitHub link for more details!