ue-mcp 0.7.0 → 0.7.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.
@@ -29,7 +29,188 @@ export function buildDefaults(tools) {
29
29
  group: "util",
30
30
  description: "Run a shell command. Params: command, cwd?, timeout?",
31
31
  };
32
- return { tasks, flows: {} };
32
+ return { tasks, flows: defaultFlows() };
33
+ }
34
+ // Shorthand constants
35
+ const PKG = "/Game/Flows/Beacon";
36
+ const CUBE = "/Engine/BasicShapes/Cube.Cube";
37
+ const SPHERE = "/Engine/BasicShapes/Sphere.Sphere";
38
+ const CYLINDER = "/Engine/BasicShapes/Cylinder.Cylinder";
39
+ const M_FLOOR = `${PKG}/M_Floor`;
40
+ const M_PILLAR = `${PKG}/M_Pillar`;
41
+ const M_GLOW = `${PKG}/M_Glow`;
42
+ const M_PEDESTAL = `${PKG}/M_Pedestal`;
43
+ /** Built-in flows that ship with ue-mcp. */
44
+ function defaultFlows() {
45
+ let s = 0;
46
+ const steps = {};
47
+ const step = (task, options) => {
48
+ steps[String(++s)] = { task, options };
49
+ };
50
+ // ── 1. Create level & atmosphere ──────────────────────────────────
51
+ step("level.create", { levelPath: `${PKG}/BeaconLevel` });
52
+ step("level.place_actor", { actorClass: "SkyAtmosphere", label: "Sky" });
53
+ step("level.place_actor", { actorClass: "ExponentialHeightFog", label: "Fog" });
54
+ step("level.place_actor", { actorClass: "SkyLight", label: "Ambient" });
55
+ // ── 2. Materials ──────────────────────────────────────────────────
56
+ // M_Floor — dark stone
57
+ step("material.create", { name: "M_Floor", packagePath: PKG });
58
+ step("material.set_base_color", { assetPath: M_FLOOR, color: { r: 15, g: 15, b: 18 } });
59
+ step("material.recompile", { materialPath: M_FLOOR });
60
+ // M_Pillar — brushed metallic blue-grey
61
+ step("material.create", { name: "M_Pillar", packagePath: PKG });
62
+ step("material.set_base_color", { assetPath: M_PILLAR, color: { r: 60, g: 65, b: 80 } });
63
+ step("material.add_expression", {
64
+ materialPath: M_PILLAR, expressionType: "Constant", name: "Metallic",
65
+ });
66
+ step("material.set_expression_value", {
67
+ materialPath: M_PILLAR, expressionIndex: 0, value: 1.0,
68
+ });
69
+ step("material.connect_to_property", {
70
+ materialPath: M_PILLAR, expressionName: "Metallic", property: "Metallic",
71
+ });
72
+ step("material.add_expression", {
73
+ materialPath: M_PILLAR, expressionType: "Constant", name: "Roughness",
74
+ });
75
+ step("material.set_expression_value", {
76
+ materialPath: M_PILLAR, expressionIndex: 1, value: 0.3,
77
+ });
78
+ step("material.connect_to_property", {
79
+ materialPath: M_PILLAR, expressionName: "Roughness", property: "Roughness",
80
+ });
81
+ step("material.recompile", { materialPath: M_PILLAR });
82
+ // M_Pedestal — warm stone
83
+ step("material.create", { name: "M_Pedestal", packagePath: PKG });
84
+ step("material.set_base_color", { assetPath: M_PEDESTAL, color: { r: 90, g: 80, b: 65 } });
85
+ step("material.recompile", { materialPath: M_PEDESTAL });
86
+ // M_Glow — parameterized emissive (VectorParam × Strength → EmissiveColor)
87
+ step("material.create", { name: "M_Glow", packagePath: PKG });
88
+ step("material.add_expression", {
89
+ materialPath: M_GLOW, expressionType: "VectorParameter",
90
+ name: "GlowColor", parameterName: "GlowColor",
91
+ });
92
+ step("material.add_expression", {
93
+ materialPath: M_GLOW, expressionType: "Constant", name: "GlowStrength",
94
+ });
95
+ step("material.set_expression_value", {
96
+ materialPath: M_GLOW, expressionIndex: 1, value: 50,
97
+ });
98
+ step("material.add_expression", {
99
+ materialPath: M_GLOW, expressionType: "Multiply", name: "Multiply",
100
+ });
101
+ step("material.connect_expressions", {
102
+ materialPath: M_GLOW, sourceExpression: "GlowColor",
103
+ targetExpression: "Multiply", targetInput: "A",
104
+ });
105
+ step("material.connect_expressions", {
106
+ materialPath: M_GLOW, sourceExpression: "GlowStrength",
107
+ targetExpression: "Multiply", targetInput: "B",
108
+ });
109
+ step("material.connect_to_property", {
110
+ materialPath: M_GLOW, expressionName: "Multiply", property: "EmissiveColor",
111
+ });
112
+ step("material.recompile", { materialPath: M_GLOW });
113
+ // ── 3. Geometry ───────────────────────────────────────────────────
114
+ // Floor — large dark slab
115
+ step("level.place_actor", {
116
+ actorClass: "StaticMeshActor", label: "Floor",
117
+ staticMesh: CUBE, material: M_FLOOR,
118
+ location: { x: 0, y: 0, z: -5 },
119
+ scale: { x: 25, y: 25, z: 0.1 },
120
+ });
121
+ // Center pedestal — tall cylinder
122
+ step("level.place_actor", {
123
+ actorClass: "StaticMeshActor", label: "Pedestal",
124
+ staticMesh: CYLINDER, material: M_PEDESTAL,
125
+ location: { x: 0, y: 0, z: 0 },
126
+ scale: { x: 1.5, y: 1.5, z: 3 },
127
+ });
128
+ // Glowing orb on top of pedestal
129
+ step("level.place_actor", {
130
+ actorClass: "StaticMeshActor", label: "Orb",
131
+ staticMesh: SPHERE, material: M_GLOW,
132
+ location: { x: 0, y: 0, z: 350 },
133
+ scale: { x: 1.5, y: 1.5, z: 1.5 },
134
+ });
135
+ // 5 pillars in a pentagon (radius 600, z=0)
136
+ const pillarAngles = [0, 72, 144, 216, 288];
137
+ for (let i = 0; i < pillarAngles.length; i++) {
138
+ const rad = (pillarAngles[i] * Math.PI) / 180;
139
+ const x = Math.round(600 * Math.cos(rad));
140
+ const y = Math.round(600 * Math.sin(rad));
141
+ step("level.place_actor", {
142
+ actorClass: "StaticMeshActor", label: `Pillar_${i + 1}`,
143
+ staticMesh: CUBE, material: M_PILLAR,
144
+ location: { x, y, z: 0 },
145
+ scale: { x: 0.4, y: 0.4, z: 5 },
146
+ });
147
+ }
148
+ // ── 4. Lighting ───────────────────────────────────────────────────
149
+ // Sunset directional
150
+ step("level.spawn_light", { lightType: "directional", label: "Sun", intensity: 10 });
151
+ step("level.set_light_properties", {
152
+ actorLabel: "Sun", color: { r: 255, g: 160, b: 80 },
153
+ });
154
+ step("level.move_actor", {
155
+ actorLabel: "Sun", rotation: { pitch: -25, yaw: -135 },
156
+ });
157
+ // Colored point light at each pillar
158
+ const pillarColors = [
159
+ { r: 0, g: 200, b: 255 }, // cyan
160
+ { r: 255, g: 0, b: 200 }, // magenta
161
+ { r: 255, g: 200, b: 0 }, // gold
162
+ { r: 100, g: 255, b: 50 }, // green
163
+ { r: 120, g: 80, b: 255 }, // violet
164
+ ];
165
+ for (let i = 0; i < pillarAngles.length; i++) {
166
+ const rad = (pillarAngles[i] * Math.PI) / 180;
167
+ const x = Math.round(600 * Math.cos(rad));
168
+ const y = Math.round(600 * Math.sin(rad));
169
+ step("level.spawn_light", {
170
+ lightType: "point", label: `PillarLight_${i + 1}`,
171
+ location: { x, y, z: 550 }, intensity: 80000,
172
+ });
173
+ step("level.set_light_properties", {
174
+ actorLabel: `PillarLight_${i + 1}`, color: pillarColors[i],
175
+ });
176
+ }
177
+ // Center spotlight pointing down at the orb
178
+ step("level.spawn_light", {
179
+ lightType: "spot", label: "OrbSpot",
180
+ location: { x: 0, y: 0, z: 700 }, intensity: 300000,
181
+ });
182
+ step("level.move_actor", {
183
+ actorLabel: "OrbSpot", rotation: { pitch: -90, yaw: 0 },
184
+ });
185
+ // Warm fill light from below
186
+ step("level.spawn_light", {
187
+ lightType: "point", label: "FillWarm",
188
+ location: { x: -400, y: -300, z: 100 }, intensity: 20000,
189
+ });
190
+ step("level.set_light_properties", {
191
+ actorLabel: "FillWarm", color: { r: 255, g: 200, b: 150 },
192
+ });
193
+ // Cool fill light opposite side
194
+ step("level.spawn_light", {
195
+ lightType: "point", label: "FillCool",
196
+ location: { x: 400, y: 300, z: 100 }, intensity: 15000,
197
+ });
198
+ step("level.set_light_properties", {
199
+ actorLabel: "FillCool", color: { r: 150, g: 200, b: 255 },
200
+ });
201
+ // ── 5. Camera ─────────────────────────────────────────────────────
202
+ step("editor.set_viewport", {
203
+ location: { x: -900, y: -500, z: 400 },
204
+ rotation: { pitch: -15, yaw: 30 },
205
+ });
206
+ return {
207
+ beacon: {
208
+ description: "Demo — build a shrine scene from scratch: floor, pedestal, orb, five pillars, " +
209
+ "four materials (dark stone, brushed metal, warm stone, parameterized emissive), " +
210
+ "colored lights, and atmosphere",
211
+ steps,
212
+ },
213
+ };
33
214
  }
