unreal-engine-mcp-server 0.5.0 → 0.5.2

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 (188) 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 +2 -4
  6. package/.github/workflows/release-drafter.yml +3 -2
  7. package/.github/workflows/release.yml +3 -3
  8. package/CHANGELOG.md +109 -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/automation/bridge.d.ts +1 -2
  14. package/dist/automation/bridge.js +24 -23
  15. package/dist/automation/connection-manager.d.ts +1 -0
  16. package/dist/automation/connection-manager.js +10 -0
  17. package/dist/automation/message-handler.js +5 -4
  18. package/dist/automation/request-tracker.d.ts +4 -0
  19. package/dist/automation/request-tracker.js +11 -3
  20. package/dist/config.d.ts +0 -1
  21. package/dist/config.js +0 -1
  22. package/dist/constants.d.ts +4 -0
  23. package/dist/constants.js +4 -0
  24. package/dist/graphql/loaders.d.ts +64 -0
  25. package/dist/graphql/loaders.js +117 -0
  26. package/dist/graphql/resolvers.d.ts +3 -3
  27. package/dist/graphql/resolvers.js +33 -30
  28. package/dist/graphql/server.js +3 -1
  29. package/dist/graphql/types.d.ts +2 -0
  30. package/dist/index.d.ts +2 -0
  31. package/dist/index.js +13 -2
  32. package/dist/server-setup.d.ts +0 -1
  33. package/dist/server-setup.js +0 -40
  34. package/dist/tools/actors.d.ts +58 -24
  35. package/dist/tools/actors.js +22 -6
  36. package/dist/tools/assets.d.ts +19 -71
  37. package/dist/tools/assets.js +28 -22
  38. package/dist/tools/base-tool.d.ts +4 -4
  39. package/dist/tools/base-tool.js +1 -1
  40. package/dist/tools/blueprint.d.ts +45 -61
  41. package/dist/tools/blueprint.js +43 -14
  42. package/dist/tools/consolidated-tool-definitions.js +2 -1
  43. package/dist/tools/consolidated-tool-handlers.js +96 -110
  44. package/dist/tools/dynamic-handler-registry.d.ts +11 -9
  45. package/dist/tools/dynamic-handler-registry.js +17 -95
  46. package/dist/tools/editor.d.ts +19 -193
  47. package/dist/tools/editor.js +11 -2
  48. package/dist/tools/environment.d.ts +8 -14
  49. package/dist/tools/foliage.d.ts +18 -143
  50. package/dist/tools/foliage.js +4 -2
  51. package/dist/tools/handlers/actor-handlers.d.ts +1 -1
  52. package/dist/tools/handlers/actor-handlers.js +14 -13
  53. package/dist/tools/handlers/asset-handlers.js +454 -454
  54. package/dist/tools/handlers/sequence-handlers.d.ts +1 -1
  55. package/dist/tools/handlers/sequence-handlers.js +24 -13
  56. package/dist/tools/introspection.d.ts +1 -1
  57. package/dist/tools/introspection.js +1 -1
  58. package/dist/tools/landscape.d.ts +16 -116
  59. package/dist/tools/landscape.js +7 -3
  60. package/dist/tools/level.d.ts +22 -103
  61. package/dist/tools/level.js +26 -18
  62. package/dist/tools/lighting.d.ts +54 -7
  63. package/dist/tools/lighting.js +9 -5
  64. package/dist/tools/materials.d.ts +1 -1
  65. package/dist/tools/materials.js +5 -1
  66. package/dist/tools/niagara.js +37 -2
  67. package/dist/tools/performance.d.ts +0 -1
  68. package/dist/tools/performance.js +0 -1
  69. package/dist/tools/physics.js +5 -1
  70. package/dist/tools/sequence.d.ts +24 -24
  71. package/dist/tools/sequence.js +13 -0
  72. package/dist/tools/ui.d.ts +0 -2
  73. package/dist/types/automation-responses.d.ts +115 -0
  74. package/dist/types/automation-responses.js +2 -0
  75. package/dist/types/responses.d.ts +249 -0
  76. package/dist/types/responses.js +2 -0
  77. package/dist/types/tool-interfaces.d.ts +135 -135
  78. package/dist/types/tool-types.d.ts +2 -0
  79. package/dist/unreal-bridge.js +4 -4
  80. package/dist/utils/command-validator.js +7 -5
  81. package/dist/utils/error-handler.d.ts +24 -2
  82. package/dist/utils/error-handler.js +58 -23
  83. package/dist/utils/normalize.d.ts +7 -4
  84. package/dist/utils/normalize.js +12 -10
  85. package/dist/utils/path-security.d.ts +2 -0
  86. package/dist/utils/path-security.js +24 -0
  87. package/dist/utils/response-factory.d.ts +4 -4
  88. package/dist/utils/response-factory.js +15 -21
  89. package/dist/utils/response-validator.js +88 -73
  90. package/dist/utils/unreal-command-queue.d.ts +2 -0
  91. package/dist/utils/unreal-command-queue.js +8 -1
  92. package/docs/Migration-Guide-v0.5.0.md +1 -9
  93. package/docs/handler-mapping.md +4 -2
  94. package/docs/testing-guide.md +2 -2
  95. package/package.json +12 -6
  96. package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridgeSubsystem.cpp +298 -33
  97. package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_AnimationHandlers.cpp +7 -8
  98. package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_BlueprintGraphHandlers.cpp +229 -319
  99. package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_BlueprintHandlers.cpp +98 -0
  100. package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_EffectHandlers.cpp +24 -0
  101. package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_EnvironmentHandlers.cpp +96 -0
  102. package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_LightingHandlers.cpp +52 -5
  103. package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_ProcessRequest.cpp +5 -268
  104. package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpAutomationBridge_SequenceHandlers.cpp +57 -2
  105. package/plugins/McpAutomationBridge/Source/McpAutomationBridge/Private/McpConnectionManager.cpp +0 -1
  106. package/scripts/run-all-tests.mjs +25 -20
  107. package/server.json +3 -2
  108. package/src/automation/bridge.ts +27 -25
  109. package/src/automation/connection-manager.ts +18 -0
  110. package/src/automation/message-handler.ts +33 -8
  111. package/src/automation/request-tracker.ts +39 -7
  112. package/src/config.ts +1 -1
  113. package/src/constants.ts +7 -0
  114. package/src/graphql/loaders.ts +244 -0
  115. package/src/graphql/resolvers.ts +47 -49
  116. package/src/graphql/server.ts +3 -1
  117. package/src/graphql/types.ts +3 -0
  118. package/src/index.ts +15 -2
  119. package/src/resources/assets.ts +5 -4
  120. package/src/server/tool-registry.ts +3 -3
  121. package/src/server-setup.ts +3 -37
  122. package/src/tools/actors.ts +77 -44
  123. package/src/tools/animation.ts +1 -0
  124. package/src/tools/assets.ts +76 -65
  125. package/src/tools/base-tool.ts +3 -3
  126. package/src/tools/blueprint.ts +170 -104
  127. package/src/tools/consolidated-tool-definitions.ts +2 -1
  128. package/src/tools/consolidated-tool-handlers.ts +129 -150
  129. package/src/tools/dynamic-handler-registry.ts +22 -140
  130. package/src/tools/editor.ts +43 -29
  131. package/src/tools/environment.ts +21 -27
  132. package/src/tools/foliage.ts +28 -25
  133. package/src/tools/handlers/actor-handlers.ts +16 -17
  134. package/src/tools/handlers/asset-handlers.ts +484 -484
  135. package/src/tools/handlers/sequence-handlers.ts +85 -62
  136. package/src/tools/introspection.ts +7 -7
  137. package/src/tools/landscape.ts +34 -28
  138. package/src/tools/level.ts +100 -80
  139. package/src/tools/lighting.ts +25 -20
  140. package/src/tools/materials.ts +9 -3
  141. package/src/tools/niagara.ts +44 -2
  142. package/src/tools/performance.ts +1 -2
  143. package/src/tools/physics.ts +7 -1
  144. package/src/tools/sequence.ts +42 -26
  145. package/src/tools/ui.ts +1 -3
  146. package/src/types/automation-responses.ts +119 -0
  147. package/src/types/responses.ts +355 -0
  148. package/src/types/tool-interfaces.ts +135 -135
  149. package/src/types/tool-types.ts +4 -0
  150. package/src/unreal-bridge.ts +71 -26
  151. package/src/utils/command-validator.ts +47 -5
  152. package/src/utils/error-handler.ts +128 -45
  153. package/src/utils/normalize.test.ts +162 -0
  154. package/src/utils/normalize.ts +38 -16
  155. package/src/utils/path-security.ts +43 -0
  156. package/src/utils/response-factory.ts +29 -24
  157. package/src/utils/response-validator.ts +103 -87
  158. package/src/utils/safe-json.test.ts +90 -0
  159. package/src/utils/unreal-command-queue.ts +13 -1
  160. package/src/utils/validation.test.ts +184 -0
  161. package/tests/test-animation.mjs +358 -33
  162. package/tests/test-asset-graph.mjs +311 -0
  163. package/tests/test-audio.mjs +314 -116
  164. package/tests/test-behavior-tree.mjs +327 -144
  165. package/tests/test-blueprint-graph.mjs +343 -12
  166. package/tests/test-control-editor.mjs +85 -53
  167. package/tests/test-graphql.mjs +58 -8
  168. package/tests/test-input.mjs +349 -0
  169. package/tests/test-inspect.mjs +291 -61
  170. package/tests/test-landscape.mjs +304 -48
  171. package/tests/test-lighting.mjs +428 -0
  172. package/tests/test-manage-level.mjs +70 -51
  173. package/tests/test-performance.mjs +539 -0
  174. package/tests/test-sequence.mjs +82 -46
  175. package/tests/test-system.mjs +72 -33
  176. package/tests/test-wasm.mjs +98 -8
  177. package/vitest.config.ts +35 -0
  178. package/.github/release-drafter.yml +0 -148
  179. package/dist/prompts/index.d.ts +0 -21
  180. package/dist/prompts/index.js +0 -217
  181. package/dist/tools/blueprint/helpers.d.ts +0 -29
  182. package/dist/tools/blueprint/helpers.js +0 -182
  183. package/src/prompts/index.ts +0 -249
  184. package/src/tools/blueprint/helpers.ts +0 -189
  185. package/tests/test-blueprint-events.mjs +0 -35
  186. package/tests/test-extra-tools.mjs +0 -38
  187. package/tests/test-render.mjs +0 -33
  188. package/tests/test-search-assets.mjs +0 -66
