# cybersecurityup/offensive-mcp-ai architecture

> Architecture diagram of the GitHub repository cybersecurityup/offensive-mcp-ai, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/cybersecurityup/offensive-mcp-ai
- Repository: https://github.com/cybersecurityup/offensive-mcp-ai

## Overview

##### Project type and purpose
- This is an open‐source toolkit (MCP-based microservices) that exposes multiple “tool servers” to an LLM (Claude) via the Model Context Protocol.
- It consists of independent Python MCP servers (payload, recon, shellcode, Wazuh connectors) that Claude can invoke to perform red-team and SOC tasks.

##### File structure
- Top-level files are all MCP server entry points:
- mcp_recon_server.py
- mcp_payload_server.py
- mcp_shellcode_builder_server.py
- mcp_wazuh_server.py
- There is no monolithic “backend” or “frontend” directory—instead each script is a microservice exposing one or more @mcp.tool endpoints.
- README.md contains instructions on CLI/SDK installation, Claude Desktop integration, and local testing via the Inspector UI.

##### Key insights from the README
- MCP CLI/SDK (Python) is the client library that binds Claude Desktop or any LLM to your Python servers over JSON-RPC.
- The Inspector UI (npx @modelcontextprotocol/inspector) can sit between the LLM and servers for local debugging.

##### Main components
a. LLM Client Layer
– Claude Desktop (or any LLM)
– Inspector UI (optional, for local test harness)
b. MCP Client/SDK
– The Python MCP CLI library that issues JSON-RPC or stdio calls
c. Tool Servers (microservices)
– Recon Server (mcp_recon_server.py)
– Payload Server (mcp_payload_server.py)
– Shellcode Builder Server (mcp_shellcode_builder_server.py)
– Wazuh Server (mcp_wazuh_server.py)
d. External Resources & Services
– Wazuh, Suricata, Zeek logs
– Capstone, Donut, Sliver (for shellcode/malware)
– Threat Intel feeds, GitHub, CI/CD pipelines
– Any data stores (log database, artifact storage)

##### Relationships & interactions
- Claude Desktop → MCP CLI/SDK: invoke @mcp.tool() or @mcp.prompt()
- MCP CLI → Individual Python Servers via JSON-RPC (over stdio or HTTP)
- Each Python server → External tools/APIs (e.g., Wazuh API, Capstone disassembler, Zeek logs)
- Inspector UI (if used) sits between Claude and MCP CLI, visualizing calls.

##### Architectural patterns & design principles
- Microservices: each script is an independent tool-server
- Plugin/Connector architecture: new MCP servers can be added without changing core
- RPC-based communication: standard JSON-RPC tool invocation
- Separation of concerns: Recon, Payload gen, Shellcode, SOC analysis each isolated

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% LLM Client Layer
    subgraph "LLM Client Layer"
        Claude["Claude Desktop"]:::ui
        Inspector["Inspector UI (optional)"]:::ui
    end

    %% SDK Layer
    MCP["MCP CLI/SDK"]:::sdk

    %% Tool Servers
    subgraph "Tool Servers"
        Recon["Recon Server\n(mcp_recon_server.py)"]:::service
        Payload["Payload Server\n(mcp_payload_server.py)"]:::service
        Shellcode["Shellcode Builder Server\n(mcp_shellcode_builder_server.py)"]:::service
        Wazuh["Wazuh Server\n(mcp_wazuh_server.py)"]:::service
    end

    %% External Resources
    subgraph "External Resources & Services"
        WazuhAPI["Wazuh API"]:::external
        SuricataZeek["Suricata & Zeek Logs"]:::external
        CapstoneDonutSliver["Capstone, Donut, Sliver"]:::external
        ThreatIntel["Threat Intel Feeds,\nGitHub, CI/CD"]:::external
        DataStores["Log DB & Artifact Storage"]:::external
    end

    %% Connections
    Claude -->|"invokes @mcp.tool()/prompt()"| MCP
    Inspector -.->|"visualizes calls"| MCP
    MCP -->|"JSON-RPC over stdio/HTTP"| Recon
    MCP -->|"JSON-RPC over stdio/HTTP"| Payload
    MCP -->|"JSON-RPC over stdio/HTTP"| Shellcode
    MCP -->|"JSON-RPC over stdio/HTTP"| Wazuh

    Recon -->|"queries logs & intel"| SuricataZeek
    Recon -->|"queries intel feeds"| ThreatIntel
    Payload -->|"stores artifacts"| DataStores
    Payload -->|"fetches intel"| ThreatIntel
    Shellcode -->|"uses disassembler/packer"| CapstoneDonutSliver
    Shellcode -->|"stores builds"| DataStores
    Wazuh -->|"calls API"| WazuhAPI
    Wazuh -->|"writes logs"| DataStores

    %% Click Events
    click Recon "https://github.com/cybersecurityup/offensive-mcp-ai/blob/main/mcp_recon_server.py"
    click Payload "https://github.com/cybersecurityup/offensive-mcp-ai/blob/main/mcp_payload_server.py"
    click Shellcode "https://github.com/cybersecurityup/offensive-mcp-ai/blob/main/mcp_shellcode_builder_server.py"
    click Wazuh "https://github.com/cybersecurityup/offensive-mcp-ai/blob/main/mcp_wazuh_server.py"
    click README "https://github.com/cybersecurityup/offensive-mcp-ai/blob/main/README.md"

    %% Styles
    classDef ui fill:#cce5ff,stroke:#4da3ff,color:#000;
    classDef sdk fill:#d4edda,stroke:#28a745,color:#000;
    classDef service fill:#ffe5b4,stroke:#ff8c00,color:#000;
    classDef external fill:#e2e3e5,stroke:#6c757d,color:#000;
```
