unreal-engine-mcp-server 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/.env.example +1 -1
  2. package/.github/release-drafter-config.yml +51 -0
  3. package/.github/workflows/greetings.yml +5 -1
  4. package/.github/workflows/labeler.yml +2 -1
  5. package/.github/workflows/publish-mcp.yml +1 -0
  6. package/.github/workflows/release-drafter.yml +1 -1
  7. package/.github/workflows/release.yml +3 -3
  8. package/CHANGELOG.md +71 -0
  9. package/CONTRIBUTING.md +1 -1
  10. package/GEMINI.md +115 -0
  11. package/Public/Plugin_setup_guide.mp4 +0 -0
  12. package/README.md +166 -200
  13. package/dist/config.d.ts +0 -1
  14. package/dist/config.js +0 -1
  15. package/dist/constants.d.ts +4 -0
  16. package/dist/constants.js +4 -0
  17. package/dist/graphql/loaders.d.ts +64 -0
  18. package/dist/graphql/loaders.js +117 -0
  19. package/dist/graphql/resolvers.d.ts +3 -3
  20. package/dist/graphql/resolvers.js +33 -30
  21. package/dist/graphql/server.js +3 -1
  22. package/dist/graphql/types.d.ts +2 -0
  23. package/dist/index.d.ts +2 -0
  24. package/dist/index.js +13 -2
  25. package/dist/server-setup.d.ts +0 -1
  26. package/dist/server-setup.js +0 -40
  27. package/dist/tools/actors.d.ts +40 -24
  28. package/dist/tools/actors.js +8 -2
  29. package/dist/tools/assets.d.ts +19 -71
  30. package/dist/tools/assets.js +28 -22
  31. package/dist/tools/base-tool.d.ts +4 -4
  32. package/dist/tools/base-tool.js +1 -1
  33. package/dist/tools/blueprint.d.ts +33 -61
  34. package/dist/tools/consolidated-tool-handlers.js +96 -110
  35. package/dist/tools/dynamic-handler-registry.d.ts +11 -9
  36. package/dist/tools/dynamic-handler-registry.js +17 -95
  37. package/dist/tools/editor.d.ts +19 -193
  38. package/dist/tools/editor.js +8 -0
  39. package/dist/tools/environment.d.ts +8 -14
  40. package/dist/tools/foliage.d.ts +18 -143
  41. package/dist/tools/foliage.js +4 -2
  42. package/dist/tools/handlers/actor-handlers.js +0 -5
  43. package/dist/tools/handlers/asset-handlers.js +454 -454
  44. package/dist/tools/landscape.d.ts +16 -116
  45. package/dist/tools/landscape.js +7 -3
  46. package/dist/tools/level.d.ts +22 -103
  47. package/dist/tools/level.js +24 -16
  48. package/dist/tools/lighting.js +5 -1
  49. package/dist/tools/materials.js +5 -1
  50. package/dist/tools/niagara.js +37 -2
  51. package/dist/tools/performance.d.ts +0 -1
  52. package/dist/tools/performance.js +0 -1
  53. package/dist/tools/physics.js +5 -1
  54. package/dist/tools/sequence.d.ts +24 -24
  55. package/dist/tools/sequence.js +13 -0
  56. package/dist/tools/ui.d.ts +0 -2
  57. package/dist/types/automation-responses.d.ts +115 -0
  58. package/dist/types/automation-responses.js +2 -0
  59. package/dist/types/responses.d.ts +249 -0
  60. package/dist/types/responses.js +2 -0
  61. package/dist/types/tool-interfaces.d.ts +135 -135
  62. package/dist/utils/command-validator.js +3 -2
  63. package/dist/utils/path-security.d.ts +2 -0
  64. package/dist/utils/path-security.js +24 -0
  65. package/dist/utils/response-factory.d.ts +4 -4
  66. package/dist/utils/response-factory.js +15 -21
  67. package/docs/Migration-Guide-v0.5.0.md +1 -9
  68. package/docs/testing-guide.md +2 -2
  69. package/package.json +12 -6
  70. package/scripts/run-all-tests.mjs +25 -20
  71. package/server.json +3 -2
  72. package/src/config.ts +1 -1
  73. package/src/constants.ts +7 -0
  74. package/src/graphql/loaders.ts +244 -0
  75. package/src/graphql/resolvers.ts +47 -49
  76. package/src/graphql/server.ts +3 -1
  77. package/src/graphql/types.ts +3 -0
  78. package/src/index.ts +15 -2
  79. package/src/resources/assets.ts +5 -4
  80. package/src/server-setup.ts +3 -37
  81. package/src/tools/actors.ts +36 -28
  82. package/src/tools/animation.ts +1 -0
  83. package/src/tools/assets.ts +74 -63
  84. package/src/tools/base-tool.ts +3 -3
  85. package/src/tools/blueprint.ts +59 -59
  86. package/src/tools/consolidated-tool-handlers.ts +129 -150
  87. package/src/tools/dynamic-handler-registry.ts +22 -140
  88. package/src/tools/editor.ts +39 -26
  89. package/src/tools/environment.ts +21 -27
  90. package/src/tools/foliage.ts +28 -25
  91. package/src/tools/handlers/actor-handlers.ts +2 -8
  92. package/src/tools/handlers/asset-handlers.ts +484 -484
  93. package/src/tools/handlers/sequence-handlers.ts +1 -1
  94. package/src/tools/landscape.ts +34 -28
  95. package/src/tools/level.ts +96 -76
  96. package/src/tools/lighting.ts +6 -1
  97. package/src/tools/materials.ts +8 -2
  98. package/src/tools/niagara.ts +44 -2
  99. package/src/tools/performance.ts +1 -2
  100. package/src/tools/physics.ts +7 -1
  101. package/src/tools/sequence.ts +41 -25
  102. package/src/tools/ui.ts +0 -2
  103. package/src/types/automation-responses.ts +119 -0
  104. package/src/types/responses.ts +355 -0
  105. package/src/types/tool-interfaces.ts +135 -135
  106. package/src/utils/command-validator.ts +3 -2
  107. package/src/utils/normalize.test.ts +162 -0
  108. package/src/utils/path-security.ts +43 -0
  109. package/src/utils/response-factory.ts +29 -24
  110. package/src/utils/safe-json.test.ts +90 -0
  111. package/src/utils/validation.test.ts +184 -0
  112. package/tests/test-animation.mjs +358 -33
  113. package/tests/test-asset-graph.mjs +311 -0
  114. package/tests/test-audio.mjs +314 -116
  115. package/tests/test-behavior-tree.mjs +327 -144
  116. package/tests/test-blueprint-graph.mjs +343 -12
  117. package/tests/test-control-editor.mjs +85 -53
  118. package/tests/test-graphql.mjs +58 -8
  119. package/tests/test-input.mjs +349 -0
  120. package/tests/test-inspect.mjs +291 -61
  121. package/tests/test-landscape.mjs +304 -48
  122. package/tests/test-lighting.mjs +428 -0
  123. package/tests/test-manage-level.mjs +70 -51
  124. package/tests/test-performance.mjs +539 -0
  125. package/tests/test-sequence.mjs +82 -46
  126. package/tests/test-system.mjs +72 -33
  127. package/tests/test-wasm.mjs +98 -8
  128. package/vitest.config.ts +35 -0
  129. package/.github/release-drafter.yml +0 -148
  130. package/dist/prompts/index.d.ts +0 -21
  131. package/dist/prompts/index.js +0 -217
  132. package/dist/tools/blueprint/helpers.d.ts +0 -29
  133. package/dist/tools/blueprint/helpers.js +0 -182
  134. package/src/prompts/index.ts +0 -249
  135. package/src/tools/blueprint/helpers.ts +0 -189
  136. package/tests/test-blueprint-events.mjs +0 -35
  137. package/tests/test-extra-tools.mjs +0 -38
  138. package/tests/test-render.mjs +0 -33
  139. package/tests/test-search-assets.mjs +0 -66