@@ -0,0 +1,311 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Material Graph & Advanced Asset Test Suite
4
+ * Tool: manage_asset (material graph operations)
5
+ * Coverage: Material graph nodes, search, analyze, nanite
6
+ */
7
+
8
+ import { runToolTests } from './test-runner.mjs';
9
+
10
+ const testCases = [
11
+ // === PRE-CLEANUP ===
12
+ {
13
+ scenario: 'Pre-cleanup: Delete test materials',
14
+ toolName: 'manage_asset',
15
+ arguments: { action: 'delete', assetPaths: ['/Game/Tests/Materials/M_GraphTest', '/Game/Tests/Materials/M_NaniteTest'] },
16
+ expected: 'success|not_found'
17
+ },
18
+ {
19
+ scenario: 'Create test folder',
20
+ toolName: 'manage_asset',
21
+ arguments: { action: 'create_folder', path: '/Game/Tests/Materials' },
22
+ expected: 'success'
23
+ },
24
+
25
+ // === SEARCH ASSETS ===
26
+ {
27
+ scenario: 'Search assets by name',
28
+ toolName: 'manage_asset',
29
+ arguments: { action: 'search_assets', filter: 'Cube', packagePaths: ['/Engine'] },
30
+ expected: 'success'
31
+ },
32
+ {
33
+ scenario: 'Search assets by class',
34
+ toolName: 'manage_asset',
35
+ arguments: { action: 'search_assets', classNames: ['Material'], packagePaths: ['/Engine'], limit: 10 },
36
+ expected: 'success'
37
+ },
38
+ {
39
+ scenario: 'Search assets recursive',
40
+ toolName: 'manage_asset',
41
+ arguments: { action: 'search_assets', packagePaths: ['/Game'], recursiveClasses: true, recursivePaths: true },
42
+ expected: 'success'
43
+ },
44
+
45
+ // === ANALYZE GRAPH ===
46
+ {
47
+ scenario: 'Analyze material graph',
48
+ toolName: 'manage_asset',
49
+ arguments: { action: 'analyze_graph', assetPath: '/Engine/EngineMaterials/WorldGridMaterial', maxDepth: 3 },
50
+ expected: 'success'
51
+ },
52
+ {
53
+ scenario: 'Get asset graph',
54
+ toolName: 'manage_asset',
55
+ arguments: { action: 'get_asset_graph', assetPath: '/Engine/EngineMaterials/WorldGridMaterial' },
56
+ expected: 'success'
57
+ },
58
+
59
+ // === CREATE MATERIAL FOR GRAPH TESTS ===
60
+ {
61
+ scenario: 'Create material for graph tests',
62
+ toolName: 'manage_asset',
63
+ arguments: { action: 'create_material', name: 'M_GraphTest', path: '/Game/Tests/Materials', materialType: 'Master' },
64
+ expected: 'success'
65
+ },
66
+
67
+ // === MATERIAL GRAPH: ADD NODES ===
68
+ {
69
+ scenario: 'Add Constant3Vector node',
70
+ toolName: 'manage_asset',
71
+ arguments: {
72
+ action: 'add_material_node',
73
+ assetPath: '/Game/Tests/Materials/M_GraphTest',
74
+ nodeType: 'Constant3Vector',
75
+ x: -300,
76
+ y: 0
77
+ },
78
+ expected: 'success'
79
+ },
80
+ {
81
+ scenario: 'Add Texture Sample node',
82
+ toolName: 'manage_asset',
83
+ arguments: {
84
+ action: 'add_material_node',
85
+ assetPath: '/Game/Tests/Materials/M_GraphTest',
86
+ nodeType: 'TextureSample',
87
+ x: -400,
88
+ y: 100
89
+ },
90
+ expected: 'success'
91
+ },
92
+ {
93
+ scenario: 'Add Multiply node',
94
+ toolName: 'manage_asset',
95
+ arguments: {
96
+ action: 'add_material_node',
97
+ assetPath: '/Game/Tests/Materials/M_GraphTest',
98
+ nodeType: 'Multiply',
99
+ x: -150,
100
+ y: 50
101
+ },
102
+ expected: 'success'
103
+ },
104
+ {
105
+ scenario: 'Add Scalar Parameter node',
106
+ toolName: 'manage_asset',
107
+ arguments: {
108
+ action: 'add_material_node',
109
+ assetPath: '/Game/Tests/Materials/M_GraphTest',
110
+ nodeType: 'ScalarParameter',
111
+ parameterName: 'Roughness',
112
+ x: -300,
113
+ y: 200
114
+ },
115
+ expected: 'success'
116
+ },
117
+ {
118
+ scenario: 'Add Vector Parameter node',
119
+ toolName: 'manage_asset',
120
+ arguments: {
121
+ action: 'add_material_node',
122
+ assetPath: '/Game/Tests/Materials/M_GraphTest',
123
+ nodeType: 'VectorParameter',
124
+ parameterName: 'BaseColor',
125
+ x: -300,
126
+ y: 300
127
+ },
128
+ expected: 'success'
129
+ },
130
+ {
131
+ scenario: 'Add Add node',
132
+ toolName: 'manage_asset',
133
+ arguments: {
134
+ action: 'add_material_node',
135
+ assetPath: '/Game/Tests/Materials/M_GraphTest',
136
+ nodeType: 'Add',
137
+ x: -200,
138
+ y: 150
139
+ },
140
+ expected: 'success'
141
+ },
142
+
143
+ // === MATERIAL GRAPH: GET NODE DETAILS ===
144
+ {
145
+ scenario: 'Get material node details',
146
+ toolName: 'manage_asset',
147
+ arguments: {
148
+ action: 'get_material_node_details',
149
+ assetPath: '/Game/Tests/Materials/M_GraphTest'
150
+ },
151
+ expected: 'success'
152
+ },
153
+
154
+ // === MATERIAL GRAPH: CONNECT PINS ===
155
+ {
156
+ scenario: 'Connect Constant3Vector to BaseColor',
157
+ toolName: 'manage_asset',
158
+ arguments: {
159
+ action: 'connect_material_pins',
160
+ assetPath: '/Game/Tests/Materials/M_GraphTest',
161
+ fromNodeId: 'Constant3Vector_0',
162
+ fromPin: 'RGB',
163
+ toNodeId: 'Material',
164
+ toPin: 'BaseColor'
165
+ },
166
+ expected: 'success|not_found'
167
+ },
168
+ {
169
+ scenario: 'Connect ScalarParameter to Roughness',
170
+ toolName: 'manage_asset',
171
+ arguments: {
172
+ action: 'connect_material_pins',
173
+ assetPath: '/Game/Tests/Materials/M_GraphTest',
174
+ fromNodeId: 'ScalarParameter_Roughness',
175
+ fromPin: 'Output',
176
+ toNodeId: 'Material',
177
+ toPin: 'Roughness'
178
+ },
179
+ expected: 'success|not_found'
180
+ },
181
+
182
+ // === MATERIAL GRAPH: BREAK CONNECTIONS ===
183
+ {
184
+ scenario: 'Break material connections',
185
+ toolName: 'manage_asset',
186
+ arguments: {
187
+ action: 'break_material_connections',
188
+ assetPath: '/Game/Tests/Materials/M_GraphTest',
189
+ nodeId: 'Material',
190
+ pinName: 'BaseColor'
191
+ },
192
+ expected: 'success|not_found'
193
+ },
194
+
195
+ // === MATERIAL GRAPH: REMOVE NODE ===
196
+ {
197
+ scenario: 'Remove Add node',
198
+ toolName: 'manage_asset',
199
+ arguments: {
200
+ action: 'remove_material_node',
201
+ assetPath: '/Game/Tests/Materials/M_GraphTest',
202
+ nodeId: 'Add_0'
203
+ },
204
+ expected: 'success|not_found'
205
+ },
206
+
207
+ // === REBUILD MATERIAL ===
208
+ {
209
+ scenario: 'Rebuild material',
210
+ toolName: 'manage_asset',
211
+ arguments: {
212
+ action: 'rebuild_material',
213
+ assetPath: '/Game/Tests/Materials/M_GraphTest',
214
+ save: true
215
+ },
216
+ expected: 'success'
217
+ },
218
+
219
+ // === NANITE OPERATIONS ===
220
+ {
221
+ scenario: 'Create dummy mesh for Nanite test',
222
+ toolName: 'manage_asset',
223
+ arguments: { action: 'duplicate', sourcePath: '/Engine/BasicShapes/Cube', destinationPath: '/Game/Tests/Materials', newName: 'SM_NaniteTest' },
224
+ expected: 'success'
225
+ },
226
+ {
227
+ scenario: 'Nanite rebuild mesh',
228
+ toolName: 'manage_asset',
229
+ arguments: {
230
+ action: 'nanite_rebuild_mesh',
231
+ meshPath: '/Game/Tests/Materials/SM_NaniteTest'
232
+ },
233
+ expected: 'success|not_supported'
234
+ },
235
+
236
+ // === GENERATE LODs ===
237
+ {
238
+ scenario: 'Generate LODs for mesh',
239
+ toolName: 'manage_asset',
240
+ arguments: {
241
+ action: 'generate_lods',
242
+ meshPath: '/Game/Tests/Materials/SM_NaniteTest',
243
+ lodCount: 3
244
+ },
245
+ expected: 'success'
246
+ },
247
+
248
+ // === CREATE RENDER TARGET ===
249
+ {
250
+ scenario: 'Create render target',
251
+ toolName: 'manage_asset',
252
+ arguments: {
253
+ action: 'create_render_target',
254
+ name: 'RT_Test',
255
+ path: '/Game/Tests/Materials',
256
+ width: 512,
257
+ height: 512
258
+ },
259
+ expected: 'success'
260
+ },
261
+
262
+ // === ERROR CASES ===
263
+ {
264
+ scenario: 'Error: Add node to invalid material',
265
+ toolName: 'manage_asset',
266
+ arguments: { action: 'add_material_node', assetPath: '/Game/Invalid/Material', nodeType: 'Constant' },
267
+ expected: 'error|not_found'
268
+ },
269
+ {
270
+ scenario: 'Error: Connect invalid pins',
271
+ toolName: 'manage_asset',
272
+ arguments: { action: 'connect_material_pins', assetPath: '/Game/Tests/Materials/M_GraphTest', fromNodeId: 'Invalid', fromPin: 'Invalid', toNodeId: 'Invalid', toPin: 'Invalid' },
273
+ expected: 'error|not_found'
274
+ },
275
+ {
276
+ scenario: 'Error: Search with empty paths',
277
+ toolName: 'manage_asset',
278
+ arguments: { action: 'search_assets', packagePaths: [] },
279
+ expected: 'success|error'
280
+ },
281
+ {
282
+ scenario: 'Error: Nanite on non-mesh',
283
+ toolName: 'manage_asset',
284
+ arguments: { action: 'nanite_rebuild_mesh', meshPath: '/Game/Tests/Materials/M_GraphTest' },
285
+ expected: 'error'
286
+ },
287
+
288
+ // === EDGE CASES ===
289
+ {
290
+ scenario: 'Edge: Negative node position',
291
+ toolName: 'manage_asset',
292
+ arguments: { action: 'add_material_node', assetPath: '/Game/Tests/Materials/M_GraphTest', nodeType: 'Constant', x: -9999, y: -9999 },
293
+ expected: 'success'
294
+ },
295
+ {
296
+ scenario: 'Edge: Very large render target',
297
+ toolName: 'manage_asset',
298
+ arguments: { action: 'create_render_target', name: 'RT_Large', path: '/Game/Tests/Materials', width: 4096, height: 4096 },
299
+ expected: 'success'
300
+ },
301
+
302
+ // === CLEANUP ===
303
+ {
304
+ scenario: 'Cleanup: Delete test materials folder',
305
+ toolName: 'manage_asset',
306
+ arguments: { action: 'delete', assetPaths: ['/Game/Tests/Materials'] },
307
+ expected: 'success|not_found'
308
+ }
309
+ ];
310
+
311
+ await runToolTests('Material Graph & Advanced Assets', testCases);