# sandraschi/reversing-mcp architecture

> Architecture diagram of the GitHub repository sandraschi/reversing-mcp, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sandraschi/reversing-mcp
- Repository: https://github.com/sandraschi/reversing-mcp

## Overview

Reversing MCP is an MCP server and companion dashboard for binary and Directmedia analysis, interactive Ghidra/ReVa work, and behavioral CUA exploration. The main workflow is an analyst or agent invoking the server, which dispatches analysis or reversing operations to domain modules and optional external engines, then returns results. The README also documents Gym/ClickerLab correlation, extensions, hardware tools, and a web dashboard. Edges are limited to relationships shown by the README or SOURCE INDEX; unsampled web/backend wiring is not assumed.

Main entry points: [`src/reversing_mcp/server.py`](https://github.com/sandraschi/reversing-mcp/blob/master/src/reversing_mcp/server.py) (MCP Tool Server), [`src/reversing_mcp/analyzers.py`](https://github.com/sandraschi/reversing-mcp/blob/master/src/reversing_mcp/analyzers.py) (Binary Analysis), [`src/reversing_mcp/reva.py`](https://github.com/sandraschi/reversing-mcp/blob/master/src/reversing_mcp/reva.py) (ReVa Lifecycle), [`src/reversing_mcp/engines.py`](https://github.com/sandraschi/reversing-mcp/blob/master/src/reversing_mcp/engines.py) (Engine Wrappers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["User Interfaces"]
  node_mcp["MCP Tool Server<br/>[server.py]"]
  node_dashboard["Web Dashboard<br/>[App.tsx]"]
  node_transport["MCP Transports<br/>[transport.py]"]
  node_desktop["Desktop Shell<br/>[main.rs]"]
  node_nativebackend["Desktop Backend Launcher<br/>[backend.rs]"]
end

subgraph group_analysis["Analysis"]
  node_binary["Binary Analysis<br/>[analyzers.py]"]
  node_enginewrap["Engine Wrappers<br/>[engines.py]"]
  node_directmedia["Directmedia / DKI<br/>[directmedia_dki.py]"]
  node_digibib["Digibib Research"]
end

subgraph group_interactive["Interactive Reversing"]
  node_rea["REA Sidecar<br/>[rea_bridge.py]"]
  node_reva["ReVa Lifecycle<br/>[reva.py]"]
  node_ghidra["Ghidra Bridge<br/>[ghidra_bridge.py]"]
  node_extensions["Ghidra Extensions"]
end

subgraph group_operations["Operations and Domains"]
  node_dependency["Dependency Checks<br/>[dependencies.py]"]
  node_gym["Gym Runs<br/>[gym.py]"]
  node_clicker["ClickerLab<br/>[clickerlab.py]"]
  node_hardware["Hercules MK1 Tools<br/>[hercules_mk1.py]"]
  node_toolbox["Toolbox Discovery<br/>[toolbox.py]"]
  node_logging["Logging<br/>[logging_config.py]"]
end

node_analyst(("Analyst / Agent"))

node_analyst -->|"invokes tools"| node_mcp
node_mcp -->|"serves through"| node_transport
node_mcp -->|"dispatches analysis"| node_binary
node_mcp -->|"dispatches engines"| node_enginewrap
node_mcp -->|"delegates investigations"| node_rea
node_mcp -->|"routes lifecycle"| node_reva
node_mcp -->|"forwards Ghidra work"| node_ghidra
node_mcp -->|"dispatches extension tools"| node_extensions
node_mcp -->|"dispatches runs"| node_gym
node_mcp -->|"dispatches CUA tools"| node_clicker
node_mcp -->|"dispatches DKI tools"| node_directmedia
node_mcp -->|"dispatches research"| node_digibib
node_mcp -->|"dispatches hardware tools"| node_hardware
node_mcp -->|"dispatches toolbox"| node_toolbox
node_binary -->|"uses optional engines"| node_enginewrap
node_digibib -->|"uses binary analysis"| node_binary
node_clicker -->|"correlates run data"| node_gym
node_reva -->|"manages bridge"| node_ghidra
node_toolbox -->|"probes engines"| node_enginewrap
node_dependency -->|"checks availability"| node_reva
node_dependency -->|"checks availability"| node_rea
node_dashboard -.->|"uses backend services"| node_mcp
node_desktop -->|"spawns backend"| node_nativebackend

click node_mcp "https://github.com/sandraschi/reversing-mcp/blob/master/src/reversing_mcp/server.py"
click node_dashboard "https://github.com/sandraschi/reversing-mcp/blob/master/web_sota/src/App.tsx"
click node_transport "https://github.com/sandraschi/reversing-mcp/blob/master/src/reversing_mcp/transport.py"
click node_binary "https://github.com/sandraschi/reversing-mcp/blob/master/src/reversing_mcp/analyzers.py"
click node_enginewrap "https://github.com/sandraschi/reversing-mcp/blob/master/src/reversing_mcp/engines.py"
click node_dependency "https://github.com/sandraschi/reversing-mcp/blob/master/src/reversing_mcp/dependencies.py"
click node_rea "https://github.com/sandraschi/reversing-mcp/blob/master/src/reversing_mcp/rea_bridge.py"
click node_reva "https://github.com/sandraschi/reversing-mcp/blob/master/src/reversing_mcp/reva.py"
click node_ghidra "https://github.com/sandraschi/reversing-mcp/blob/master/src/reversing_mcp/ghidra_bridge.py"
click node_extensions "https://github.com/sandraschi/reversing-mcp/blob/master/src/reversing_mcp/ghidra_extensions.py"
click node_gym "https://github.com/sandraschi/reversing-mcp/blob/master/src/reversing_mcp/gym.py"
click node_clicker "https://github.com/sandraschi/reversing-mcp/blob/master/src/reversing_mcp/clickerlab.py"
click node_directmedia "https://github.com/sandraschi/reversing-mcp/blob/master/src/reversing_mcp/directmedia_dki.py"
click node_digibib "https://github.com/sandraschi/reversing-mcp/blob/master/src/reversing_mcp/digibib_research.py"
click node_hardware "https://github.com/sandraschi/reversing-mcp/blob/master/src/reversing_mcp/hardware/hercules_mk1.py"
click node_toolbox "https://github.com/sandraschi/reversing-mcp/blob/master/src/reversing_mcp/toolbox.py"
click node_logging "https://github.com/sandraschi/reversing-mcp/blob/master/src/reversing_mcp/logging_config.py"
click node_desktop "https://github.com/sandraschi/reversing-mcp/blob/master/native/src/main.rs"
click node_nativebackend "https://github.com/sandraschi/reversing-mcp/blob/master/native/src/backend.rs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_mcp,node_dashboard,node_transport,node_desktop,node_nativebackend toneBlue
class node_binary,node_enginewrap,node_directmedia,node_digibib toneAmber
class node_rea,node_reva,node_ghidra,node_extensions toneMint
class node_dependency,node_gym,node_clicker,node_hardware,node_toolbox,node_logging toneRose
class node_analyst toneIndigo
```

## Components

### User Interfaces

- [MCP Tool Server](https://github.com/sandraschi/reversing-mcp/blob/master/src/reversing_mcp/server.py): `src/reversing_mcp/server.py`
- [Web Dashboard](https://github.com/sandraschi/reversing-mcp/blob/master/web_sota/src/App.tsx): `web_sota/src/App.tsx`
- [MCP Transports](https://github.com/sandraschi/reversing-mcp/blob/master/src/reversing_mcp/transport.py): `src/reversing_mcp/transport.py`
- [Desktop Shell](https://github.com/sandraschi/reversing-mcp/blob/master/native/src/main.rs): `native/src/main.rs`
- [Desktop Backend Launcher](https://github.com/sandraschi/reversing-mcp/blob/master/native/src/backend.rs): `native/src/backend.rs`

### Analysis

- [Binary Analysis](https://github.com/sandraschi/reversing-mcp/blob/master/src/reversing_mcp/analyzers.py): `src/reversing_mcp/analyzers.py`
- [Engine Wrappers](https://github.com/sandraschi/reversing-mcp/blob/master/src/reversing_mcp/engines.py): `src/reversing_mcp/engines.py`
- [Directmedia / DKI](https://github.com/sandraschi/reversing-mcp/blob/master/src/reversing_mcp/directmedia_dki.py): `src/reversing_mcp/directmedia_dki.py`
- [Digibib Research](https://github.com/sandraschi/reversing-mcp/blob/master/src/reversing_mcp/digibib_research.py): `src/reversing_mcp/digibib_research.py`

### Interactive Reversing

- [REA Sidecar](https://github.com/sandraschi/reversing-mcp/blob/master/src/reversing_mcp/rea_bridge.py): `src/reversing_mcp/rea_bridge.py`
- [ReVa Lifecycle](https://github.com/sandraschi/reversing-mcp/blob/master/src/reversing_mcp/reva.py): `src/reversing_mcp/reva.py`
- [Ghidra Bridge](https://github.com/sandraschi/reversing-mcp/blob/master/src/reversing_mcp/ghidra_bridge.py): `src/reversing_mcp/ghidra_bridge.py`
- [Ghidra Extensions](https://github.com/sandraschi/reversing-mcp/blob/master/src/reversing_mcp/ghidra_extensions.py): `src/reversing_mcp/ghidra_extensions.py`

### Operations and Domains

- [Dependency Checks](https://github.com/sandraschi/reversing-mcp/blob/master/src/reversing_mcp/dependencies.py): `src/reversing_mcp/dependencies.py`
- [Gym Runs](https://github.com/sandraschi/reversing-mcp/blob/master/src/reversing_mcp/gym.py): `src/reversing_mcp/gym.py`
- [ClickerLab](https://github.com/sandraschi/reversing-mcp/blob/master/src/reversing_mcp/clickerlab.py): `src/reversing_mcp/clickerlab.py`
- [Hercules MK1 Tools](https://github.com/sandraschi/reversing-mcp/blob/master/src/reversing_mcp/hardware/hercules_mk1.py): `src/reversing_mcp/hardware/hercules_mk1.py`
- [Toolbox Discovery](https://github.com/sandraschi/reversing-mcp/blob/master/src/reversing_mcp/toolbox.py): `src/reversing_mcp/toolbox.py`
- [Logging](https://github.com/sandraschi/reversing-mcp/blob/master/src/reversing_mcp/logging_config.py): `src/reversing_mcp/logging_config.py`

### Other components

- **Analyst / Agent**

## Connections

- Analyst / Agent → MCP Tool Server: invokes tools (evidence: `README.md`)
- MCP Tool Server → MCP Transports: serves through (evidence: `src/reversing_mcp/server.py`)
- MCP Tool Server → Binary Analysis: dispatches analysis (evidence: `src/reversing_mcp/server.py`)
- MCP Tool Server → Engine Wrappers: dispatches engines (evidence: `src/reversing_mcp/server.py`)
- MCP Tool Server → REA Sidecar: delegates investigations (evidence: `src/reversing_mcp/server.py`)
- MCP Tool Server → ReVa Lifecycle: routes lifecycle (evidence: `src/reversing_mcp/server.py`)
- MCP Tool Server → Ghidra Bridge: forwards Ghidra work (evidence: `src/reversing_mcp/server.py`)
- MCP Tool Server → Ghidra Extensions: dispatches extension tools (evidence: `src/reversing_mcp/server.py`)
- MCP Tool Server → Gym Runs: dispatches runs (evidence: `src/reversing_mcp/server.py`)
- MCP Tool Server → ClickerLab: dispatches CUA tools (evidence: `src/reversing_mcp/server.py`)
- MCP Tool Server → Directmedia / DKI: dispatches DKI tools (evidence: `src/reversing_mcp/server.py`)
- MCP Tool Server → Digibib Research: dispatches research (evidence: `src/reversing_mcp/server.py`)
- MCP Tool Server → Hercules MK1 Tools: dispatches hardware tools (evidence: `src/reversing_mcp/server.py`)
- MCP Tool Server → Toolbox Discovery: dispatches toolbox (evidence: `src/reversing_mcp/server.py`)
- Binary Analysis → Engine Wrappers: uses optional engines (evidence: `src/reversing_mcp/analyzers.py`)
- Digibib Research → Binary Analysis: uses binary analysis (evidence: `src/reversing_mcp/digibib_research.py`)
- ClickerLab → Gym Runs: correlates run data (evidence: `src/reversing_mcp/clickerlab.py`)
- ReVa Lifecycle → Ghidra Bridge: manages bridge (evidence: `src/reversing_mcp/ghidra_bridge.py`)
- Toolbox Discovery → Engine Wrappers: probes engines (evidence: `src/reversing_mcp/toolbox.py`)
- Dependency Checks → ReVa Lifecycle: checks availability (evidence: `src/reversing_mcp/dependencies.py`)
- Dependency Checks → REA Sidecar: checks availability (evidence: `src/reversing_mcp/dependencies.py`)
- Web Dashboard → MCP Tool Server: uses backend services
- Desktop Shell → Desktop Backend Launcher: spawns backend (evidence: `native/src/main.rs`)