package/README.md CHANGED
@@ -6,161 +6,119 @@
6
6
  [![Unreal Engine](https://img.shields.io/badge/Unreal%20Engine-5.0--5.7-orange)](https://www.unrealengine.com/)
7
7
  [![MCP Registry](https://img.shields.io/badge/MCP%20Registry-Published-green)](https://registry.modelcontextprotocol.io/)
8
8
 
9
- A comprehensive Model Context Protocol (MCP) server that enables AI assistants to control Unreal Engine through the native C++ Automation Bridge plugin. Built with TypeScript, C++, and Rust (WebAssembly) for ultra-high-performance game development automation.
9
+ A comprehensive Model Context Protocol (MCP) server that enables AI assistants to control Unreal Engine through a native C++ Automation Bridge plugin. Built with TypeScript, C++, and Rust (WebAssembly).
10
10
 
11
- ## Features
11
+ ---
12
12
 
13
- ### Core Capabilities
14
- - **Asset Management** - Browse, import, and create materials
15
- - **Actor Control** - Spawn, delete, and manipulate actors with physics
16
- - **Editor Control** - PIE sessions, camera, and viewport management
17
- - **Level Management** - Load/save levels, lighting, and environment building
18
- - **Animation & Physics** - Blueprints, state machines, ragdolls, constraints, vehicle setup
19
- - **Visual Effects** - Niagara particles, GPU simulations, procedural effects
20
- - **Sequencer** - Cinematics, camera animations, and timeline control
21
- - **Graph Editing** - Blueprint, Niagara, Material, and Behavior Tree graph manipulation
22
- - **World Partition** - Load cells, manage data layers
23
- - **Render Management** - Render targets, Nanite, Lumen
24
- - **Pipeline & Testing** - Run UBT, automated tests
25
- - **Observability** - Log streaming, gameplay debugger, insights, asset queries
26
- - **Console Commands** - Safe execution with dangerous command filtering
27
- - **GraphQL API** - Flexible data querying for assets, actors, and blueprints
28
-
29
- ### High-Performance WebAssembly
30
- - **5-8x faster JSON parsing** - WASM-accelerated property parsing
31
- - **5-10x faster transform math** - Optimized 3D vector/matrix operations
32
- - **3-5x faster dependency resolution** - Rapid asset graph traversal
33
- - **Automatic fallbacks** - Works perfectly without WASM binary
34
- - **Performance monitoring** - Built-in metrics tracking
35
-
36
- ## Quick Start
13
+ ## Table of Contents
37
14
 
38
- ### Prerequisites
39
- - Node.js 18+
40
- - Unreal Engine 5.0-5.7
41
- - Required UE Plugins (enable via **Edit ▸ Plugins**):
42
- - **MCP Automation Bridge** – Native C++ WebSocket automation transport (ships inside `plugins/McpAutomationBridge`)
43
- - **Editor Scripting Utilities** – Unlocks Editor Actor/Asset subsystems for native tool operations
44
- - **Sequencer** *(built-in)* – Keep enabled for cinematic tools
45
- - **Level Sequence Editor** – Required for `manage_sequence` operations
46
- - **Control Rig** – Required for animation and physics tools
47
- - **Subobject Data Interface** – Required for Blueprint component manipulation (UE 5.7+)
48
-
49
- > 💡 After toggling any plugin, restart the editor to finalize activation. The MCP Automation Bridge provides all automation capabilities through native C++ handlers.
50
-
51
- ### Plugin feature map
52
-
53
- | Plugin | Location | Used By | Notes |
54
- |--------|----------|---------|-------|
55
- | MCP Automation Bridge | Project Plugins ▸ MCP Automation Bridge | All automation operations | Primary C++ automation transport with native handlers |
56
- | Editor Scripting Utilities | Scripting | Asset/Actor subsystem operations | Supplies Editor Actor/Asset subsystems |
57
- | Sequencer | Built-in | Sequencer tools | Ensure not disabled in project settings |
58
- | Level Sequence Editor | Animation | Sequencer tools | Required for `manage_sequence` operations |
59
- | Control Rig | Animation | Animation/Physics tools | Required for `animation_physics` operations |
60
- | Subobject Data Interface | Scripting | Blueprint tools | Required for `manage_blueprint` component operations (UE 5.7+) |
61
-
62
- > Tools such as `physics.configureVehicle` accept an optional `pluginDependencies` array so you can list the specific Unreal plugins your project relies on (for example, Chaos Vehicles or third-party vehicle frameworks). When provided, the server will verify those plugins are active before running the configuration.
63
-
64
- ### MCP Automation Bridge plugin
65
- - Location: `plugins/McpAutomationBridge`
66
- - Installation: copy the folder into your project's `Plugins/` directory and regenerate project files.
67
- - Sync helper: run `npm run automation:sync -- --engine "X:/Unreal_Engine/UE_5.6/Engine/Plugins" --project "X:/Newfolder(2)/Game/Unreal/Trial/Plugins" --clean-engine --clean-project` after repo updates to copy the latest bridge build into both plugin folders and strip legacy entries (such as `SupportedTargetPlatforms: ["Editor"]`) that trigger startup warnings.
68
- - Verification: run `node scripts/verify-automation-bridge.js --project "C:/Path/To/YourProject/Plugins" --config "C:/Path/To/YourProject/Config/DefaultEngine.ini"` to confirm the plugin files and automation bridge environment variables are in place before launching Unreal.
69
- - Configuration: enable **MCP Automation Bridge** in **Edit ▸ Plugins**, restart the editor, then set the endpoint/token under **Edit ▸ Project Settings ▸ Plugins ▸ MCP Automation Bridge**. The bridge ships with its own lightweight WebSocket client, so you no longer need the engine's WebSockets plugin enabled.
70
- - Startup: after configuration, the Output Log should show a successful connection and the `bridge_started` broadcast; `SendRawMessage` becomes available to Blueprint and C++ callers for manual testing.
71
- - Current scope: manages a WebSocket session to the Node MCP server (`ws://127.0.0.1:8091` by default), performs optional capability-token handshakes, dispatches inbound JSON to native C++ handlers, implements reconnect backoff, and responds to editor functions, property operations, blueprint actions, and more through native implementations.
72
- - Usage: all consolidated tools use the automation bridge for native C++ execution. Keep the plugin enabled for all workflows.
73
- - Diagnostics: the `ue://automation-bridge` MCP resource surfaces handshake timestamps, recent disconnects, pending automation requests, and whether the Node listener is running—handy when validating editor connectivity from a client.
74
- - Roadmap: expand the bridge with elevated actions (SCS authoring, typed property marshaling, modal mediation, asset workflows).
75
-
76
- ### WebAssembly Performance (Optional)
77
-
78
- The MCP server includes WebAssembly acceleration for computationally intensive operations. WASM is **automatically used when available** and **gracefully falls back** to pure TypeScript when the bundle or toolchain is missing.
79
-
80
- **To enable full WASM acceleration (5–8x faster operations):**
15
+ - [Features](#features)
16
+ - [Getting Started](#getting-started)
17
+ - [Configuration](#configuration)
18
+ - [Available Tools](#available-tools)
19
+ - [WebAssembly Acceleration](#webassembly-acceleration)
20
+ - [GraphQL API](#graphql-api)
21
+ - [Docker](#docker)
22
+ - [Documentation](#documentation)
23
+ - [Development](#development)
24
+ - [Contributing](#contributing)
81
25
 
82
- ```bash
83
- # 1. Install Rust toolchain and wasm-pack (once per machine)
84
- # See https://rustup.rs for installing Rust.
85
- cargo install wasm-pack
86
-
87
- # 2. Build TypeScript + WASM bundle
88
- # The build script always runs the TypeScript compiler and then
89
- # optionally builds the WASM bundle. If wasm-pack is missing the
90
- # build will succeed with a warning and the server will use
91
- # TypeScript fallbacks.
92
- npm run build
26
+ ---
93
27
 
94
- # 3. Ensure WASM is enabled (default is enabled if WASM_ENABLED is unset)
95
- # In .env or your process environment:
96
- # WASM_ENABLED=true
28
+ ## Features
97
29
 
98
- # 4. Start the server or run tests – the logs will include a
99
- # "WebAssembly module initialized successfully" message when the
100
- # bundle is present and loaded.
101
- npm start
102
- ```
30
+ | Category | Capabilities |
31
+ |----------|-------------|
32
+ | **Asset Management** | Browse, import, duplicate, rename, delete assets; create materials |
33
+ | **Actor Control** | Spawn, delete, transform, physics, tags, components |
34
+ | **Editor Control** | PIE sessions, camera, viewport, screenshots, bookmarks |
35
+ | **Level Management** | Load/save levels, streaming, World Partition, data layers |
36
+ | **Animation & Physics** | Animation BPs, state machines, ragdolls, vehicles, constraints |
37
+ | **Visual Effects** | Niagara particles, GPU simulations, procedural effects, debug shapes |
38
+ | **Sequencer** | Cinematics, timeline control, camera animations, keyframes |
39
+ | **Graph Editing** | Blueprint, Niagara, Material, and Behavior Tree graph manipulation |
40
+ | **Audio** | Sound cues, audio components, sound mixes, ambient sounds |
41
+ | **System** | Console commands, UBT, tests, logs, project settings, CVars |
103
42
 
104
- **Without WASM (still fully functional):**
43
+ ### Architecture
105
44
 
106
- ```bash
107
- # Disable WASM explicitly (optional)
108
- # In .env or environment:
109
- # WASM_ENABLED=false
45
+ - **Native C++ Automation** — All operations route through the MCP Automation Bridge plugin
46
+ - **Graceful Degradation** Server starts even without an active Unreal connection
47
+ - **On-Demand Connection** Retries automation handshakes with exponential backoff
48
+ - **Command Safety** — Blocks dangerous console commands
49
+ - **Asset Caching** — 10-second TTL for improved performance
110
50
 
111
- npm start
112
- # Server will always use TypeScript implementations only.
113
- ```
51
+ ---
114
52
 
115
- When the WASM bundle is not present or `wasm-pack` is not installed:
53
+ ## Getting Started
116
54
 
117
- - `npm run build` prints a concise message:
118
- > WASM build failed or wasm-pack missing; continuing with TypeScript-only build.
119
- - At runtime, the server attempts to load the bundle once. On `ERR_MODULE_NOT_FOUND`
120
- it logs a single warning suggesting `npm run build`/`cargo install wasm-pack` and
121
- permanently falls back to TypeScript for that process.
55
+ ### Prerequisites
122
56
 
123
- WASM acceleration applies to:
124
- - JSON property parsing (5-8x faster)
125
- - Transform calculations (5-10x faster)
126
- - Vector/matrix math (5x faster)
127
- - Asset dependency resolution (3-5x faster)
57
+ - **Node.js** 18+
58
+ - **Unreal Engine** 5.0–5.7
128
59
 
129
- ### Installation
60
+ ### Step 1: Install MCP Server
130
61
 
131
- Clone and Build
62
+ **Option A: NPX (Recommended)**
63
+ ```bash
64
+ npx unreal-engine-mcp-server
65
+ ```
132
66
 
67
+ **Option B: Clone & Build**
133
68
  ```bash
134
- # Clone the repository
135
69
  git clone https://github.com/ChiR24/Unreal_mcp.git
136
70
  cd Unreal_mcp
137
-
138
- # Install dependencies and build
139
71
  npm install
140
72
  npm run build
141
-
142
- # Run directly
143
73
  node dist/cli.js
144
74
  ```
145
75
 
146
- ### Unreal Engine Configuration
76
+ ### Step 2: Install Unreal Plugin
77
+
78
+ The MCP Automation Bridge plugin is included at `Unreal_mcp/plugins/McpAutomationBridge`.
79
+
80
+ **Method 1: Copy Folder**
81
+ ```
82
+ Copy: Unreal_mcp/plugins/McpAutomationBridge/
83
+ To: YourUnrealProject/Plugins/McpAutomationBridge/
84
+ ```
85
+ Regenerate project files after copying.
86
+
87
+ **Method 2: Add in Editor**
88
+ 1. Open Unreal Editor → **Edit → Plugins**
89
+ 2. Click **"Add"** → Browse to `Unreal_mcp/plugins/`
90
+ 3. Select the `McpAutomationBridge` folder
91
+
92
+ **Video Guide:**
93
+
94
+ https://github.com/user-attachments/assets/d8b86ebc-4364-48c9-9781-de854bf3ef7d
147
95
 
148
- No additional engine configuration required. The MCP Automation Bridge plugin handles all automation through native C++ code.
96
+ ### Step 3: Enable Required Plugins
149
97
 
150
- ## MCP Client Configuration
98
+ Enable via **Edit → Plugins**, then restart the editor:
151
99
 
152
- ### Claude Desktop / Cursor
100
+ | Plugin | Required For |
101
+ |--------|--------------|
102
+ | **MCP Automation Bridge** | All automation operations |
103
+ | **Editor Scripting Utilities** | Asset/Actor subsystem operations |
104
+ | **Sequencer** | Sequencer tools |
105
+ | **Level Sequence Editor** | `manage_sequence` operations |
106
+ | **Control Rig** | `animation_physics` operations |
107
+ | **Subobject Data Interface** | Blueprint components (UE 5.7+) |
153
108
 
154
- #### For NPM Installation (Local)
109
+ ### Step 4: Configure MCP Client
155
110
 
111
+ Add to your Claude Desktop / Cursor config file:
112
+
113
+ **Using Clone/Build:**
156
114
  ```json
157
115
  {
158
116
  "mcpServers": {
159
117
  "unreal-engine": {
160
- "command": "npx",
161
- "args": ["unreal-engine-mcp-server"],
118
+ "command": "node",
119
+ "args": ["path/to/Unreal_mcp/dist/cli.js"],
162
120
  "env": {
163
- "UE_PROJECT_PATH": "C:/Users/YourName/Documents/Unreal Projects/YourProject",
121
+ "UE_PROJECT_PATH": "C:/Path/To/YourProject",
164
122
  "MCP_AUTOMATION_PORT": "8091"
165
123
  }
166
124
  }
@@ -168,138 +126,144 @@ No additional engine configuration required. The MCP Automation Bridge plugin ha
168
126
  }
169
127
  ```
170
128
 
171
- #### For Clone/Build Installation
172
-
129
+ **Using NPX:**
173
130
  ```json
174
131
  {
175
132
  "mcpServers": {
176
133
  "unreal-engine": {
177
- "command": "node",
178
- "args": ["path/to/Unreal_mcp/dist/cli.js"],
134
+ "command": "npx",
135
+ "args": ["unreal-engine-mcp-server"],
179
136
  "env": {
180
- "UE_PROJECT_PATH": "C:/Users/YourName/Documents/Unreal Projects/YourProject",
181
- "MCP_AUTOMATION_PORT": "8091"
137
+ "UE_PROJECT_PATH": "C:/Path/To/YourProject"
182
138
  }
183
139
  }
184
140
  }
185
141
  }
186
142
  ```
187
143
 
188
- ## Available Tools (17)
144
+ ---
145
+
146
+ ## Configuration
147
+
148
+ ### Environment Variables
149
+
150
+ ```env
151
+ # Required
152
+ UE_PROJECT_PATH="C:/Path/To/YourProject"
153
+
154
+ # Automation Bridge
155
+ MCP_AUTOMATION_HOST=127.0.0.1
156
+ MCP_AUTOMATION_PORT=8091
157
+
158
+ # Logging
159
+ LOG_LEVEL=info # debug | info | warn | error
160
+
161
+ # Optional
162
+ WASM_ENABLED=true
163
+ MCP_AUTOMATION_REQUEST_TIMEOUT_MS=120000
164
+ ASSET_LIST_TTL_MS=10000
165
+ ```
166
+
167
+ ---
168
+
169
+ ## Available Tools
189
170
 
190
171
  | Tool | Description |
191
172
  |------|-------------|
192
173
  | `manage_asset` | Assets, Materials, Render Targets, Behavior Trees |
193
- | `control_actor` | Spawn, delete, modify, physics |
194
- | `control_editor` | PIE, Camera, UI Input |
195
- | `manage_level` | Load/Save, World Partition |
196
- | `manage_lighting` | Spawn Lights, GI, Shadows, Build Lighting |
197
- | `manage_performance` | Profiling, Optimization, Scalability |
174
+ | `control_actor` | Spawn, delete, transform, physics, tags |
175
+ | `control_editor` | PIE, Camera, viewport, screenshots |
176
+ | `manage_level` | Load/Save, World Partition, streaming |
177
+ | `manage_lighting` | Spawn lights, GI, shadows, build lighting |
178
+ | `manage_performance` | Profiling, optimization, scalability |
198
179
  | `animation_physics` | Animation BPs, Vehicles, Ragdolls |
199
180
  | `manage_effect` | Niagara, Particles, Debug Shapes |
200
181
  | `manage_blueprint` | Create, SCS, Graph Editing |
201
182
  | `manage_blueprint_graph` | Direct Blueprint Graph Manipulation |
202
183
  | `build_environment` | Landscape, Foliage, Procedural |
203
184
  | `system_control` | UBT, Tests, Logs, Project Settings, CVars |
204
- | `manage_sequence` | Sequencer/Cinematics |
185
+ | `manage_sequence` | Sequencer / Cinematics |
205
186
  | `inspect` | Object Introspection |
206
187
  | `manage_audio` | Audio Assets & Components |
207
188
  | `manage_behavior_tree` | Behavior Tree Graph Editing |
208
189
  | `manage_input` | Enhanced Input Actions & Contexts |
209
190
 
191
+ ### Supported Asset Types
210
192
 
211
- ## Documentation
212
-
213
- - [Handler Mappings](docs/handler-mapping.md) - TypeScript to C++ routing guide
214
- - [GraphQL API](docs/GraphQL-API.md) - Query and mutation reference
215
- - [Automation Progress](docs/native-automation-progress.md) - Implementation status
193
+ Blueprints • Materials • Textures • Static Meshes • Skeletal Meshes • Levels • Sounds • Particles • Niagara Systems • Behavior Trees
216
194
 
217
- ## Key Features
195
+ ---
218
196
 
219
- - **Native C++ Automation** - All operations route through the MCP Automation Bridge plugin's native C++ handlers
220
- - **Graceful Degradation** - Server starts even without an active Unreal connection
221
- - **On-Demand Connection** - Retries automation handshakes with backoff instead of persistent polling
222
- - **Non-Intrusive Health Checks** - Uses echo commands every 30 seconds while connected
223
- - **Command Safety** - Blocks dangerous console commands
224
- - **Input Flexibility** - Vectors/rotators accept object or array format
225
- - **Asset Caching** - 10-second TTL for improved performance
226
- - **GraphQL** - Specialized endpoint for complex queries
197
+ ## WebAssembly Acceleration
227
198
 
228
- ### Native C++ Architecture
199
+ Optional WASM acceleration for computationally intensive operations. **Enabled by default** when available, falls back to TypeScript automatically.
229
200
 
230
- The server uses a 100% native C++ approach: all automation operations are implemented as native C++ handlers in the MCP Automation Bridge plugin (under `plugins/McpAutomationBridge/Source/`). This eliminates dependencies and provides better performance, reliability, and type safety.
201
+ | Operation | Speedup |
202
+ |-----------|---------|
203
+ | JSON parsing | 5–8x |
204
+ | Transform calculations | 5–10x |
205
+ | Vector/matrix math | 5x |
206
+ | Dependency resolution | 3–5x |
231
207
 
232
- Configuration and runtime defaults are centralized in `src/constants.ts`. All operations route through the automation bridge's WebSocket protocol to native plugin handlers.
208
+ ### Building WASM (Optional)
233
209
 
234
- ## Supported Asset Types
235
-
236
- Blueprints, Materials, Textures, Static/Skeletal Meshes, Levels, Sounds, Particles, Niagara Systems, Behavior Trees
210
+ ```bash
211
+ cargo install wasm-pack # Once per machine
212
+ npm run build # Builds TS + WASM
213
+ ```
237
214
 
238
- ## Example Console Commands
215
+ To disable: `WASM_ENABLED=false`
239
216
 
240
- - **Statistics**: `stat fps`, `stat gpu`, `stat memory`
241
- - **View Modes**: `viewmode wireframe`, `viewmode unlit`
242
- - **Gameplay**: `slomo 0.5`, `god`, `fly`
243
- - **Rendering**: `r.screenpercentage 50`, `r.vsync 0`
217
+ ---
244
218
 
245
- ### Configuration
219
+ ## GraphQL API
246
220
 
247
- ### Environment Variables
221
+ Optional GraphQL endpoint for complex queries. **Disabled by default.**
248
222
 
249
223
  ```env
250
- UE_PROJECT_PATH="C:/Users/YourName/Documents/Unreal Projects/YourProject" # Absolute path to your .uproject file
251
- LOG_LEVEL=info # debug | info | warn | error
252
-
253
- # Automation bridge WebSocket client (Node -> Unreal editor)
254
- MCP_AUTOMATION_HOST=127.0.0.1 # Host/interface for the automation bridge connection
255
- MCP_AUTOMATION_PORT=8091 # Primary bridge port (must match the plugin's port)
256
- MCP_AUTOMATION_CLIENT_MODE=true # Set to false to disable the automation bridge client
257
- MCP_AUTOMATION_CAPABILITY_TOKEN= # Optional capability token for handshake security
258
-
259
- # Legacy/Alternative variables
260
- # MCP_AUTOMATION_WS_PORT=8090 # Fallback port if MCP_AUTOMATION_PORT is unset
261
- # MCP_AUTOMATION_BRIDGE_ENABLED=true # Legacy alias for MCP_AUTOMATION_CLIENT_MODE
262
-
263
- # WebAssembly acceleration
264
- WASM_ENABLED=true # Default: enabled if unset; set false to force TS-only
265
- # Optional override when hosting the WASM bundle elsewhere:
266
- # WASM_PATH=file:///absolute/path/to/unreal_mcp_wasm.js
267
-
268
- # Timeouts / caching (advanced – safe defaults are baked in)
269
- MCP_AUTOMATION_REQUEST_TIMEOUT_MS=120000
270
- MCP_AUTOMATION_EVENT_TIMEOUT_MS=0
271
- ASSET_LIST_TTL_MS=10000
224
+ GRAPHQL_ENABLED=true
225
+ GRAPHQL_PORT=4000
272
226
  ```
273
227
 
274
- Note on configuration precedence
275
- - The server uses `dotenv` to load `.env` for local development. A `.env.production` file is included as a reference for production deployments; copy values into your real environment or secret store as appropriate.
276
- - Environment variables (.env / system env) override the internal runtime defaults (for example, defaults in `src/index.ts`, `src/automation-bridge.ts`, and individual tool implementations). This lets you tune timeouts, logging, and WASM behavior without modifying source code. Keep secrets in `.env` or a secret manager — do not store secrets in source files.
228
+ See [GraphQL API Documentation](docs/GraphQL-API.md).
277
229
 
278
- Mock mode
230
+ ---
279
231
 
280
-
281
- ### Docker
232
+ ## Docker
282
233
 
283
234
  ```bash
284
235
  docker build -t unreal-mcp .
285
- docker run -it --rm unreal-mcp
236
+ docker run -it --rm -e UE_PROJECT_PATH=/project unreal-mcp
286
237
  ```
287
238
 
288
- Pull from Docker Hub
239
+ ---
289
240
 
290
- ```bash
291
- docker pull mcp/server/unreal-engine-mcp-server:latest
292
- docker run --rm -it mcp/server/unreal-engine-mcp-server:latest
293
- ```
241
+ ## Documentation
242
+
243
+ | Document | Description |
244
+ |----------|-------------|
245
+ | [Handler Mappings](docs/handler-mapping.md) | TypeScript to C++ routing |
246
+ | [GraphQL API](docs/GraphQL-API.md) | Query and mutation reference |
247
+ | [WebAssembly Integration](docs/WebAssembly-Integration.md) | WASM performance guide |
248
+ | [Plugin Extension](docs/editor-plugin-extension.md) | C++ plugin architecture |
249
+ | [Testing Guide](docs/testing-guide.md) | How to run and write tests |
250
+ | [Migration Guide v0.5.0](docs/Migration-Guide-v0.5.0.md) | Upgrade to v0.5.0 |
251
+ | [Roadmap](docs/Roadmap.md) | Development phases |
252
+ | [Automation Progress](docs/native-automation-progress.md) | Implementation status |
253
+
254
+ ---
294
255
 
295
256
  ## Development
296
257
 
297
258
  ```bash
298
- npm run build # Build TypeScript and (optionally) the WebAssembly bundle
299
- npm run lint # Run ESLint
300
- npm run lint:fix # Fix linting issues
259
+ npm run build # Build TypeScript + WASM
260
+ npm run lint # Run ESLint
261
+ npm run test:unit # Run unit tests
262
+ npm run test:all # Run all tests
301
263
  ```
302
264
 
265
+ ---
266
+
303
267
  ## Contributing
304
268
 
305
269
  Contributions welcome! Please:
@@ -307,6 +271,8 @@ Contributions welcome! Please:
307
271
  - Keep PRs focused and small
308
272
  - Follow existing code style
309
273
 
274
+ ---
275
+
310
276
  ## License
311
277
 
312
- MIT - See [LICENSE](LICENSE) file
278
+ MIT See [LICENSE](LICENSE)
package/dist/config.d.ts CHANGED
@@ -14,7 +14,6 @@ export declare const EnvSchema: z.ZodObject<{
14
14
  MCP_ROUTE_STDOUT_LOGS: z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodDefault<z.ZodBoolean>>;
15
15
  UE_PROJECT_PATH: z.ZodOptional<z.ZodString>;
16
16
  UE_EDITOR_EXE: z.ZodOptional<z.ZodString>;
17
- UE_SCREENSHOT_DIR: z.ZodOptional<z.ZodString>;
18
17
  MCP_AUTOMATION_PORT: z.ZodPipe<z.ZodTransform<number, unknown>, z.ZodDefault<z.ZodNumber>>;
19
18
  MCP_AUTOMATION_HOST: z.ZodDefault<z.ZodString>;
20
19
  MCP_AUTOMATION_CLIENT_MODE: z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodDefault<z.ZodBoolean>>;
package/dist/config.js CHANGED
@@ -34,7 +34,6 @@ export const EnvSchema = z.object({
34
34
  MCP_ROUTE_STDOUT_LOGS: z.preprocess(stringToBoolean, z.boolean().default(true)),
35
35
  UE_PROJECT_PATH: z.string().optional(),
36
36
  UE_EDITOR_EXE: z.string().optional(),
37
- UE_SCREENSHOT_DIR: z.string().optional(),
38
37
  MCP_AUTOMATION_PORT: z.preprocess((v) => stringToNumber(v, 8091), z.number().default(8091)),
39
38
  MCP_AUTOMATION_HOST: z.string().default('127.0.0.1'),
40
39
  MCP_AUTOMATION_CLIENT_MODE: z.preprocess(stringToBoolean, z.boolean().default(false)),
@@ -9,4 +9,8 @@ export declare const DEFAULT_TIME_OF_DAY = 9;
9
9
  export declare const DEFAULT_SUN_INTENSITY = 10000;
10
10
  export declare const DEFAULT_SKYLIGHT_INTENSITY = 1;
11
11
  export declare const DEFAULT_SCREENSHOT_RESOLUTION = "1920x1080";
12
+ export declare const DEFAULT_OPERATION_TIMEOUT_MS = 30000;
13
+ export declare const DEFAULT_ASSET_OP_TIMEOUT_MS = 60000;
14
+ export declare const EXTENDED_ASSET_OP_TIMEOUT_MS = 120000;
15
+ export declare const LONG_RUNNING_OP_TIMEOUT_MS = 300000;
12
16
  //# sourceMappingURL=constants.d.ts.map
package/dist/constants.js CHANGED
@@ -9,4 +9,8 @@ export const DEFAULT_TIME_OF_DAY = 9;
9
9
  export const DEFAULT_SUN_INTENSITY = 10000;
10
10
  export const DEFAULT_SKYLIGHT_INTENSITY = 1;
11
11
  export const DEFAULT_SCREENSHOT_RESOLUTION = '1920x1080';
12
+ export const DEFAULT_OPERATION_TIMEOUT_MS = 30000;
13
+ export const DEFAULT_ASSET_OP_TIMEOUT_MS = 60000;
14
+ export const EXTENDED_ASSET_OP_TIMEOUT_MS = 120000;
15
+ export const LONG_RUNNING_OP_TIMEOUT_MS = 300000;
12
16
  //# sourceMappingURL=constants.js.map
@@ -0,0 +1,64 @@
1
+ import DataLoader from 'dataloader';
2
+ import type { AutomationBridge } from '../automation/index.js';
3
+ export interface Actor {
4
+ name: string;
5
+ label?: string;
6
+ class?: string;
7
+ path?: string;
8
+ location?: {
9
+ x: number;
10
+ y: number;
11
+ z: number;
12
+ };
13
+ rotation?: {
14
+ pitch: number;
15
+ yaw: number;
16
+ roll: number;
17
+ };
18
+ scale?: {
19
+ x: number;
20
+ y: number;
21
+ z: number;
22
+ };
23
+ tags?: string[];
24
+ }
25
+ export interface Asset {
26
+ name: string;
27
+ path: string;
28
+ class?: string;
29
+ packagePath?: string;
30
+ size?: number;
31
+ }
32
+ export interface Blueprint {
33
+ name: string;
34
+ path: string;
35
+ parentClass?: string;
36
+ variables?: Array<{
37
+ name: string;
38
+ type: string;
39
+ defaultValue?: unknown;
40
+ }>;
41
+ functions?: Array<{
42
+ name: string;
43
+ parameters?: Array<{
44
+ name: string;
45
+ type: string;
46
+ }>;
47
+ }>;
48
+ components?: Array<{
49
+ name: string;
50
+ type: string;
51
+ }>;
52
+ }
53
+ export interface GraphQLLoaders {
54
+ actorLoader: DataLoader<string, Actor | null>;
55
+ assetLoader: DataLoader<string, Asset | null>;
56
+ blueprintLoader: DataLoader<string, Blueprint | null>;
57
+ actorComponentsLoader: DataLoader<string, Array<{
58
+ name: string;
59
+ type: string;
60
+ }> | null>;
61
+ }
62
+ export declare function createLoaders(automationBridge: AutomationBridge): GraphQLLoaders;
63
+ export declare function clearLoaders(loaders: GraphQLLoaders): void;
64
+ //# sourceMappingURL=loaders.d.ts.map