ultimate-unreal-engine-mcp 0.1.14 → 0.1.16

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.
package/README.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # Ultimate Unreal Engine MCP
2
2
 
3
- **129 tools. 26 domains. Full read/write access to Unreal Engine 5.7 — including live editor APIs, Blueprint graphs, and viewport screenshots.**
3
+ **132 tools. 26 domains. Full read/write access to Unreal Engine 5.7 — including live editor APIs, Blueprint graphs, and viewport screenshots.**
4
4
 
5
5
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
6
6
  [![Node 22+](https://img.shields.io/badge/Node.js-22%2B-brightgreen.svg)](https://nodejs.org/)
7
7
  [![UE 5.7](https://img.shields.io/badge/Unreal%20Engine-5.7-orange.svg)](https://www.unrealengine.com/)
8
8
  [![Tests](https://img.shields.io/badge/tests-1021%20passing-success.svg)](#development)
9
- [![Tools](https://img.shields.io/badge/tools-129-informational.svg)](#tool-catalog)
9
+ [![Tools](https://img.shields.io/badge/tools-132-informational.svg)](#tool-catalog)
10
10
 
11
11
  MCP (Model Context Protocol) is a standard that lets AI assistants call tools on external systems — this server exposes Unreal Engine as those tools.
12
12
 
@@ -296,14 +296,17 @@ graph TD
296
296
  </details>
297
297
 
298
298
  <details>
299
- <summary><strong>Editor</strong> — 7 tools</summary>
299
+ <summary><strong>Editor</strong> — 10 tools</summary>
300
300
 
301
301
  | Tool | Description |
302
302
  |------|-------------|
303
303
  | `ue_list_actors` | List actors in the current level with transforms and class info |
304
- | `ue_spawn_actor` | Spawn an actor by class into the current level |
304
+ | `ue_spawn_actor` | Spawn an actor by class with optional label |
305
305
  | `ue_transform_actor` | Move, rotate, scale, or set properties on an actor |
306
306
  | `ue_delete_actor` | Delete an actor from the current level |
307
+ | `ue_set_actor_property` | Set any UPROPERTY on an actor or component by label (bool, int, float, string, name, actor ref, asset ref) |
308
+ | `ue_create_data_asset` | Create a UPrimaryDataAsset with reflection-set properties |
309
+ | `ue_create_curve` | Create a UCurveFloat asset with keyframes |
307
310
  | `ue_query_assets` | Query the asset registry — search by class, path, or name |
308
311
  | `ue_trace_references` | Trace all assets that reference or are referenced by an asset |
309
312
  | `ue_read_level_layout` | Read the current level's actor graph and spatial layout |
@@ -120,20 +120,25 @@ export function registerEditorTools(server, bridge) {
120
120
  property_name: z.string().describe('The UPROPERTY name to set (e.g., RoomID, RoomDoor, DoorCurve)'),
121
121
  value: z.union([z.string(), z.number(), z.boolean()]).describe('The value to set — string for name/text/actor label/asset path, number for int/float, boolean for bool'),
122
122
  value_type: z.enum(['bool', 'int', 'float', 'string', 'name', 'text', 'actor', 'asset']).describe('Type of the value'),
123
+ component_name: z.string().optional().describe('Optional subcomponent name (e.g. DoorMesh) to set the property on instead of the actor'),
123
124
  }),
124
125
  annotations: {
125
126
  readOnlyHint: false,
126
127
  destructiveHint: false,
127
128
  },
128
129
  }, withKnownIssues('ue_set_actor_property', async (args) => {
130
+ const payload = {
131
+ actor_label: args.actor_label,
132
+ property_name: args.property_name,
133
+ value: args.value,
134
+ value_type: args.value_type,
135
+ };
136
+ if (args.component_name) {
137
+ payload['component_name'] = args.component_name;
138
+ }
129
139
  return sendOrDisconnect(_bridge, {
130
140
  type: 'actor.setProperty',
131
- payload: {
132
- actor_label: args.actor_label,
133
- property_name: args.property_name,
134
- value: args.value,
135
- value_type: args.value_type,
136
- },
141
+ payload,
137
142
  });
138
143
  }));
139
144
  // --------------------------------------------------------------------------
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ultimate-unreal-engine-mcp",
3
- "version": "0.1.14",
3
+ "version": "0.1.16",
4
4
  "description": "MCP server giving AI assistants full access to Unreal Engine 5.7 projects",
5
5
  "type": "module",
6
6
  "engines": {
@@ -24,6 +24,8 @@
24
24
  #include "Editor.h"
25
25
  #include "EditorViewportClient.h"
26
26
  #include "LevelEditorViewport.h"
27
+ #include "LevelEditor.h"
28
+ #include "SLevelViewport.h"
27
29
  #include "UnrealClient.h"
28
30
  #include "HighResScreenshot.h"
29
31
  #include "Misc/Paths.h"
@@ -74,10 +76,10 @@ static FString BuildViewportErrorResponse(const FString& CorrId, const FString&
74
76
  }
75
77
 
76
78
  /**
77
- * Returns the first visible level editor viewport client, or nullptr if none is open.
78
- * A static_cast is safe here because MCPBridgeEditor only runs inside the editor and
79
- * GetAllViewportClients() in the level editor context returns FLevelEditorViewportClient
80
- * instances.
79
+ * Returns the first level editor viewport client.
80
+ * Uses FLevelEditorModule::GetFirstActiveLevelViewport() which reliably
81
+ * returns the docked viewport even when it doesn't have focus.
82
+ * Falls back to GEditor->GetAllViewportClients() scan if the module approach fails.
81
83
  */
82
84
  static FLevelEditorViewportClient* GetActiveViewportClient()
83
85
  {
@@ -86,14 +88,24 @@ static FLevelEditorViewportClient* GetActiveViewportClient()
86
88
  return nullptr;
87
89
  }
88
90
 
89
- for (FEditorViewportClient* VC : GEditor->GetAllViewportClients())
91
+ // Primary path: use the LevelEditor module API (works for docked viewports).
92
+ if (FModuleManager::Get().IsModuleLoaded(TEXT("LevelEditor")))
90
93
  {
91
- if (!VC)
94
+ FLevelEditorModule& LevelEditorModule =
95
+ FModuleManager::GetModuleChecked<FLevelEditorModule>(TEXT("LevelEditor"));
96
+ TSharedPtr<SLevelViewport> ActiveViewport = LevelEditorModule.GetFirstActiveLevelViewport();
97
+ if (ActiveViewport.IsValid())
92
98
  {
93
- continue;
99
+ return &ActiveViewport->GetLevelViewportClient();
94
100
  }
101
+ }
102
+
103
+ // Fallback: iterate all viewport clients.
104
+ for (FEditorViewportClient* VC : GEditor->GetAllViewportClients())
105
+ {
106
+ if (!VC) continue;
95
107
  FLevelEditorViewportClient* LVC = static_cast<FLevelEditorViewportClient*>(VC);
96
- if (LVC && LVC->IsVisible())
108
+ if (LVC)
97
109
  {
98
110
  return LVC;
99
111
  }