34
215
  /**
35
216
  * Load ue-mcp.yml from the given directory, layered on top of built-in defaults.
@@ -1 +1 @@
1
- {"version":3,"file":"loader.js","sourceRoot":"","sources":["../../src/flow/loader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,UAAU,EAAqB,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAmB,MAAM,aAAa,CAAC;AAGhE;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,KAAgB;IAC5C,MAAM,KAAK,GAA4B,EAAE,CAAC;IAE1C,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,KAAK,MAAM,CAAC,UAAU,EAAE,IAAI,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;YAC9D,MAAM,QAAQ,GAAG,GAAG,IAAI,CAAC,IAAI,IAAI,UAAU,EAAE,CAAC;YAC9C,MAAM,QAAQ,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC;YAE/B,MAAM,OAAO,GAA4B;gBACvC,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,QAAQ;gBACjD,KAAK,EAAE,IAAI,CAAC,IAAI;aACjB,CAAC;YACF,IAAI,IAAI,CAAC,WAAW;gBAAE,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;YAC7D,IAAI,QAAQ;gBAAE,OAAO,CAAC,OAAO,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC;YAExD,KAAK,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC;QAC5B,CAAC;IACH,CAAC;IAED,sBAAsB;IACtB,KAAK,CAAC,OAAO,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AE,CAAC,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE;QACtC,QAAQ,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE;KAClC,CAAC,CAAC;IAEH,OAAO;QACL,MAAM,EAAE;YACN,WAAW,EACT,gFAAgF;gBAChF,kFAAkF;gBAClF,gCAAgC;YAClC,KAAK;SACN;KACF,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,cAAc,CAC5B,KAAgB,EAChB,SAAkB;IAElB,MAAM,GAAG,GAAG,SAAS,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IACvC,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;IAEhD,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;QAAE,OAAO,IAAI,CAAC;IAE5C,OAAO,UAAU,CAAC;QAChB,QAAQ,EAAE,YAAY;QACtB,MAAM,EAAE,gBAAgB;QACxB,QAAQ,EAAE,aAAa,CAAC,KAAK,CAAC;QAC9B,MAAM,EAAE,YAAY;QACpB,SAAS,EAAE,GAAG;KACf,CAAC,CAAC;AACL,CAAC"}
@@ -3,7 +3,7 @@ import { categoryTool, bp } from "../types.js";
3
3
  import { Vec3, Rotator, Color } from "../schemas.js";
4
4
  export const levelTool = categoryTool("level", "Level actors, selection, components, level management, volumes, lights, and splines.", {
5
5
  get_outliner: bp("List actors. Params: classFilter?, nameFilter?", "get_world_outliner"),
6
- place_actor: bp("Spawn actor. Params: actorClass, label?, location?, rotation?, scale?, properties?", "place_actor"),
6
+ place_actor: bp("Spawn actor. Params: actorClass, label?, location?, rotation?, scale?, staticMesh?, material?", "place_actor"),
7
7
  delete_actor: bp("Remove actor. Params: actorLabel", "delete_actor"),
8
8
  get_actor_details: bp("Inspect actor. Params: actorLabel", "get_actor_details"),
9
9
  move_actor: bp("Transform actor. Params: actorLabel, location?, rotation?, scale?", "move_actor"),
@@ -24,6 +24,7 @@ export const levelTool = categoryTool("level", "Level actors, selection, compone
24
24
  build_lighting: bp("Build lights. Params: quality?", "build_lighting"),
25
25
  get_spline_info: bp("Read spline. Params: actorLabel", "get_spline_info"),
26
26
  set_spline_points: bp("Set spline points. Params: actorLabel, points[], closedLoop?", "set_spline_points"),
27
+ set_actor_material: bp("Set material on actor. Params: actorLabel, materialPath, slotIndex?", "set_actor_material"),
27
28
  get_world_settings: bp("Read world settings (GameMode, KillZ, gravity, etc.)", "get_world_settings"),
28
29
  set_world_settings: bp("Set world settings. Params: defaultGameMode?, killZ?, globalGravityZ?, enableWorldBoundsChecks?", "set_world_settings"),
29
30
  }, undefined, // actionDocs auto-generated from descriptions
@@ -49,6 +50,10 @@ export const levelTool = categoryTool("level", "Level actors, selection, compone
49
50
  quality: z.string().optional(),
50
51
  points: z.array(Vec3).optional(),
51
52
  closedLoop: z.boolean().optional(),
53
+ staticMesh: z.string().optional().describe("Asset path for static mesh (e.g. /Engine/BasicShapes/Cube.Cube)"),
54
+ material: z.string().optional().describe("Asset path for material to apply at slot 0"),
55
+ materialPath: z.string().optional().describe("Material asset path for set_actor_material"),
56
+ slotIndex: z.number().optional().describe("Material slot index (default 0)"),
52
57
  defaultGameMode: z.string().optional(),
53
58
  killZ: z.number().optional(),
54
59
  globalGravityZ: z.number().optional(),
@@ -1 +1 @@
1
- {"version":3,"file":"level.js","sourceRoot":"","sources":["../../src/tools/level.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,EAAE,EAAgB,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAErD,MAAM,CAAC,MAAM,SAAS,GAAY,YAAY,CAC5C,OAAO,EACP,sFAAsF,EACtF;IACE,YAAY,EAAQ,EAAE,CAAC,gDAAgD,EAAE,oBAAoB,CAAC;IAC9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Q,CAAC,iEAAiE,CAAC;IAC7G,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,4CAA4C,CAAC;IACtF,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,4CAA4C,CAAC;IAC1F,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,iCAAiC,CAAC;IAC5E,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACtC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACrC,uBAAuB,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CAChD,CACF,CAAC"}
@@ -406,7 +406,7 @@ tasks:
406
406
  level.place_actor:
407
407
  class_path: ue-mcp.bridge
408
408
  group: level
409
- description: "Spawn actor. Params: actorClass, label?, location?, rotation?, scale?, properties?"
409
+ description: "Spawn actor. Params: actorClass, label?, location?, rotation?, scale?, staticMesh?, material?"
410
410
  options:
411
411
  method: place_actor
412
412
  level.delete_actor:
@@ -529,6 +529,12 @@ tasks:
529
529
  description: "Set spline points. Params: actorLabel, points[], closedLoop?"
530
530
  options:
531
531
  method: set_spline_points
532
+ level.set_actor_material:
533
+ class_path: ue-mcp.bridge
534
+ group: level
535
+ description: "Set material on actor. Params: actorLabel, materialPath, slotIndex?"
536
+ options:
537
+ method: set_actor_material
532
538
  level.get_world_settings:
533
539
  class_path: ue-mcp.bridge
534
540
  group: level
@@ -1846,4 +1852,348 @@ tasks:
1846
1852
  group: feedback
1847
1853
  description: "Submit feedback about a tool gap. Params: title, summary, pythonWorkaround?, idealTool?"
1848
1854
 
1849
- flows: {}
1855
+ flows:
1856
+
1857
+ beacon:
1858
+ description: "Demo — build a shrine scene from scratch: floor, pedestal, orb, five pillars, four materials (dark stone, brushed metal, warm stone, parameterized emissive), colored lights, and atmosphere"
1859
+ steps:
1860
+ 1:
1861
+ task: level.create
1862
+ options:
1863
+ levelPath: /Game/Flows/Beacon/BeaconLevel
1864
+ 2:
1865
+ task: level.place_actor
1866
+ options:
1867
+ actorClass: SkyAtmosphere
1868
+ label: Sky
1869
+ 3:
1870
+ task: level.place_actor
1871
+ options:
1872
+ actorClass: ExponentialHeightFog
1873
+ label: Fog
1874
+ 4:
1875
+ task: level.place_actor
1876
+ options:
1877
+ actorClass: SkyLight
1878
+ label: Ambient
1879
+ 5:
1880
+ task: material.create
1881
+ options:
1882
+ name: M_Floor
1883
+ packagePath: /Game/Flows/Beacon
1884
+ 6:
1885
+ task: material.set_base_color
1886
+ options:
1887
+ assetPath: /Game/Flows/Beacon/M_Floor
1888
+ color: { r: 15, g: 15, b: 18 }
1889
+ 7:
1890
+ task: material.recompile
1891
+ options:
1892
+ materialPath: /Game/Flows/Beacon/M_Floor
1893
+ 8:
1894
+ task: material.create
1895
+ options:
1896
+ name: M_Pillar
1897
+ packagePath: /Game/Flows/Beacon
1898
+ 9:
1899
+ task: material.set_base_color
1900
+ options:
1901
+ assetPath: /Game/Flows/Beacon/M_Pillar
1902
+ color: { r: 60, g: 65, b: 80 }
1903
+ 10:
1904
+ task: material.add_expression
1905
+ options:
1906
+ materialPath: /Game/Flows/Beacon/M_Pillar
1907
+ expressionType: Constant
1908
+ name: Metallic
1909
+ 11:
1910
+ task: material.set_expression_value
1911
+ options:
1912
+ materialPath: /Game/Flows/Beacon/M_Pillar
1913
+ expressionIndex: 0
1914
+ value: 1
1915
+ 12:
1916
+ task: material.connect_to_property
1917
+ options:
1918
+ materialPath: /Game/Flows/Beacon/M_Pillar
1919
+ expressionName: Metallic
1920
+ property: Metallic
1921
+ 13:
1922
+ task: material.add_expression
1923
+ options:
1924
+ materialPath: /Game/Flows/Beacon/M_Pillar
1925
+ expressionType: Constant
1926
+ name: Roughness
1927
+ 14:
1928
+ task: material.set_expression_value
1929
+ options:
1930
+ materialPath: /Game/Flows/Beacon/M_Pillar
1931
+ expressionIndex: 1
1932
+ value: 0.3
1933
+ 15:
1934
+ task: material.connect_to_property
1935
+ options:
1936
+ materialPath: /Game/Flows/Beacon/M_Pillar
1937
+ expressionName: Roughness
1938
+ property: Roughness
1939
+ 16:
1940
+ task: material.recompile
1941
+ options:
1942
+ materialPath: /Game/Flows/Beacon/M_Pillar
1943
+ 17:
1944
+ task: material.create
1945
+ options:
1946
+ name: M_Pedestal
1947
+ packagePath: /Game/Flows/Beacon
1948
+ 18:
1949
+ task: material.set_base_color
1950
+ options:
1951
+ assetPath: /Game/Flows/Beacon/M_Pedestal
1952
+ color: { r: 90, g: 80, b: 65 }
1953
+ 19:
1954
+ task: material.recompile
1955
+ options:
1956
+ materialPath: /Game/Flows/Beacon/M_Pedestal
1957
+ 20:
1958
+ task: material.create
1959
+ options:
1960
+ name: M_Glow
1961
+ packagePath: /Game/Flows/Beacon
1962
+ 21:
1963
+ task: material.add_expression
1964
+ options:
1965
+ materialPath: /Game/Flows/Beacon/M_Glow
1966
+ expressionType: VectorParameter
1967
+ name: GlowColor
1968
+ parameterName: GlowColor
1969
+ 22:
1970
+ task: material.add_expression
1971
+ options:
1972
+ materialPath: /Game/Flows/Beacon/M_Glow
1973
+ expressionType: Constant
1974
+ name: GlowStrength
1975
+ 23:
1976
+ task: material.set_expression_value
1977
+ options:
1978
+ materialPath: /Game/Flows/Beacon/M_Glow
1979
+ expressionIndex: 1
1980
+ value: 50
1981
+ 24:
1982
+ task: material.add_expression
1983
+ options:
1984
+ materialPath: /Game/Flows/Beacon/M_Glow
1985
+ expressionType: Multiply
1986
+ name: Multiply
1987
+ 25:
1988
+ task: material.connect_expressions
1989
+ options:
1990
+ materialPath: /Game/Flows/Beacon/M_Glow
1991
+ sourceExpression: GlowColor
1992
+ targetExpression: Multiply
1993
+ targetInput: A
1994
+ 26:
1995
+ task: material.connect_expressions
1996
+ options:
1997
+ materialPath: /Game/Flows/Beacon/M_Glow
1998
+ sourceExpression: GlowStrength
1999
+ targetExpression: Multiply
2000
+ targetInput: B
2001
+ 27:
2002
+ task: material.connect_to_property
2003
+ options:
2004
+ materialPath: /Game/Flows/Beacon/M_Glow
2005
+ expressionName: Multiply
2006
+ property: EmissiveColor
2007
+ 28:
2008
+ task: material.recompile
2009
+ options:
2010
+ materialPath: /Game/Flows/Beacon/M_Glow
2011
+ 29:
2012
+ task: level.place_actor
2013
+ options:
2014
+ actorClass: StaticMeshActor
2015
+ label: Floor
2016
+ staticMesh: /Engine/BasicShapes/Cube.Cube
2017
+ material: /Game/Flows/Beacon/M_Floor
2018
+ location: { x: 0, y: 0, z: -5 }
2019
+ scale: { x: 25, y: 25, z: 0.1 }
2020
+ 30:
2021
+ task: level.place_actor
2022
+ options:
2023
+ actorClass: StaticMeshActor
2024
+ label: Pedestal
2025
+ staticMesh: /Engine/BasicShapes/Cylinder.Cylinder
2026
+ material: /Game/Flows/Beacon/M_Pedestal
2027
+ location: { x: 0, y: 0, z: 0 }
2028
+ scale: { x: 1.5, y: 1.5, z: 3 }
2029
+ 31:
2030
+ task: level.place_actor
2031
+ options:
2032
+ actorClass: StaticMeshActor
2033
+ label: Orb
2034
+ staticMesh: /Engine/BasicShapes/Sphere.Sphere
2035
+ material: /Game/Flows/Beacon/M_Glow
2036
+ location: { x: 0, y: 0, z: 350 }
2037
+ scale: { x: 1.5, y: 1.5, z: 1.5 }
2038
+ 32:
2039
+ task: level.place_actor
2040
+ options:
2041
+ actorClass: StaticMeshActor
2042
+ label: Pillar_1
2043
+ staticMesh: /Engine/BasicShapes/Cube.Cube
2044
+ material: /Game/Flows/Beacon/M_Pillar
2045
+ location: { x: 600, y: 0, z: 0 }
2046
+ scale: { x: 0.4, y: 0.4, z: 5 }
2047
+ 33:
2048
+ task: level.place_actor
2049
+ options:
2050
+ actorClass: StaticMeshActor
2051
+ label: Pillar_2
2052
+ staticMesh: /Engine/BasicShapes/Cube.Cube
2053
+ material: /Game/Flows/Beacon/M_Pillar
2054
+ location: { x: 185, y: 571, z: 0 }
2055
+ scale: { x: 0.4, y: 0.4, z: 5 }
2056
+ 34:
2057
+ task: level.place_actor
2058
+ options:
2059
+ actorClass: StaticMeshActor
2060
+ label: Pillar_3
2061
+ staticMesh: /Engine/BasicShapes/Cube.Cube
2062
+ material: /Game/Flows/Beacon/M_Pillar
2063
+ location: { x: -485, y: 353, z: 0 }
2064
+ scale: { x: 0.4, y: 0.4, z: 5 }
2065
+ 35:
2066
+ task: level.place_actor
2067
+ options:
2068
+ actorClass: StaticMeshActor
2069
+ label: Pillar_4
2070
+ staticMesh: /Engine/BasicShapes/Cube.Cube
2071
+ material: /Game/Flows/Beacon/M_Pillar
2072
+ location: { x: -485, y: -353, z: 0 }
2073
+ scale: { x: 0.4, y: 0.4, z: 5 }
2074
+ 36:
2075
+ task: level.place_actor
2076
+ options:
2077
+ actorClass: StaticMeshActor
2078
+ label: Pillar_5
2079
+ staticMesh: /Engine/BasicShapes/Cube.Cube
2080
+ material: /Game/Flows/Beacon/M_Pillar
2081
+ location: { x: 185, y: -571, z: 0 }
2082
+ scale: { x: 0.4, y: 0.4, z: 5 }
2083
+ 37:
2084
+ task: level.spawn_light
2085
+ options:
2086
+ lightType: directional
2087
+ label: Sun
2088
+ intensity: 10
2089
+ 38:
2090
+ task: level.set_light_properties
2091
+ options:
2092
+ actorLabel: Sun
2093
+ color: { r: 255, g: 160, b: 80 }
2094
+ 39:
2095
+ task: level.move_actor
2096
+ options:
2097
+ actorLabel: Sun
2098
+ rotation: { pitch: -25, yaw: -135 }
2099
+ 40:
2100
+ task: level.spawn_light
2101
+ options:
2102
+ lightType: point
2103
+ label: PillarLight_1
2104
+ location: { x: 600, y: 0, z: 550 }
2105
+ intensity: 80000
2106
+ 41:
2107
+ task: level.set_light_properties
2108
+ options:
2109
+ actorLabel: PillarLight_1
2110
+ color: { r: 0, g: 200, b: 255 }
2111
+ 42:
2112
+ task: level.spawn_light
2113
+ options:
2114
+ lightType: point
2115
+ label: PillarLight_2
2116
+ location: { x: 185, y: 571, z: 550 }
2117
+ intensity: 80000
2118
+ 43:
2119
+ task: level.set_light_properties
2120
+ options:
2121
+ actorLabel: PillarLight_2
2122
+ color: { r: 255, g: 0, b: 200 }
2123
+ 44:
2124
+ task: level.spawn_light
2125
+ options:
2126
+ lightType: point
2127
+ label: PillarLight_3
2128
+ location: { x: -485, y: 353, z: 550 }
2129
+ intensity: 80000
2130
+ 45:
2131
+ task: level.set_light_properties
2132
+ options:
2133
+ actorLabel: PillarLight_3
2134
+ color: { r: 255, g: 200, b: 0 }
2135
+ 46:
2136
+ task: level.spawn_light
2137
+ options:
2138
+ lightType: point
2139
+ label: PillarLight_4
2140
+ location: { x: -485, y: -353, z: 550 }
2141
+ intensity: 80000
2142
+ 47:
2143
+ task: level.set_light_properties
2144
+ options:
2145
+ actorLabel: PillarLight_4
2146
+ color: { r: 100, g: 255, b: 50 }
2147
+ 48:
2148
+ task: level.spawn_light
2149
+ options:
2150
+ lightType: point
2151
+ label: PillarLight_5
2152
+ location: { x: 185, y: -571, z: 550 }
2153
+ intensity: 80000
2154
+ 49:
2155
+ task: level.set_light_properties
2156
+ options:
2157
+ actorLabel: PillarLight_5
2158
+ color: { r: 120, g: 80, b: 255 }
2159
+ 50:
2160
+ task: level.spawn_light
2161
+ options:
2162
+ lightType: spot
2163
+ label: OrbSpot
2164
+ location: { x: 0, y: 0, z: 700 }
2165
+ intensity: 300000
2166
+ 51:
2167
+ task: level.move_actor
2168
+ options:
2169
+ actorLabel: OrbSpot
2170
+ rotation: { pitch: -90, yaw: 0 }
2171
+ 52:
2172
+ task: level.spawn_light
2173
+ options:
2174
+ lightType: point
2175
+ label: FillWarm
2176
+ location: { x: -400, y: -300, z: 100 }
2177
+ intensity: 20000
2178
+ 53:
2179
+ task: level.set_light_properties
2180
+ options:
2181
+ actorLabel: FillWarm
2182
+ color: { r: 255, g: 200, b: 150 }
2183
+ 54:
2184
+ task: level.spawn_light
2185
+ options:
2186
+ lightType: point
2187
+ label: FillCool
2188
+ location: { x: 400, y: 300, z: 100 }
2189
+ intensity: 15000
2190
+ 55:
2191
+ task: level.set_light_properties
2192
+ options:
2193
+ actorLabel: FillCool
2194
+ color: { r: 150, g: 200, b: 255 }
2195
+ 56:
2196
+ task: editor.set_viewport
2197
+ options:
2198
+ location: { x: -900, y: -500, z: 400 }
2199
+ rotation: { pitch: -15, yaw: 30 }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ue-mcp",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "description": "Unreal Engine MCP server — 19 tools, 300+ actions for AI-driven editor control",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -38,6 +38,10 @@
38
38
  #include "FileHelpers.h"
39
39
  #include "GameFramework/WorldSettings.h"
40
40
  #include "GameFramework/GameModeBase.h"
41
+ #include "Engine/StaticMeshActor.h"
42
+ #include "Components/StaticMeshComponent.h"
43
+ #include "Engine/StaticMesh.h"
44
+ #include "Materials/MaterialInterface.h"
41
45
 
42
46
  void FLevelHandlers::RegisterHandlers(FMCPHandlerRegistry& Registry)
43
47
  {
@@ -59,6 +63,7 @@ void FLevelHandlers::RegisterHandlers(FMCPHandlerRegistry& Registry)
59
63
  Registry.RegisterHandler(TEXT("save_level"), &SaveLevel);
60
64
  Registry.RegisterHandler(TEXT("list_sublevels"), &ListSublevels);
61
65
  Registry.RegisterHandler(TEXT("set_component_property"), &SetComponentProperty);
66
+ Registry.RegisterHandler(TEXT("set_actor_material"), &SetActorMaterial);
62
67
  Registry.RegisterHandler(TEXT("set_volume_properties"), &SetVolumeProperties);
63
68
  Registry.RegisterHandler(TEXT("get_world_settings"), &GetWorldSettings);
64
69
  Registry.RegisterHandler(TEXT("set_world_settings"), &SetWorldSettings);
@@ -159,7 +164,7 @@ TSharedPtr<FJsonValue> FLevelHandlers::PlaceActor(const TSharedPtr<FJsonObject>&
159
164
  return MCPError(FString::Printf(TEXT("Actor class not found: %s"), *ActorClass));
160
165
  }
161
166
 
162
- // Get location
167
+ // Location
163
168
  FVector Location = FVector::ZeroVector;
164
169
  const TSharedPtr<FJsonObject>* LocationObj = nullptr;
165
170
  if (Params->TryGetObjectField(TEXT("location"), LocationObj))
@@ -169,14 +174,72 @@ TSharedPtr<FJsonValue> FLevelHandlers::PlaceActor(const TSharedPtr<FJsonObject>&
169
174
  (*LocationObj)->TryGetNumberField(TEXT("z"), Location.Z);
170
175
  }
171
176
 
172
- // Spawn actor
173
- FTransform SpawnTransform(FRotator::ZeroRotator, Location);
177
+ // Rotation
178
+ FRotator Rotation = FRotator::ZeroRotator;
179
+ const TSharedPtr<FJsonObject>* RotObj = nullptr;
180
+ if (Params->TryGetObjectField(TEXT("rotation"), RotObj))
181
+ {
182
+ (*RotObj)->TryGetNumberField(TEXT("pitch"), Rotation.Pitch);
183
+ (*RotObj)->TryGetNumberField(TEXT("yaw"), Rotation.Yaw);
184
+ (*RotObj)->TryGetNumberField(TEXT("roll"), Rotation.Roll);
185
+ }
186
+
187
+ // Spawn
188
+ FTransform SpawnTransform(Rotation, Location);
174
189
  AActor* NewActor = World->SpawnActor<AActor>(Class, SpawnTransform);
175
190
  if (!NewActor)
176
191
  {
177
192
  return MCPError(TEXT("Failed to spawn actor"));
178
193
  }
179
194
 
195
+ // Label
196
+ FString Label = OptionalString(Params, TEXT("label"));
197
+ if (!Label.IsEmpty())
198
+ {
199
+ NewActor->SetActorLabel(Label);
200
+ }
201
+
202
+ // Scale
203
+ const TSharedPtr<FJsonObject>* ScaleObj = nullptr;
204
+ if (Params->TryGetObjectField(TEXT("scale"), ScaleObj))
205
+ {
206
+ FVector Scale = FVector::OneVector;
207
+ (*ScaleObj)->TryGetNumberField(TEXT("x"), Scale.X);
208
+ (*ScaleObj)->TryGetNumberField(TEXT("y"), Scale.Y);
209
+ (*ScaleObj)->TryGetNumberField(TEXT("z"), Scale.Z);
210
+ NewActor->SetActorScale3D(Scale);
211
+ }
212
+
213
+ // Static mesh shorthand — set mesh on StaticMeshActor
214
+ FString StaticMeshPath = OptionalString(Params, TEXT("staticMesh"));
215
+ if (!StaticMeshPath.IsEmpty())
216
+ {
217
+ AStaticMeshActor* MeshActor = Cast<AStaticMeshActor>(NewActor);
218
+ if (MeshActor && MeshActor->GetStaticMeshComponent())
219
+ {
220
+ UStaticMesh* Mesh = LoadObject<UStaticMesh>(nullptr, *StaticMeshPath);
221
+ if (Mesh)
222
+ {
223
+ MeshActor->GetStaticMeshComponent()->SetStaticMesh(Mesh);
224
+ }
225
+ }
226
+ }
227
+
228
+ // Material shorthand — apply to first primitive component, slot 0
229
+ FString MaterialPath = OptionalString(Params, TEXT("material"));
230
+ if (!MaterialPath.IsEmpty())
231
+ {
232
+ UMaterialInterface* Material = LoadObject<UMaterialInterface>(nullptr, *MaterialPath);
233
+ if (Material)
234
+ {
235
+ UPrimitiveComponent* PrimComp = NewActor->FindComponentByClass<UPrimitiveComponent>();
236
+ if (PrimComp)
237
+ {
238
+ PrimComp->SetMaterial(0, Material);
239
+ }
240
+ }
241
+ }
242
+
180
243
  auto Result = MCPSuccess();
181
244
  Result->SetStringField(TEXT("actorLabel"), NewActor->GetActorLabel());
182
245
  Result->SetStringField(TEXT("actorClass"), ActorClass);
@@ -1178,3 +1241,53 @@ TSharedPtr<FJsonValue> FLevelHandlers::SetWorldSettings(const TSharedPtr<FJsonOb
1178
1241
 
1179
1242
  return MCPResult(Result);
1180
1243
  }
1244
+
1245
+ TSharedPtr<FJsonValue> FLevelHandlers::SetActorMaterial(const TSharedPtr<FJsonObject>& Params)
1246
+ {
1247
+ FString ActorLabel;
1248
+ if (auto Err = RequireString(Params, TEXT("actorLabel"), ActorLabel)) return Err;
1249
+
1250
+ FString MaterialPath;
1251
+ if (auto Err = RequireString(Params, TEXT("materialPath"), MaterialPath)) return Err;
1252
+
1253
+ int32 SlotIndex = OptionalInt(Params, TEXT("slotIndex"), 0);
1254
+
1255
+ REQUIRE_EDITOR_WORLD(World);
1256
+
1257
+ AActor* Actor = nullptr;
1258
+ for (TActorIterator<AActor> It(World); It; ++It)
1259
+ {
1260
+ if (It->GetActorLabel() == ActorLabel)
1261
+ {
1262
+ Actor = *It;
1263
+ break;
1264
+ }
1265
+ }
1266
+
1267
+ if (!Actor)
1268
+ {
1269
+ return MCPError(FString::Printf(TEXT("Actor not found: %s"), *ActorLabel));
1270
+ }
1271
+
1272
+ UMaterialInterface* Material = LoadObject<UMaterialInterface>(nullptr, *MaterialPath);
1273
+ if (!Material)
1274
+ {
1275
+ return MCPError(FString::Printf(TEXT("Material not found: %s"), *MaterialPath));
1276
+ }
1277
+
1278
+ UPrimitiveComponent* PrimComp = Actor->FindComponentByClass<UPrimitiveComponent>();
1279
+ if (!PrimComp)
1280
+ {
1281
+ return MCPError(FString::Printf(TEXT("Actor '%s' has no primitive component"), *ActorLabel));
1282
+ }
1283
+
1284
+ PrimComp->SetMaterial(SlotIndex, Material);
1285
+ PrimComp->MarkRenderStateDirty();
1286
+
1287
+ auto Result = MCPSuccess();
1288
+ Result->SetStringField(TEXT("actorLabel"), ActorLabel);
1289
+ Result->SetStringField(TEXT("materialPath"), MaterialPath);
1290
+ Result->SetNumberField(TEXT("slotIndex"), SlotIndex);
1291
+
1292
+ return MCPResult(Result);
1293
+ }
@@ -33,4 +33,5 @@ private:
33
33
  static TSharedPtr<FJsonValue> SetVolumeProperties(const TSharedPtr<FJsonObject>& Params);
34
34
  static TSharedPtr<FJsonValue> GetWorldSettings(const TSharedPtr<FJsonObject>& Params);
35
35
  static TSharedPtr<FJsonValue> SetWorldSettings(const TSharedPtr<FJsonObject>& Params);
36
+ static TSharedPtr<FJsonValue> SetActorMaterial(const TSharedPtr<FJsonObject>& Params);
36
37
  };