unreal-engine-mcp-server 0.2.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.
- package/.dockerignore +57 -0
- package/.env.production +25 -0
- package/.eslintrc.json +54 -0
- package/.github/workflows/publish-mcp.yml +75 -0
- package/Dockerfile +54 -0
- package/LICENSE +21 -0
- package/Public/icon.png +0 -0
- package/README.md +209 -0
- package/claude_desktop_config_example.json +13 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.js +7 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.js +484 -0
- package/dist/prompts/index.d.ts +14 -0
- package/dist/prompts/index.js +38 -0
- package/dist/python-utils.d.ts +29 -0
- package/dist/python-utils.js +54 -0
- package/dist/resources/actors.d.ts +13 -0
- package/dist/resources/actors.js +83 -0
- package/dist/resources/assets.d.ts +23 -0
- package/dist/resources/assets.js +245 -0
- package/dist/resources/levels.d.ts +17 -0
- package/dist/resources/levels.js +94 -0
- package/dist/tools/actors.d.ts +51 -0
- package/dist/tools/actors.js +459 -0
- package/dist/tools/animation.d.ts +196 -0
- package/dist/tools/animation.js +579 -0
- package/dist/tools/assets.d.ts +21 -0
- package/dist/tools/assets.js +304 -0
- package/dist/tools/audio.d.ts +170 -0
- package/dist/tools/audio.js +416 -0
- package/dist/tools/blueprint.d.ts +144 -0
- package/dist/tools/blueprint.js +652 -0
- package/dist/tools/build_environment_advanced.d.ts +66 -0
- package/dist/tools/build_environment_advanced.js +484 -0
- package/dist/tools/consolidated-tool-definitions.d.ts +2598 -0
- package/dist/tools/consolidated-tool-definitions.js +607 -0
- package/dist/tools/consolidated-tool-handlers.d.ts +2 -0
- package/dist/tools/consolidated-tool-handlers.js +1050 -0
- package/dist/tools/debug.d.ts +185 -0
- package/dist/tools/debug.js +265 -0
- package/dist/tools/editor.d.ts +88 -0
- package/dist/tools/editor.js +365 -0
- package/dist/tools/engine.d.ts +30 -0
- package/dist/tools/engine.js +36 -0
- package/dist/tools/foliage.d.ts +155 -0
- package/dist/tools/foliage.js +525 -0
- package/dist/tools/introspection.d.ts +98 -0
- package/dist/tools/introspection.js +683 -0
- package/dist/tools/landscape.d.ts +158 -0
- package/dist/tools/landscape.js +375 -0
- package/dist/tools/level.d.ts +110 -0
- package/dist/tools/level.js +362 -0
- package/dist/tools/lighting.d.ts +159 -0
- package/dist/tools/lighting.js +1179 -0
- package/dist/tools/materials.d.ts +34 -0
- package/dist/tools/materials.js +146 -0
- package/dist/tools/niagara.d.ts +145 -0
- package/dist/tools/niagara.js +289 -0
- package/dist/tools/performance.d.ts +163 -0
- package/dist/tools/performance.js +412 -0
- package/dist/tools/physics.d.ts +189 -0
- package/dist/tools/physics.js +784 -0
- package/dist/tools/rc.d.ts +110 -0
- package/dist/tools/rc.js +363 -0
- package/dist/tools/sequence.d.ts +112 -0
- package/dist/tools/sequence.js +675 -0
- package/dist/tools/tool-definitions.d.ts +4919 -0
- package/dist/tools/tool-definitions.js +891 -0
- package/dist/tools/tool-handlers.d.ts +47 -0
- package/dist/tools/tool-handlers.js +830 -0
- package/dist/tools/ui.d.ts +171 -0
- package/dist/tools/ui.js +337 -0
- package/dist/tools/visual.d.ts +29 -0
- package/dist/tools/visual.js +67 -0
- package/dist/types/env.d.ts +10 -0
- package/dist/types/env.js +18 -0
- package/dist/types/index.d.ts +323 -0
- package/dist/types/index.js +28 -0
- package/dist/types/tool-types.d.ts +274 -0
- package/dist/types/tool-types.js +13 -0
- package/dist/unreal-bridge.d.ts +126 -0
- package/dist/unreal-bridge.js +992 -0
- package/dist/utils/cache-manager.d.ts +64 -0
- package/dist/utils/cache-manager.js +176 -0
- package/dist/utils/error-handler.d.ts +66 -0
- package/dist/utils/error-handler.js +243 -0
- package/dist/utils/errors.d.ts +133 -0
- package/dist/utils/errors.js +256 -0
- package/dist/utils/http.d.ts +26 -0
- package/dist/utils/http.js +135 -0
- package/dist/utils/logger.d.ts +12 -0
- package/dist/utils/logger.js +32 -0
- package/dist/utils/normalize.d.ts +17 -0
- package/dist/utils/normalize.js +49 -0
- package/dist/utils/response-validator.d.ts +34 -0
- package/dist/utils/response-validator.js +121 -0
- package/dist/utils/safe-json.d.ts +4 -0
- package/dist/utils/safe-json.js +97 -0
- package/dist/utils/stdio-redirect.d.ts +2 -0
- package/dist/utils/stdio-redirect.js +20 -0
- package/dist/utils/validation.d.ts +50 -0
- package/dist/utils/validation.js +173 -0
- package/mcp-config-example.json +14 -0
- package/package.json +63 -0
- package/server.json +60 -0
- package/src/cli.ts +7 -0
- package/src/index.ts +543 -0
- package/src/prompts/index.ts +51 -0
- package/src/python/editor_compat.py +181 -0
- package/src/python-utils.ts +57 -0
- package/src/resources/actors.ts +92 -0
- package/src/resources/assets.ts +251 -0
- package/src/resources/levels.ts +83 -0
- package/src/tools/actors.ts +480 -0
- package/src/tools/animation.ts +713 -0
- package/src/tools/assets.ts +305 -0
- package/src/tools/audio.ts +548 -0
- package/src/tools/blueprint.ts +736 -0
- package/src/tools/build_environment_advanced.ts +526 -0
- package/src/tools/consolidated-tool-definitions.ts +619 -0
- package/src/tools/consolidated-tool-handlers.ts +1093 -0
- package/src/tools/debug.ts +368 -0
- package/src/tools/editor.ts +360 -0
- package/src/tools/engine.ts +32 -0
- package/src/tools/foliage.ts +652 -0
- package/src/tools/introspection.ts +778 -0
- package/src/tools/landscape.ts +523 -0
- package/src/tools/level.ts +410 -0
- package/src/tools/lighting.ts +1316 -0
- package/src/tools/materials.ts +148 -0
- package/src/tools/niagara.ts +312 -0
- package/src/tools/performance.ts +549 -0
- package/src/tools/physics.ts +924 -0
- package/src/tools/rc.ts +437 -0
- package/src/tools/sequence.ts +791 -0
- package/src/tools/tool-definitions.ts +907 -0
- package/src/tools/tool-handlers.ts +941 -0
- package/src/tools/ui.ts +499 -0
- package/src/tools/visual.ts +60 -0
- package/src/types/env.ts +27 -0
- package/src/types/index.ts +414 -0
- package/src/types/tool-types.ts +343 -0
- package/src/unreal-bridge.ts +1118 -0
- package/src/utils/cache-manager.ts +213 -0
- package/src/utils/error-handler.ts +320 -0
- package/src/utils/errors.ts +312 -0
- package/src/utils/http.ts +184 -0
- package/src/utils/logger.ts +30 -0
- package/src/utils/normalize.ts +54 -0
- package/src/utils/response-validator.ts +145 -0
- package/src/utils/safe-json.ts +112 -0
- package/src/utils/stdio-redirect.ts +18 -0
- package/src/utils/validation.ts +212 -0
- package/tsconfig.json +33 -0
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auto-generated TypeScript types from tool schemas
|
|
3
|
+
* This provides type safety and IntelliSense support
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
// Base response types
|
|
7
|
+
export interface BaseToolResponse {
|
|
8
|
+
success: boolean;
|
|
9
|
+
message?: string;
|
|
10
|
+
error?: string;
|
|
11
|
+
warning?: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// Asset Management Types
|
|
15
|
+
export interface AssetInfo {
|
|
16
|
+
Name: string;
|
|
17
|
+
Path: string;
|
|
18
|
+
Class?: string;
|
|
19
|
+
PackagePath?: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface ManageAssetResponse extends BaseToolResponse {
|
|
23
|
+
assets?: AssetInfo[];
|
|
24
|
+
paths?: string[];
|
|
25
|
+
materialPath?: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// Actor Control Types
|
|
29
|
+
export interface Vector3D {
|
|
30
|
+
x: number;
|
|
31
|
+
y: number;
|
|
32
|
+
z: number;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface Rotation3D {
|
|
36
|
+
pitch: number;
|
|
37
|
+
yaw: number;
|
|
38
|
+
roll: number;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface ControlActorResponse extends BaseToolResponse {
|
|
42
|
+
actor?: string;
|
|
43
|
+
deleted?: string;
|
|
44
|
+
physicsEnabled?: boolean;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// Editor Control Types
|
|
48
|
+
export interface ControlEditorResponse extends BaseToolResponse {
|
|
49
|
+
playing?: boolean;
|
|
50
|
+
location?: [number, number, number];
|
|
51
|
+
rotation?: [number, number, number];
|
|
52
|
+
viewMode?: string;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Level Management Types
|
|
56
|
+
export interface ManageLevelResponse extends BaseToolResponse {
|
|
57
|
+
levelName?: string;
|
|
58
|
+
loaded?: boolean;
|
|
59
|
+
visible?: boolean;
|
|
60
|
+
lightName?: string;
|
|
61
|
+
buildQuality?: string;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// Animation & Physics Types
|
|
65
|
+
export interface AnimationPhysicsResponse extends BaseToolResponse {
|
|
66
|
+
blueprintPath?: string;
|
|
67
|
+
playing?: boolean;
|
|
68
|
+
playRate?: number;
|
|
69
|
+
ragdollActive?: boolean;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// Effects System Types
|
|
73
|
+
export interface CreateEffectResponse extends BaseToolResponse {
|
|
74
|
+
effectName?: string;
|
|
75
|
+
effectPath?: string;
|
|
76
|
+
spawned?: boolean;
|
|
77
|
+
location?: [number, number, number];
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// Blueprint Manager Types
|
|
81
|
+
export interface ManageBlueprintResponse extends BaseToolResponse {
|
|
82
|
+
blueprintPath?: string;
|
|
83
|
+
componentAdded?: string;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// Environment Builder Types
|
|
87
|
+
export interface BuildEnvironmentResponse extends BaseToolResponse {
|
|
88
|
+
landscapeName?: string;
|
|
89
|
+
foliageTypeName?: string;
|
|
90
|
+
instancesPlaced?: number;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// System Control Types
|
|
94
|
+
export interface SystemControlResponse extends BaseToolResponse {
|
|
95
|
+
profiling?: boolean;
|
|
96
|
+
fpsVisible?: boolean;
|
|
97
|
+
qualityLevel?: number;
|
|
98
|
+
soundPlaying?: boolean;
|
|
99
|
+
widgetPath?: string;
|
|
100
|
+
widgetVisible?: boolean;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// Console Command Types
|
|
104
|
+
export interface ConsoleCommandResponse extends BaseToolResponse {
|
|
105
|
+
command?: string;
|
|
106
|
+
result?: any;
|
|
107
|
+
info?: string;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// Verification Types
|
|
111
|
+
export interface VerifyEnvironmentResponse extends BaseToolResponse {
|
|
112
|
+
exists?: boolean;
|
|
113
|
+
count?: number;
|
|
114
|
+
actual?: number;
|
|
115
|
+
method?: string;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// Tool parameter types
|
|
119
|
+
export interface ToolParameters {
|
|
120
|
+
// Asset Management
|
|
121
|
+
ListAssetsParams: {
|
|
122
|
+
directory: string;
|
|
123
|
+
recursive?: boolean;
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
ImportAssetParams: {
|
|
127
|
+
sourcePath: string;
|
|
128
|
+
destinationPath: string;
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
CreateMaterialParams: {
|
|
132
|
+
name: string;
|
|
133
|
+
path: string;
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
// Actor Control
|
|
137
|
+
SpawnActorParams: {
|
|
138
|
+
classPath: string;
|
|
139
|
+
location?: Vector3D;
|
|
140
|
+
rotation?: Rotation3D;
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
DeleteActorParams: {
|
|
144
|
+
actorName: string;
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
ApplyForceParams: {
|
|
148
|
+
actorName: string;
|
|
149
|
+
force: Vector3D;
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
// Editor Control
|
|
153
|
+
SetCameraParams: {
|
|
154
|
+
location?: Vector3D;
|
|
155
|
+
rotation?: Rotation3D;
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
SetViewModeParams: {
|
|
159
|
+
mode: string;
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
// Console Command
|
|
163
|
+
ConsoleCommandParams: {
|
|
164
|
+
command: string;
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// Consolidated tool action types
|
|
169
|
+
export type AssetAction = 'list' | 'import' | 'create_material';
|
|
170
|
+
export type ActorAction = 'spawn' | 'delete' | 'apply_force';
|
|
171
|
+
export type EditorAction = 'play' | 'stop' | 'set_camera' | 'set_view_mode';
|
|
172
|
+
export type LevelAction = 'load' | 'save' | 'stream' | 'create_light' | 'build_lighting';
|
|
173
|
+
export type AnimationAction = 'create_animation_bp' | 'play_montage' | 'setup_ragdoll';
|
|
174
|
+
export type EffectAction = 'particle' | 'niagara' | 'debug_shape';
|
|
175
|
+
export type BlueprintAction = 'create' | 'add_component';
|
|
176
|
+
export type EnvironmentAction = 'create_landscape' | 'sculpt' | 'add_foliage' | 'paint_foliage';
|
|
177
|
+
export type SystemAction = 'profile' | 'show_fps' | 'set_quality' | 'play_sound' | 'create_widget' | 'show_widget';
|
|
178
|
+
export type VerificationAction = 'foliage_type_exists' | 'foliage_instances_near' | 'landscape_exists' | 'quality_level';
|
|
179
|
+
|
|
180
|
+
// Consolidated tool parameter types
|
|
181
|
+
export interface ConsolidatedToolParams {
|
|
182
|
+
manage_asset: {
|
|
183
|
+
action: AssetAction;
|
|
184
|
+
directory?: string;
|
|
185
|
+
recursive?: boolean;
|
|
186
|
+
sourcePath?: string;
|
|
187
|
+
destinationPath?: string;
|
|
188
|
+
name?: string;
|
|
189
|
+
path?: string;
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
control_actor: {
|
|
193
|
+
action: ActorAction;
|
|
194
|
+
actorName?: string;
|
|
195
|
+
classPath?: string;
|
|
196
|
+
location?: Vector3D;
|
|
197
|
+
rotation?: Rotation3D;
|
|
198
|
+
force?: Vector3D;
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
control_editor: {
|
|
202
|
+
action: EditorAction;
|
|
203
|
+
location?: Vector3D;
|
|
204
|
+
rotation?: Rotation3D;
|
|
205
|
+
viewMode?: string;
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
manage_level: {
|
|
209
|
+
action: LevelAction;
|
|
210
|
+
levelPath?: string;
|
|
211
|
+
levelName?: string;
|
|
212
|
+
streaming?: boolean;
|
|
213
|
+
shouldBeLoaded?: boolean;
|
|
214
|
+
shouldBeVisible?: boolean;
|
|
215
|
+
lightType?: 'Directional' | 'Point' | 'Spot' | 'Rect';
|
|
216
|
+
name?: string;
|
|
217
|
+
location?: Vector3D;
|
|
218
|
+
intensity?: number;
|
|
219
|
+
quality?: 'Preview' | 'Medium' | 'High' | 'Production';
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
animation_physics: {
|
|
223
|
+
action: AnimationAction;
|
|
224
|
+
name?: string;
|
|
225
|
+
actorName?: string;
|
|
226
|
+
skeletonPath?: string;
|
|
227
|
+
montagePath?: string;
|
|
228
|
+
animationPath?: string;
|
|
229
|
+
playRate?: number;
|
|
230
|
+
physicsAssetName?: string;
|
|
231
|
+
blendWeight?: number;
|
|
232
|
+
savePath?: string;
|
|
233
|
+
};
|
|
234
|
+
|
|
235
|
+
create_effect: {
|
|
236
|
+
action: EffectAction;
|
|
237
|
+
name?: string;
|
|
238
|
+
location?: Vector3D;
|
|
239
|
+
effectType?: string;
|
|
240
|
+
systemPath?: string;
|
|
241
|
+
scale?: number;
|
|
242
|
+
shape?: string;
|
|
243
|
+
size?: number;
|
|
244
|
+
color?: [number, number, number, number];
|
|
245
|
+
duration?: number;
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
manage_blueprint: {
|
|
249
|
+
action: BlueprintAction;
|
|
250
|
+
name: string;
|
|
251
|
+
blueprintType?: string;
|
|
252
|
+
componentType?: string;
|
|
253
|
+
componentName?: string;
|
|
254
|
+
savePath?: string;
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
build_environment: {
|
|
258
|
+
action: EnvironmentAction;
|
|
259
|
+
name?: string;
|
|
260
|
+
sizeX?: number;
|
|
261
|
+
sizeY?: number;
|
|
262
|
+
tool?: string;
|
|
263
|
+
meshPath?: string;
|
|
264
|
+
foliageType?: string;
|
|
265
|
+
density?: number;
|
|
266
|
+
position?: Vector3D;
|
|
267
|
+
brushSize?: number;
|
|
268
|
+
strength?: number;
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
system_control: {
|
|
272
|
+
action: SystemAction;
|
|
273
|
+
profileType?: string;
|
|
274
|
+
category?: string;
|
|
275
|
+
level?: number;
|
|
276
|
+
enabled?: boolean;
|
|
277
|
+
verbose?: boolean;
|
|
278
|
+
soundPath?: string;
|
|
279
|
+
location?: Vector3D;
|
|
280
|
+
volume?: number;
|
|
281
|
+
is3D?: boolean;
|
|
282
|
+
widgetName?: string;
|
|
283
|
+
widgetType?: string;
|
|
284
|
+
visible?: boolean;
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
console_command: {
|
|
288
|
+
command: string;
|
|
289
|
+
};
|
|
290
|
+
|
|
291
|
+
verify_environment: {
|
|
292
|
+
action: VerificationAction;
|
|
293
|
+
name?: string;
|
|
294
|
+
position?: Vector3D;
|
|
295
|
+
radius?: number;
|
|
296
|
+
category?: string;
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
// Type-safe tool response map
|
|
301
|
+
export interface ToolResponseMap {
|
|
302
|
+
// Consolidated tools
|
|
303
|
+
manage_asset: ManageAssetResponse;
|
|
304
|
+
control_actor: ControlActorResponse;
|
|
305
|
+
control_editor: ControlEditorResponse;
|
|
306
|
+
manage_level: ManageLevelResponse;
|
|
307
|
+
animation_physics: AnimationPhysicsResponse;
|
|
308
|
+
create_effect: CreateEffectResponse;
|
|
309
|
+
manage_blueprint: ManageBlueprintResponse;
|
|
310
|
+
build_environment: BuildEnvironmentResponse;
|
|
311
|
+
system_control: SystemControlResponse;
|
|
312
|
+
console_command: ConsoleCommandResponse;
|
|
313
|
+
verify_environment: VerifyEnvironmentResponse;
|
|
314
|
+
|
|
315
|
+
// Individual tools (subset for brevity)
|
|
316
|
+
list_assets: ManageAssetResponse;
|
|
317
|
+
import_asset: ManageAssetResponse;
|
|
318
|
+
spawn_actor: ControlActorResponse;
|
|
319
|
+
delete_actor: ControlActorResponse;
|
|
320
|
+
create_material: ManageAssetResponse;
|
|
321
|
+
play_in_editor: ControlEditorResponse;
|
|
322
|
+
stop_play_in_editor: ControlEditorResponse;
|
|
323
|
+
set_camera: ControlEditorResponse;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
// Helper type for tool names
|
|
327
|
+
export type ToolName = keyof ToolResponseMap;
|
|
328
|
+
|
|
329
|
+
// Helper type for getting response type by tool name
|
|
330
|
+
export type GetToolResponse<T extends ToolName> = ToolResponseMap[T];
|
|
331
|
+
|
|
332
|
+
// Helper type for getting parameters by tool name
|
|
333
|
+
export type GetToolParams<T extends keyof ConsolidatedToolParams> = ConsolidatedToolParams[T];
|
|
334
|
+
|
|
335
|
+
// Export a type guard to check if a response is successful
|
|
336
|
+
export function isSuccessResponse(response: BaseToolResponse): response is BaseToolResponse & { success: true } {
|
|
337
|
+
return response.success === true;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
// Export a type guard to check if a response has an error
|
|
341
|
+
export function isErrorResponse(response: BaseToolResponse): response is BaseToolResponse & { error: string } {
|
|
342
|
+
return response.success === false && typeof response.error === 'string';
|
|
343
|
+
}
|