unreal-engine-mcp-server 0.3.0 → 0.4.0
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/.env.production +6 -1
- package/Dockerfile +11 -28
- package/README.md +1 -2
- package/dist/index.js +120 -54
- package/dist/resources/actors.js +71 -13
- package/dist/resources/assets.d.ts +3 -2
- package/dist/resources/assets.js +96 -72
- package/dist/resources/levels.js +2 -2
- package/dist/tools/assets.js +6 -2
- package/dist/tools/build_environment_advanced.js +46 -42
- package/dist/tools/consolidated-tool-definitions.d.ts +232 -15
- package/dist/tools/consolidated-tool-definitions.js +173 -8
- package/dist/tools/consolidated-tool-handlers.js +331 -718
- package/dist/tools/debug.js +4 -6
- package/dist/tools/rc.js +2 -2
- package/dist/tools/sequence.js +21 -2
- package/dist/unreal-bridge.d.ts +4 -1
- package/dist/unreal-bridge.js +211 -53
- package/dist/utils/http.js +4 -2
- package/dist/utils/response-validator.d.ts +6 -1
- package/dist/utils/response-validator.js +43 -15
- package/package.json +5 -5
- package/server.json +2 -2
- package/src/index.ts +120 -56
- package/src/resources/actors.ts +51 -13
- package/src/resources/assets.ts +97 -73
- package/src/resources/levels.ts +2 -2
- package/src/tools/assets.ts +6 -2
- package/src/tools/build_environment_advanced.ts +46 -42
- package/src/tools/consolidated-tool-definitions.ts +173 -8
- package/src/tools/consolidated-tool-handlers.ts +318 -747
- package/src/tools/debug.ts +4 -6
- package/src/tools/rc.ts +2 -2
- package/src/tools/sequence.ts +21 -2
- package/src/unreal-bridge.ts +163 -60
- package/src/utils/http.ts +7 -4
- package/src/utils/response-validator.ts +48 -19
- package/dist/tools/tool-definitions.d.ts +0 -4919
- package/dist/tools/tool-definitions.js +0 -1007
- package/dist/tools/tool-handlers.d.ts +0 -47
- package/dist/tools/tool-handlers.js +0 -863
- package/src/tools/tool-definitions.ts +0 -1023
- package/src/tools/tool-handlers.ts +0 -973
|
@@ -74,18 +74,28 @@ Examples:
|
|
|
74
74
|
description: `Spawn, delete, and apply physics to actors in the level.
|
|
75
75
|
|
|
76
76
|
When to use this tool:
|
|
77
|
-
-
|
|
77
|
+
- Place an actor/mesh, remove an actor, or nudge an actor with a physics force.
|
|
78
|
+
|
|
79
|
+
Supported actions:
|
|
80
|
+
- spawn
|
|
81
|
+
- delete
|
|
82
|
+
- apply_force
|
|
78
83
|
|
|
79
84
|
Spawning:
|
|
80
85
|
- classPath can be a class name (e.g., StaticMeshActor, CameraActor) OR an asset path (e.g., /Engine/BasicShapes/Cube, /Game/Meshes/SM_Rock).
|
|
81
|
-
-
|
|
86
|
+
- Asset paths auto-spawn StaticMeshActor with the mesh assigned.
|
|
82
87
|
|
|
83
88
|
Deleting:
|
|
84
|
-
- Finds actors by label/name (case-insensitive)
|
|
89
|
+
- Finds actors by label/name (case-insensitive) and deletes matches.
|
|
85
90
|
|
|
86
91
|
Apply force:
|
|
87
92
|
- Applies a world-space force vector to an actor with physics enabled.
|
|
88
93
|
|
|
94
|
+
Tips:
|
|
95
|
+
- classPath accepts classes or asset paths; simple names like Cube auto-resolve to engine assets.
|
|
96
|
+
- location/rotation are optional; defaults are used if omitted.
|
|
97
|
+
- For delete/apply_force, provide actorName.
|
|
98
|
+
|
|
89
99
|
Examples:
|
|
90
100
|
- {"action":"spawn","classPath":"/Engine/BasicShapes/Cube","location":{"x":0,"y":0,"z":100}}
|
|
91
101
|
- {"action":"delete","actorName":"Cube_1"}
|
|
@@ -154,9 +164,15 @@ Examples:
|
|
|
154
164
|
When to use this tool:
|
|
155
165
|
- Start/stop a PIE session, move the viewport camera, or change viewmode (Lit/Unlit/Wireframe/etc.).
|
|
156
166
|
|
|
167
|
+
Supported actions:
|
|
168
|
+
- play
|
|
169
|
+
- stop
|
|
170
|
+
- set_camera
|
|
171
|
+
- set_view_mode
|
|
172
|
+
|
|
157
173
|
Notes:
|
|
158
|
-
- View modes are validated
|
|
159
|
-
- Camera accepts location
|
|
174
|
+
- View modes are validated; unsafe modes are blocked.
|
|
175
|
+
- Camera accepts location/rotation (optional); values normalized.
|
|
160
176
|
|
|
161
177
|
Examples:
|
|
162
178
|
- {"action":"play"}
|
|
@@ -225,6 +241,18 @@ Examples:
|
|
|
225
241
|
When to use this tool:
|
|
226
242
|
- Switch to a level, save the current level, stream sublevels, add a light, or start a lighting build.
|
|
227
243
|
|
|
244
|
+
Supported actions:
|
|
245
|
+
- load
|
|
246
|
+
- save
|
|
247
|
+
- stream
|
|
248
|
+
- create_light
|
|
249
|
+
- build_lighting
|
|
250
|
+
|
|
251
|
+
Tips:
|
|
252
|
+
- Use /Game paths for levels (e.g., /Game/Maps/Level).
|
|
253
|
+
- For streaming, set shouldBeLoaded and shouldBeVisible accordingly.
|
|
254
|
+
- For lights, provide lightType and optional location/intensity.
|
|
255
|
+
|
|
228
256
|
Examples:
|
|
229
257
|
- {"action":"load","levelPath":"/Game/Maps/Lobby"}
|
|
230
258
|
- {"action":"stream","levelName":"Sublevel_A","shouldBeLoaded":true,"shouldBeVisible":true}
|
|
@@ -290,6 +318,16 @@ Examples:
|
|
|
290
318
|
When to use this tool:
|
|
291
319
|
- Generate an Anim Blueprint for a skeleton, play a Montage/Animation on an actor, or enable ragdoll.
|
|
292
320
|
|
|
321
|
+
Supported actions:
|
|
322
|
+
- create_animation_bp
|
|
323
|
+
- play_montage
|
|
324
|
+
- setup_ragdoll
|
|
325
|
+
|
|
326
|
+
Tips:
|
|
327
|
+
- Ensure the montage/animation is compatible with the target actor/skeleton.
|
|
328
|
+
- setup_ragdoll requires a valid physicsAssetName on the skeleton.
|
|
329
|
+
- Use savePath when creating new assets.
|
|
330
|
+
|
|
293
331
|
Examples:
|
|
294
332
|
- {"action":"create_animation_bp","name":"ABP_Hero","skeletonPath":"/Game/Characters/Hero/SK_Hero_Skeleton","savePath":"/Game/Characters/Hero"}
|
|
295
333
|
- {"action":"play_montage","actorName":"Hero","montagePath":"/Game/Anim/MT_Attack"}
|
|
@@ -338,6 +376,15 @@ Examples:
|
|
|
338
376
|
When to use this tool:
|
|
339
377
|
- Spawn a Niagara system at a location, create a particle effect by type tag, or draw debug geometry for planning.
|
|
340
378
|
|
|
379
|
+
Supported actions:
|
|
380
|
+
- particle
|
|
381
|
+
- niagara
|
|
382
|
+
- debug_shape
|
|
383
|
+
|
|
384
|
+
Tips:
|
|
385
|
+
- Set color as RGBA [r,g,b,a]; scale defaults to 1 if omitted.
|
|
386
|
+
- Use debug shapes for quick layout planning and measurements.
|
|
387
|
+
|
|
341
388
|
Examples:
|
|
342
389
|
- {"action":"niagara","systemPath":"/Game/FX/NS_Explosion","location":{"x":0,"y":0,"z":200},"scale":1.0}
|
|
343
390
|
- {"action":"particle","effectType":"Smoke","name":"SMK1","location":{"x":100,"y":0,"z":50}}
|
|
@@ -407,6 +454,14 @@ Examples:
|
|
|
407
454
|
When to use this tool:
|
|
408
455
|
- Quickly scaffold a Blueprint asset or add a component to an existing Blueprint.
|
|
409
456
|
|
|
457
|
+
Supported actions:
|
|
458
|
+
- create
|
|
459
|
+
- add_component
|
|
460
|
+
|
|
461
|
+
Tips:
|
|
462
|
+
- blueprintType can be Actor, Pawn, Character, etc.
|
|
463
|
+
- Component names should be unique within the Blueprint.
|
|
464
|
+
|
|
410
465
|
Examples:
|
|
411
466
|
- {"action":"create","name":"BP_Switch","blueprintType":"Actor","savePath":"/Game/Blueprints"}
|
|
412
467
|
- {"action":"add_component","name":"BP_Switch","componentType":"PointLightComponent","componentName":"KeyLight"}`,
|
|
@@ -449,10 +504,19 @@ Examples:
|
|
|
449
504
|
When to use this tool:
|
|
450
505
|
- Create a procedural terrain alternative, add/paint foliage, or attempt a landscape workflow.
|
|
451
506
|
|
|
507
|
+
Supported actions:
|
|
508
|
+
- create_landscape
|
|
509
|
+
- sculpt
|
|
510
|
+
- add_foliage
|
|
511
|
+
- paint_foliage
|
|
512
|
+
|
|
452
513
|
Important:
|
|
453
514
|
- Native Landscape creation via Python is limited and may return a helpful error suggesting Landscape Mode in the editor.
|
|
454
515
|
- Foliage helpers create FoliageType assets and support simple placement.
|
|
455
516
|
|
|
517
|
+
Tips:
|
|
518
|
+
- Adjust brushSize and strength to tune sculpting results.
|
|
519
|
+
|
|
456
520
|
Examples:
|
|
457
521
|
- {"action":"create_landscape","name":"Landscape_Basic","sizeX":1024,"sizeY":1024}
|
|
458
522
|
- {"action":"add_foliage","name":"FT_Grass","meshPath":"/Game/Foliage/SM_Grass","density":300}
|
|
@@ -462,7 +526,7 @@ Examples:
|
|
|
462
526
|
properties: {
|
|
463
527
|
action: {
|
|
464
528
|
type: 'string',
|
|
465
|
-
enum: ['create_landscape', 'sculpt', 'add_foliage', 'paint_foliage'],
|
|
529
|
+
enum: ['create_landscape', 'sculpt', 'add_foliage', 'paint_foliage', 'create_procedural_terrain', 'create_procedural_foliage', 'add_foliage_instances', 'create_landscape_grass_type'],
|
|
466
530
|
description: 'Environment action'
|
|
467
531
|
},
|
|
468
532
|
// Common
|
|
@@ -474,9 +538,52 @@ Examples:
|
|
|
474
538
|
type: 'string',
|
|
475
539
|
description: 'Sculpt tool (Sculpt, Smooth, Flatten, etc.)'
|
|
476
540
|
},
|
|
477
|
-
//
|
|
541
|
+
// Advanced: procedural terrain
|
|
542
|
+
location: {
|
|
543
|
+
type: 'object',
|
|
544
|
+
properties: { x: { type: 'number' }, y: { type: 'number' }, z: { type: 'number' } }
|
|
545
|
+
},
|
|
546
|
+
subdivisions: { type: 'number' },
|
|
547
|
+
heightFunction: { type: 'string' },
|
|
548
|
+
materialPath: { type: 'string' },
|
|
549
|
+
// Advanced: procedural foliage
|
|
550
|
+
bounds: {
|
|
551
|
+
type: 'object',
|
|
552
|
+
properties: {
|
|
553
|
+
location: { type: 'object', properties: { x: { type: 'number' }, y: { type: 'number' }, z: { type: 'number' } } },
|
|
554
|
+
size: { type: 'object', properties: { x: { type: 'number' }, y: { type: 'number' }, z: { type: 'number' } } }
|
|
555
|
+
}
|
|
556
|
+
},
|
|
557
|
+
foliageTypes: {
|
|
558
|
+
type: 'array',
|
|
559
|
+
items: {
|
|
560
|
+
type: 'object',
|
|
561
|
+
properties: {
|
|
562
|
+
meshPath: { type: 'string' },
|
|
563
|
+
density: { type: 'number' },
|
|
564
|
+
minScale: { type: 'number' },
|
|
565
|
+
maxScale: { type: 'number' },
|
|
566
|
+
alignToNormal: { type: 'boolean' },
|
|
567
|
+
randomYaw: { type: 'boolean' }
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
},
|
|
571
|
+
seed: { type: 'number' },
|
|
572
|
+
// Advanced: direct foliage instances
|
|
573
|
+
foliageType: { type: 'string' },
|
|
574
|
+
transforms: {
|
|
575
|
+
type: 'array',
|
|
576
|
+
items: {
|
|
577
|
+
type: 'object',
|
|
578
|
+
properties: {
|
|
579
|
+
location: { type: 'object', properties: { x: { type: 'number' }, y: { type: 'number' }, z: { type: 'number' } } },
|
|
580
|
+
rotation: { type: 'object', properties: { pitch: { type: 'number' }, yaw: { type: 'number' }, roll: { type: 'number' } } },
|
|
581
|
+
scale: { type: 'object', properties: { x: { type: 'number' }, y: { type: 'number' }, z: { type: 'number' } } }
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
},
|
|
585
|
+
// Foliage (for add_foliage)
|
|
478
586
|
meshPath: { type: 'string', description: 'Mesh path' },
|
|
479
|
-
foliageType: { type: 'string', description: 'Foliage type' },
|
|
480
587
|
density: { type: 'number', description: 'Density' },
|
|
481
588
|
// Painting
|
|
482
589
|
position: {
|
|
@@ -512,6 +619,21 @@ Examples:
|
|
|
512
619
|
When to use this tool:
|
|
513
620
|
- Toggle profiling and FPS stats, adjust quality (sg.*), play a sound, create/show a basic widget, take a screenshot, or launch/quit the editor.
|
|
514
621
|
|
|
622
|
+
Supported actions:
|
|
623
|
+
- profile
|
|
624
|
+
- show_fps
|
|
625
|
+
- set_quality
|
|
626
|
+
- play_sound
|
|
627
|
+
- create_widget
|
|
628
|
+
- show_widget
|
|
629
|
+
- screenshot
|
|
630
|
+
- engine_start
|
|
631
|
+
- engine_quit
|
|
632
|
+
|
|
633
|
+
Tips:
|
|
634
|
+
- Screenshot resolution format: 1920x1080.
|
|
635
|
+
- engine_start can read UE project path from env; provide editorExe/projectPath if needed.
|
|
636
|
+
|
|
515
637
|
Examples:
|
|
516
638
|
- {"action":"show_fps","enabled":true}
|
|
517
639
|
- {"action":"set_quality","category":"Shadows","level":2}
|
|
@@ -595,6 +717,9 @@ Safety:
|
|
|
595
717
|
- Dangerous commands are blocked (quit/exit, GPU crash triggers, unsafe visualizebuffer modes, etc.).
|
|
596
718
|
- Unknown commands will return a warning instead of crashing.
|
|
597
719
|
|
|
720
|
+
Tips:
|
|
721
|
+
- Prefer dedicated tools (system_control, control_editor) when available for structured control.
|
|
722
|
+
|
|
598
723
|
Examples:
|
|
599
724
|
- {"command":"stat fps"}
|
|
600
725
|
- {"command":"viewmode wireframe"}
|
|
@@ -627,6 +752,18 @@ Examples:
|
|
|
627
752
|
When to use this tool:
|
|
628
753
|
- Automate Remote Control (RC) preset authoring and interaction from the assistant.
|
|
629
754
|
|
|
755
|
+
Supported actions:
|
|
756
|
+
- create_preset
|
|
757
|
+
- expose_actor
|
|
758
|
+
- expose_property
|
|
759
|
+
- list_fields
|
|
760
|
+
- set_property
|
|
761
|
+
- get_property
|
|
762
|
+
|
|
763
|
+
Tips:
|
|
764
|
+
- value must be JSON-serializable.
|
|
765
|
+
- Use objectPath/presetPath with full asset/object paths.
|
|
766
|
+
|
|
630
767
|
Examples:
|
|
631
768
|
- {"action":"create_preset","name":"LivePreset","path":"/Game/RCPresets"}
|
|
632
769
|
- {"action":"expose_actor","presetPath":"/Game/RCPresets/LivePreset","actorName":"CameraActor"}
|
|
@@ -672,6 +809,26 @@ Examples:
|
|
|
672
809
|
When to use this tool:
|
|
673
810
|
- Build quick cinematics: create/open a sequence, add a camera or actors, tweak properties, and play.
|
|
674
811
|
|
|
812
|
+
Supported actions:
|
|
813
|
+
- create
|
|
814
|
+
- open
|
|
815
|
+
- add_camera
|
|
816
|
+
- add_actor
|
|
817
|
+
- add_actors
|
|
818
|
+
- remove_actors
|
|
819
|
+
- get_bindings
|
|
820
|
+
- add_spawnable_from_class
|
|
821
|
+
- play
|
|
822
|
+
- pause
|
|
823
|
+
- stop
|
|
824
|
+
- set_properties
|
|
825
|
+
- get_properties
|
|
826
|
+
- set_playback_speed
|
|
827
|
+
|
|
828
|
+
Tips:
|
|
829
|
+
- Set spawnable=true to auto-create a camera actor.
|
|
830
|
+
- Use frameRate/lengthInFrames to define timing; use playbackStart/End to trim.
|
|
831
|
+
|
|
675
832
|
Examples:
|
|
676
833
|
- {"action":"create","name":"Intro","path":"/Game/Cinematics"}
|
|
677
834
|
- {"action":"add_camera","spawnable":true}
|
|
@@ -735,6 +892,14 @@ Examples:
|
|
|
735
892
|
When to use this tool:
|
|
736
893
|
- Inspect an object by path (class default object or actor/component) and optionally modify properties.
|
|
737
894
|
|
|
895
|
+
Supported actions:
|
|
896
|
+
- inspect_object
|
|
897
|
+
- set_property
|
|
898
|
+
|
|
899
|
+
Tips:
|
|
900
|
+
- propertyName is case-sensitive; ensure it exists on the target object.
|
|
901
|
+
- For class default objects (CDOs), use the /Script/...Default__Class path.
|
|
902
|
+
|
|
738
903
|
Examples:
|
|
739
904
|
- {"action":"inspect_object","objectPath":"/Script/Engine.Default__Engine"}
|
|
740
905
|
- {"action":"set_property","objectPath":"/Game/MyActor","propertyName":"CustomBool","value":true}`,
|