# devoe09/unrealmcp architecture

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

- Interactive diagram: https://gitdiagram.com/devoe09/unrealmcp
- Repository: https://github.com/devoe09/unrealmcp

## Overview

UnrealMCP is an Unreal Editor plugin that exposes editor operations to MCP-compatible clients over TCP. A request is accepted and parsed by the server, queued for game-thread execution, dispatched to a command handler, and answered to the client. The graph preserves documented command domains and the toolbar indicator. Several domains are grouped because their handlers share one implementation file; their individual call details were not sampled, so those dispatch links are documented at the architecture level rather than inferred from imports.

Main entry points: [`Source/UnrealMCP/Private/MCPTCPServer.cpp`](https://github.com/devoe09/unrealmcp/blob/main/Source/UnrealMCP/Private/MCPTCPServer.cpp) (Game-thread queue), [`Source/UnrealMCP/Private/UnrealMCPModule.cpp`](https://github.com/devoe09/unrealmcp/blob/main/Source/UnrealMCP/Private/UnrealMCPModule.cpp) (Plugin module), [`Source/UnrealMCP/Private/MCPStatusWidget.cpp`](https://github.com/devoe09/unrealmcp/blob/main/Source/UnrealMCP/Private/MCPStatusWidget.cpp) (Toolbar status widget)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_lifecycle["Plugin lifecycle"]
  node_module["Plugin module"]
end

subgraph group_transport["TCP and protocol"]
  node_server["TCP server<br/>[MCPTCPServer.cpp]"]
  node_protocol["Protocol parsing<br/>[MCPTCPServer.cpp]"]
  node_gamequeue["Game-thread queue<br/>[MCPTCPServer.cpp]"]
end

subgraph group_editor["Editor commands"]
  node_corecmd["Core commands<br/>[MCPTCPServer.cpp]"]
  node_world["World and levels<br/>[MCPTCPServer.cpp]"]
  node_actors["Actor operations<br/>[MCPTCPServer.cpp]"]
  node_properties["Property system<br/>[MCPTCPServer.cpp]"]
  node_folders["Outliner folders<br/>[MCPTCPServer.cpp]"]
  node_assets["Assets and content<br/>[MCPTCPServer.cpp]"]
  node_blueprints["Blueprint editing<br/>[MCPTCPServer.cpp]"]
  node_materials["Material editing<br/>[MCPTCPServer.cpp]"]
  node_widgets["UMG editing<br/>[MCPTCPServer.cpp]"]
  node_ai["AI authoring<br/>[MCPTCPServer.cpp]"]
  node_viewport["Viewport tools<br/>[MCPTCPServer.cpp]"]
  node_python["Python execution<br/>[MCPTCPServer.cpp]"]
end

subgraph group_interface["Editor interface"]
  node_statuswidget["Toolbar status widget"]
end

node_client(("MCP client"))
node_unreal["Unreal Editor"]

node_client -->|"sends TCP"| node_server
node_server -->|"parses requests"| node_protocol
node_protocol -->|"enqueues commands"| node_gamequeue
node_gamequeue -->|"dispatches"| node_corecmd
node_gamequeue -->|"dispatches"| node_world
node_gamequeue -->|"dispatches"| node_actors
node_gamequeue -->|"dispatches"| node_properties
node_gamequeue -->|"dispatches"| node_folders
node_gamequeue -->|"dispatches"| node_assets
node_gamequeue -->|"dispatches"| node_blueprints
node_gamequeue -->|"dispatches"| node_materials
node_gamequeue -->|"dispatches"| node_widgets
node_gamequeue -->|"dispatches"| node_ai
node_gamequeue -->|"dispatches"| node_viewport
node_gamequeue -->|"dispatches"| node_python
node_corecmd -->|"controls editor"| node_unreal
node_world -->|"manages levels"| node_unreal
node_actors -->|"edits actors"| node_unreal
node_properties -->|"reads and writes"| node_unreal
node_folders -->|"organizes actors"| node_unreal
node_assets -->|"manages assets"| node_unreal
node_blueprints -->|"edits graphs"| node_unreal
node_materials -->|"edits materials"| node_unreal
node_widgets -->|"edits UMG"| node_unreal
node_ai -->|"authors AI"| node_unreal
node_viewport -->|"controls viewport"| node_unreal
node_python -->|"executes Python"| node_unreal
node_module -->|"starts server"| node_server
node_module -->|"registers widget"| node_statuswidget
node_statuswidget -->|"reads status"| node_server

click node_module "https://github.com/devoe09/unrealmcp/blob/main/Source/UnrealMCP/Private/UnrealMCPModule.cpp"
click node_server "https://github.com/devoe09/unrealmcp/blob/main/Source/UnrealMCP/Private/MCPTCPServer.cpp"
click node_protocol "https://github.com/devoe09/unrealmcp/blob/main/Source/UnrealMCP/Private/MCPTCPServer.cpp"
click node_gamequeue "https://github.com/devoe09/unrealmcp/blob/main/Source/UnrealMCP/Private/MCPTCPServer.cpp"
click node_corecmd "https://github.com/devoe09/unrealmcp/blob/main/Source/UnrealMCP/Private/MCPTCPServer.cpp"
click node_world "https://github.com/devoe09/unrealmcp/blob/main/Source/UnrealMCP/Private/MCPTCPServer.cpp"
click node_actors "https://github.com/devoe09/unrealmcp/blob/main/Source/UnrealMCP/Private/MCPTCPServer.cpp"
click node_properties "https://github.com/devoe09/unrealmcp/blob/main/Source/UnrealMCP/Private/MCPTCPServer.cpp"
click node_folders "https://github.com/devoe09/unrealmcp/blob/main/Source/UnrealMCP/Private/MCPTCPServer.cpp"
click node_assets "https://github.com/devoe09/unrealmcp/blob/main/Source/UnrealMCP/Private/MCPTCPServer.cpp"
click node_blueprints "https://github.com/devoe09/unrealmcp/blob/main/Source/UnrealMCP/Private/MCPTCPServer.cpp"
click node_materials "https://github.com/devoe09/unrealmcp/blob/main/Source/UnrealMCP/Private/MCPTCPServer.cpp"
click node_widgets "https://github.com/devoe09/unrealmcp/blob/main/Source/UnrealMCP/Private/MCPTCPServer.cpp"
click node_ai "https://github.com/devoe09/unrealmcp/blob/main/Source/UnrealMCP/Private/MCPTCPServer.cpp"
click node_viewport "https://github.com/devoe09/unrealmcp/blob/main/Source/UnrealMCP/Private/MCPTCPServer.cpp"
click node_python "https://github.com/devoe09/unrealmcp/blob/main/Source/UnrealMCP/Private/MCPTCPServer.cpp"
click node_statuswidget "https://github.com/devoe09/unrealmcp/blob/main/Source/UnrealMCP/Private/MCPStatusWidget.cpp"

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_module,node_client toneBlue
class node_server,node_protocol,node_gamequeue toneAmber
class node_corecmd,node_world,node_actors,node_properties,node_folders,node_assets,node_blueprints,node_materials,node_widgets,node_ai,node_viewport,node_python toneMint
class node_statuswidget toneRose
class node_unreal toneIndigo
```

## Components

### Plugin lifecycle

- [Plugin module](https://github.com/devoe09/unrealmcp/blob/main/Source/UnrealMCP/Private/UnrealMCPModule.cpp): `Source/UnrealMCP/Private/UnrealMCPModule.cpp`

### TCP and protocol

- [TCP server](https://github.com/devoe09/unrealmcp/blob/main/Source/UnrealMCP/Private/MCPTCPServer.cpp): `Source/UnrealMCP/Private/MCPTCPServer.cpp`
- [Protocol parsing](https://github.com/devoe09/unrealmcp/blob/main/Source/UnrealMCP/Private/MCPTCPServer.cpp): `Source/UnrealMCP/Private/MCPTCPServer.cpp`
- [Game-thread queue](https://github.com/devoe09/unrealmcp/blob/main/Source/UnrealMCP/Private/MCPTCPServer.cpp): `Source/UnrealMCP/Private/MCPTCPServer.cpp`

### Editor commands

- [Core commands](https://github.com/devoe09/unrealmcp/blob/main/Source/UnrealMCP/Private/MCPTCPServer.cpp): `Source/UnrealMCP/Private/MCPTCPServer.cpp`
- [World and levels](https://github.com/devoe09/unrealmcp/blob/main/Source/UnrealMCP/Private/MCPTCPServer.cpp): `Source/UnrealMCP/Private/MCPTCPServer.cpp`
- [Actor operations](https://github.com/devoe09/unrealmcp/blob/main/Source/UnrealMCP/Private/MCPTCPServer.cpp): `Source/UnrealMCP/Private/MCPTCPServer.cpp`
- [Property system](https://github.com/devoe09/unrealmcp/blob/main/Source/UnrealMCP/Private/MCPTCPServer.cpp): `Source/UnrealMCP/Private/MCPTCPServer.cpp`
- [Outliner folders](https://github.com/devoe09/unrealmcp/blob/main/Source/UnrealMCP/Private/MCPTCPServer.cpp): `Source/UnrealMCP/Private/MCPTCPServer.cpp`
- [Assets and content](https://github.com/devoe09/unrealmcp/blob/main/Source/UnrealMCP/Private/MCPTCPServer.cpp): `Source/UnrealMCP/Private/MCPTCPServer.cpp`
- [Blueprint editing](https://github.com/devoe09/unrealmcp/blob/main/Source/UnrealMCP/Private/MCPTCPServer.cpp): `Source/UnrealMCP/Private/MCPTCPServer.cpp`
- [Material editing](https://github.com/devoe09/unrealmcp/blob/main/Source/UnrealMCP/Private/MCPTCPServer.cpp): `Source/UnrealMCP/Private/MCPTCPServer.cpp`
- [UMG editing](https://github.com/devoe09/unrealmcp/blob/main/Source/UnrealMCP/Private/MCPTCPServer.cpp): `Source/UnrealMCP/Private/MCPTCPServer.cpp`
- [AI authoring](https://github.com/devoe09/unrealmcp/blob/main/Source/UnrealMCP/Private/MCPTCPServer.cpp): `Source/UnrealMCP/Private/MCPTCPServer.cpp`
- [Viewport tools](https://github.com/devoe09/unrealmcp/blob/main/Source/UnrealMCP/Private/MCPTCPServer.cpp): `Source/UnrealMCP/Private/MCPTCPServer.cpp`
- [Python execution](https://github.com/devoe09/unrealmcp/blob/main/Source/UnrealMCP/Private/MCPTCPServer.cpp): `Source/UnrealMCP/Private/MCPTCPServer.cpp`

### Editor interface

- [Toolbar status widget](https://github.com/devoe09/unrealmcp/blob/main/Source/UnrealMCP/Private/MCPStatusWidget.cpp): `Source/UnrealMCP/Private/MCPStatusWidget.cpp`

### Other components

- **MCP client**
- **Unreal Editor**

## Connections

- MCP client → TCP server: sends TCP (evidence: `README.md`)
- TCP server → Protocol parsing: parses requests (evidence: `README.md`)
- Protocol parsing → Game-thread queue: enqueues commands (evidence: `README.md`)
- Game-thread queue → Core commands: dispatches (evidence: `README.md`)
- Game-thread queue → World and levels: dispatches (evidence: `README.md`)
- Game-thread queue → Actor operations: dispatches (evidence: `README.md`)
- Game-thread queue → Property system: dispatches (evidence: `README.md`)
- Game-thread queue → Outliner folders: dispatches (evidence: `README.md`)
- Game-thread queue → Assets and content: dispatches (evidence: `README.md`)
- Game-thread queue → Blueprint editing: dispatches (evidence: `README.md`)
- Game-thread queue → Material editing: dispatches (evidence: `README.md`)
- Game-thread queue → UMG editing: dispatches (evidence: `README.md`)
- Game-thread queue → AI authoring: dispatches (evidence: `README.md`)
- Game-thread queue → Viewport tools: dispatches (evidence: `README.md`)
- Game-thread queue → Python execution: dispatches (evidence: `README.md`)
- Core commands → Unreal Editor: controls editor (evidence: `README.md`)
- World and levels → Unreal Editor: manages levels (evidence: `README.md`)
- Actor operations → Unreal Editor: edits actors (evidence: `README.md`)
- Property system → Unreal Editor: reads and writes (evidence: `README.md`)
- Outliner folders → Unreal Editor: organizes actors (evidence: `README.md`)
- Assets and content → Unreal Editor: manages assets (evidence: `README.md`)
- Blueprint editing → Unreal Editor: edits graphs (evidence: `README.md`)
- Material editing → Unreal Editor: edits materials (evidence: `README.md`)
- UMG editing → Unreal Editor: edits UMG (evidence: `README.md`)
- AI authoring → Unreal Editor: authors AI (evidence: `README.md`)
- Viewport tools → Unreal Editor: controls viewport (evidence: `README.md`)
- Python execution → Unreal Editor: executes Python (evidence: `Source/UnrealMCP/Private/MCPTCPServer.cpp`)
- Plugin module → TCP server: starts server (evidence: `Source/UnrealMCP/Private/UnrealMCPModule.cpp`)
- Plugin module → Toolbar status widget: registers widget (evidence: `Source/UnrealMCP/Private/UnrealMCPModule.cpp`)
- Toolbar status widget → TCP server: reads status (evidence: `Source/UnrealMCP/Private/MCPStatusWidget.cpp`)
