ultimate-unreal-engine-mcp 0.1.2 → 0.1.3

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 (29) hide show
  1. package/package.json +1 -1
  2. package/unreal-plugin/MCPBridge/Source/MCPBridgeEditor/MCPBridgeEditor.Build.cs +60 -73
  3. package/unreal-plugin/MCPBridge/Source/MCPBridgeEditor/Private/MCPBridgeSubsystem.cpp +110 -149
  4. /package/unreal-plugin/MCPBridge/Source/MCPBridgeEditor/Private/{MCPAICommands.cpp → Optional/MCPAICommands.cpp.disabled} +0 -0
  5. /package/unreal-plugin/MCPBridge/Source/MCPBridgeEditor/Private/{MCPAICommands.h → Optional/MCPAICommands.h.disabled} +0 -0
  6. /package/unreal-plugin/MCPBridge/Source/MCPBridgeEditor/Private/{MCPAnimationCommands.cpp → Optional/MCPAnimationCommands.cpp.disabled} +0 -0
  7. /package/unreal-plugin/MCPBridge/Source/MCPBridgeEditor/Private/{MCPAnimationCommands.h → Optional/MCPAnimationCommands.h.disabled} +0 -0
  8. /package/unreal-plugin/MCPBridge/Source/MCPBridgeEditor/Private/{MCPAudioCommands.cpp → Optional/MCPAudioCommands.cpp.disabled} +0 -0
  9. /package/unreal-plugin/MCPBridge/Source/MCPBridgeEditor/Private/{MCPAudioCommands.h → Optional/MCPAudioCommands.h.disabled} +0 -0
  10. /package/unreal-plugin/MCPBridge/Source/MCPBridgeEditor/Private/{MCPChaosCommands.cpp → Optional/MCPChaosCommands.cpp.disabled} +0 -0
  11. /package/unreal-plugin/MCPBridge/Source/MCPBridgeEditor/Private/{MCPChaosCommands.h → Optional/MCPChaosCommands.h.disabled} +0 -0
  12. /package/unreal-plugin/MCPBridge/Source/MCPBridgeEditor/Private/{MCPGASCommands.cpp → Optional/MCPGASCommands.cpp.disabled} +0 -0
  13. /package/unreal-plugin/MCPBridge/Source/MCPBridgeEditor/Private/{MCPGASCommands.h → Optional/MCPGASCommands.h.disabled} +0 -0
  14. /package/unreal-plugin/MCPBridge/Source/MCPBridgeEditor/Private/{MCPImportExportCommands.cpp → Optional/MCPImportExportCommands.cpp.disabled} +0 -0
  15. /package/unreal-plugin/MCPBridge/Source/MCPBridgeEditor/Private/{MCPImportExportCommands.h → Optional/MCPImportExportCommands.h.disabled} +0 -0
  16. /package/unreal-plugin/MCPBridge/Source/MCPBridgeEditor/Private/{MCPLiveLinkCommands.cpp → Optional/MCPLiveLinkCommands.cpp.disabled} +0 -0
  17. /package/unreal-plugin/MCPBridge/Source/MCPBridgeEditor/Private/{MCPLiveLinkCommands.h → Optional/MCPLiveLinkCommands.h.disabled} +0 -0
  18. /package/unreal-plugin/MCPBridge/Source/MCPBridgeEditor/Private/{MCPMaterialCommands.cpp → Optional/MCPMaterialCommands.cpp.disabled} +0 -0
  19. /package/unreal-plugin/MCPBridge/Source/MCPBridgeEditor/Private/{MCPMaterialCommands.h → Optional/MCPMaterialCommands.h.disabled} +0 -0
  20. /package/unreal-plugin/MCPBridge/Source/MCPBridgeEditor/Private/{MCPMotionDesignCommands.cpp → Optional/MCPMotionDesignCommands.cpp.disabled} +0 -0
  21. /package/unreal-plugin/MCPBridge/Source/MCPBridgeEditor/Private/{MCPMotionDesignCommands.h → Optional/MCPMotionDesignCommands.h.disabled} +0 -0
  22. /package/unreal-plugin/MCPBridge/Source/MCPBridgeEditor/Private/{MCPMovieRenderCommands.cpp → Optional/MCPMovieRenderCommands.cpp.disabled} +0 -0
  23. /package/unreal-plugin/MCPBridge/Source/MCPBridgeEditor/Private/{MCPMovieRenderCommands.h → Optional/MCPMovieRenderCommands.h.disabled} +0 -0
  24. /package/unreal-plugin/MCPBridge/Source/MCPBridgeEditor/Private/{MCPNetworkingCommands.cpp → Optional/MCPNetworkingCommands.cpp.disabled} +0 -0
  25. /package/unreal-plugin/MCPBridge/Source/MCPBridgeEditor/Private/{MCPNetworkingCommands.h → Optional/MCPNetworkingCommands.h.disabled} +0 -0
  26. /package/unreal-plugin/MCPBridge/Source/MCPBridgeEditor/Private/{MCPValidationCommands.cpp → Optional/MCPValidationCommands.cpp.disabled} +0 -0
  27. /package/unreal-plugin/MCPBridge/Source/MCPBridgeEditor/Private/{MCPValidationCommands.h → Optional/MCPValidationCommands.h.disabled} +0 -0
  28. /package/unreal-plugin/MCPBridge/Source/MCPBridgeEditor/Private/{MCPWorldPartitionCommands.cpp → Optional/MCPWorldPartitionCommands.cpp.disabled} +0 -0
  29. /package/unreal-plugin/MCPBridge/Source/MCPBridgeEditor/Private/{MCPWorldPartitionCommands.h → Optional/MCPWorldPartitionCommands.h.disabled} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ultimate-unreal-engine-mcp",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "MCP server giving AI assistants full access to Unreal Engine 5.7 projects",
5
5
  "type": "module",
6
6
  "engines": {
@@ -1,73 +1,60 @@
1
- // MCPBridgeEditor.Build.cs
2
- // Editor module: UEditorSubsystem lifecycle, editor API handlers (Phases 8-29).
3
- // Depends on MCPBridgeRuntime for the TCP server.
4
- // This module is guarded by WITH_EDITOR -- never ships to cooked builds.
5
-
6
- using UnrealBuildTool;
7
-
8
- public class MCPBridgeEditor : ModuleRules
9
- {
10
- public MCPBridgeEditor(ReadOnlyTargetRules Target) : base(Target)
11
- {
12
- PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
13
-
14
- PublicDependencyModuleNames.AddRange(new string[]
15
- {
16
- "Core",
17
- "MCPBridgeRuntime",
18
- });
19
-
20
- PrivateDependencyModuleNames.AddRange(new string[]
21
- {
22
- "CoreUObject",
23
- "Engine",
24
- "UnrealEd",
25
- "EditorSubsystem",
26
- "Json",
27
- "Kismet",
28
- "BlueprintGraph",
29
- "AssetRegistry",
30
- "InputCore",
31
- "EnhancedInput",
32
- "LevelEditor",
33
- "SlateCore",
34
- "DataValidation",
35
- "LevelSequence",
36
- "MovieScene",
37
- "MovieSceneTracks",
38
- "LevelSequenceEditor",
39
- "MaterialEditor",
40
- "AssetTools",
41
- "AnimGraph",
42
- "AnimGraphRuntime",
43
- "IKRig",
44
- "WorldPartitionEditor",
45
- "DataLayerEditor",
46
- "PhysicsCore",
47
- "MetasoundEngine",
48
- "MetasoundFrontend",
49
- "InterchangeEngine",
50
- "InterchangeCore", // UInterchangeSourceData
51
- "InterchangePipelines",
52
- "AIModule",
53
- "StateTreeModule",
54
- "NavigationSystem",
55
- "GameplayAbilities", // Phase 25 - GAS
56
- "GameplayTags", // Phase 25 - GAS
57
- "GameplayTasks", // Phase 25 - GAS
58
- "GeometryCollectionEngine", // Phase 26 - Chaos destruction (UGeometryCollectionComponent)
59
- "Chaos", // Phase 26 - FManagedArrayCollection, FTransformCollection
60
- "ClothingSystemRuntimeCommon", // Phase 26 - UClothingAssetCommon
61
- "ChaosCloth", // Phase 26 - Chaos cloth simulation parameters
62
- "LiveLinkInterface", // Phase 27 - ILiveLinkClient, FLiveLinkSubjectKey, FLiveLinkSubjectFrameData
63
- "LiveLink", // Phase 27 - ULiveLinkSubjectSettings for per-subject enabled state control
64
- "AvalancheTransition", // Phase 28 - Motion Design Transition Logic trees (experimental)
65
- "RemoteControl", // Phase 28 - Remote Control preset read/write
66
- "MovieRenderPipelineCore", // Phase 29 - UMoviePipelineQueue, UMoviePipelineExecutorJob, config/settings types
67
- "MovieRenderPipelineSettings", // Phase 29 - UMoviePipelineBurnInSetting
68
- "MovieRenderPipelineEditor", // Phase 29 - UMoviePipelineQueueSubsystem
69
- "OnlineSubsystem", // Phase 30 - IOnlineSubsystem, IOnlineSession, FOnlineSessionSettings
70
- "OnlineSubsystemUtils", // Phase 30 - Online subsystem helper utilities
71
- });
72
- }
73
- }
1
+ // MCPBridgeEditor.Build.cs
2
+ // Editor module: UEditorSubsystem lifecycle, editor API handlers.
3
+ // Depends on MCPBridgeRuntime for the TCP server.
4
+ // This module is guarded by WITH_EDITOR -- never ships to cooked builds.
5
+ //
6
+ // Only modules that ship with every UE 5.7 binary install are linked here.
7
+ // Handlers for optional plugins live in the Private/Optional/ subfolder
8
+ // and are NOT compiled by default. To enable them, move them to Private/
9
+ // and add their module dependencies below.
10
+
11
+ using UnrealBuildTool;
12
+
13
+ public class MCPBridgeEditor : ModuleRules
14
+ {
15
+ public MCPBridgeEditor(ReadOnlyTargetRules Target) : base(Target)
16
+ {
17
+ PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
18
+
19
+ PublicDependencyModuleNames.AddRange(new string[]
20
+ {
21
+ "Core",
22
+ "MCPBridgeRuntime",
23
+ });
24
+
25
+ PrivateDependencyModuleNames.AddRange(new string[]
26
+ {
27
+ // Core engine (always present)
28
+ "CoreUObject",
29
+ "Engine",
30
+ "UnrealEd",
31
+ "EditorSubsystem",
32
+ "Json",
33
+ "SlateCore",
34
+ "InputCore",
35
+ "AssetTools",
36
+ "AssetRegistry",
37
+ "LevelEditor",
38
+ "PhysicsCore",
39
+
40
+ // Blueprint (always present in editor)
41
+ "Kismet",
42
+ "BlueprintGraph",
43
+
44
+ // Sequencer (always present in editor)
45
+ "LevelSequence",
46
+ "LevelSequenceEditor",
47
+ "MovieScene",
48
+ "MovieSceneTracks",
49
+
50
+ // Input (always present)
51
+ "EnhancedInput",
52
+
53
+ // AI (always present)
54
+ "AIModule",
55
+ "NavigationSystem",
56
+ "GameplayTags",
57
+ "GameplayTasks",
58
+ });
59
+ }
60
+ }
@@ -1,149 +1,110 @@
1
- // MCPBridgeSubsystem.cpp (updated by Plans 07-02, 08-01, 09-01, 09-02, 10-01, 12-01, 12-02, 13-01, 17-01, 18-01, 19-01, 20-01, 21-01, 22-01, 23-01, 25-01, 26-01, 27-01, 28-01, 29-01, 30-01)
2
- // Wires FMCPCommandRouter and FMCPTcpServer into the editor subsystem lifecycle.
3
-
4
- #include "MCPBridgeSubsystem.h"
5
- #include "MCPBlueprintHandlers.h"
6
- #include "MCPActorCommands.h"
7
- #include "MCPAssetCommands.h"
8
- #include "MCPBlueprintWriteHandlers.h"
9
- #include "MCPEditorStateCommands.h"
10
- #include "MCPPieCommands.h"
11
- #include "MCPViewportCommands.h"
12
- #include "MCPValidationCommands.h"
13
- #include "MCPInputHandlers.h"
14
- #include "MCPMaterialCommands.h"
15
- #include "MCPSequencerCommands.h"
16
- #include "MCPAnimationCommands.h"
17
- #include "MCPWorldPartitionCommands.h"
18
- #include "MCPAICommands.h"
19
- #include "MCPSelectionCommands.h"
20
- #include "MCPCollisionPhysicsCommands.h"
21
- #include "MCPImportExportCommands.h"
22
- #include "MCPMotionDesignCommands.h"
23
- #include "MCPChaosCommands.h"
24
- #include "MCPAudioCommands.h"
25
- #include "MCPGASCommands.h"
26
- #include "MCPLiveLinkCommands.h"
27
- #include "MCPMovieRenderCommands.h"
28
- #include "MCPNetworkingCommands.h"
29
- #include "Misc/ConfigCacheIni.h"
30
-
31
- void UMCPBridgeSubsystem::Initialize(FSubsystemCollectionBase& Collection)
32
- {
33
- Super::Initialize(Collection);
34
-
35
- const int32 Port = GetConfiguredPort();
36
-
37
- // Create the router (registers built-in ping handler in constructor).
38
- Router = MakeUnique<FMCPCommandRouter>();
39
-
40
- // Register Blueprint command handlers (blueprint.read, blueprint.graph, blueprint.list).
41
- RegisterBlueprintHandlers(*Router);
42
-
43
- // Register Blueprint-C++ bridge handlers (blueprint.subclasses, blueprint.cppUsage).
44
- RegisterBlueprintBridgeHandlers(*Router);
45
-
46
- // Register Actor command handlers (actor.list, actor.spawn, actor.transform, actor.delete).
47
- RegisterActorCommands(*Router);
48
-
49
- // Register Asset/Level command handlers (asset.query, asset.references, level.layout).
50
- RegisterAssetCommands(*Router);
51
-
52
- // Register Blueprint write command handlers (blueprint.create, addNode, connectPins, addVariable, setDefault).
53
- RegisterBlueprintWriteHandlers(*Router);
54
-
55
- // Register Editor State command handlers (editor.state).
56
- RegisterEditorStateCommands(*Router);
57
-
58
- // Register PIE command handlers (pie.start, pie.stop, pie.logs, pie.gameState).
59
- RegisterPieCommands(*Router);
60
-
61
- // Register Viewport command handlers (viewport.screenshot, viewport.camera, viewport.renderMode, viewport.hiresScreenshot).
62
- RegisterViewportCommands(*Router);
63
-
64
- // Register validation command handlers (validate.asset, validate.folder, validate.project, validate.blueprint).
65
- RegisterValidationCommands(*Router);
66
-
67
- // Register Enhanced Input command handlers (input.listActions, input.createAction, input.listContexts, input.addBinding).
68
- RegisterInputHandlers(*Router);
69
-
70
- // Register Material command handlers (material.params, material.createInstance, material.setParam, material.actorMaterials).
71
- RegisterMaterialCommands(*Router);
72
-
73
- // Register Sequencer command handlers (sequencer.create, tracks, addTrack, addKey, playback).
74
- RegisterSequencerCommands(*Router);
75
-
76
- // Register Animation command handlers (animation.list, inspectAnimBP, inspectMontage, inspectBlendSpace, retargetMappings).
77
- RegisterAnimationCommands(*Router);
78
-
79
- // Register World Partition command handlers (worldpartition.settings, dataLayers, streamingSources, hlod).
80
- RegisterWorldPartitionCommands(*Router);
81
-
82
- // Register AI system command handlers (ai.behaviorTree, ai.stateTree, ai.blackboard, ai.eqs, ai.navmesh).
83
- RegisterAICommands(*Router);
84
-
85
- // Register Selection command handlers (selection.select, selection.get, selection.duplicate, selection.convert).
86
- RegisterSelectionCommands(*Router);
87
-
88
- // Register Collision & Physics command handlers (collision.read, collision.set, physics.material, physics.asset).
89
- RegisterCollisionPhysicsCommands(*Router);
90
-
91
- // Register Import/Export command handlers (import.fbx, import.usd, export.mesh, import.batch).
92
- RegisterImportExportCommands(*Router);
93
-
94
- // Register Motion Design command handlers (motiondesign.sceneStates, transition, transitionLogic, remoteControl).
95
- RegisterMotionDesignCommands(*Router);
96
-
97
- // Register Chaos physics command handlers (chaos.geometryCollection, chaos.resetDestruction, chaos.cloth, chaos.physicsCache).
98
- RegisterChaosCommands(*Router);
99
-
100
- // Register Audio command handlers (audio.list, audio.metasound, audio.soundcue, audio.insights).
101
- RegisterAudioCommands(*Router);
102
-
103
- // Register GAS command handlers (gas.abilities, gas.effects, gas.attributes, gas.tags).
104
- RegisterGASCommands(*Router);
105
-
106
- // Register Live Link command handlers (livelink.sources, livelink.subjects, livelink.control, livelink.preview).
107
- RegisterLiveLinkCommands(*Router);
108
-
109
- // Register Movie Render Pipeline command handlers (movierender.queue, movierender.addJob, movierender.control, movierender.configure).
110
- RegisterMovieRenderCommands(*Router);
111
-
112
- // Register Networking command handlers (net.replication, net.properties, net.driver, net.session).
113
- RegisterNetworkingCommands(*Router);
114
-
115
- // Create and start the TCP server.
116
- TcpServer = MakeUnique<FMCPTcpServer>(*Router);
117
- bServerRunning = TcpServer->Start(Port);
118
-
119
- if (!bServerRunning)
120
- {
121
- UE_LOG(LogTemp, Error, TEXT("[MCPBridge] Failed to start TCP server on port %d."), Port);
122
- }
123
- }
124
-
125
- void UMCPBridgeSubsystem::Deinitialize()
126
- {
127
- if (TcpServer.IsValid())
128
- {
129
- TcpServer->Stop();
130
- TcpServer.Reset();
131
- }
132
- if (Router.IsValid())
133
- {
134
- Router.Reset();
135
- }
136
- bServerRunning = false;
137
-
138
- Super::Deinitialize();
139
- }
140
-
141
- int32 UMCPBridgeSubsystem::GetConfiguredPort() const
142
- {
143
- int32 Port = 55557;
144
- if (GConfig)
145
- {
146
- GConfig->GetInt(TEXT("MCPBridge"), TEXT("Port"), Port, GEngineIni);
147
- }
148
- return Port;
149
- }
1
+ // MCPBridgeSubsystem.cpp
2
+ // Wires FMCPCommandRouter and FMCPTcpServer into the editor subsystem lifecycle.
3
+ //
4
+ // Core handlers are always registered. Optional-plugin handlers are guarded by
5
+ // preprocessor defines set in Build.cs. When a plugin module is not linked,
6
+ // the corresponding Register*Commands() call is skipped and the TypeScript
7
+ // side returns "plugin_not_connected" gracefully.
8
+
9
+ #include "MCPBridgeSubsystem.h"
10
+ #include "MCPBlueprintHandlers.h"
11
+ #include "MCPActorCommands.h"
12
+ #include "MCPAssetCommands.h"
13
+ #include "MCPBlueprintWriteHandlers.h"
14
+ #include "MCPEditorStateCommands.h"
15
+ #include "MCPPieCommands.h"
16
+ #include "MCPViewportCommands.h"
17
+ #include "MCPInputHandlers.h"
18
+ #include "MCPSequencerCommands.h"
19
+ #include "MCPSelectionCommands.h"
20
+ #include "MCPCollisionPhysicsCommands.h"
21
+ #include "Misc/ConfigCacheIni.h"
22
+
23
+ // Optional module handlers — only included when their Build.cs dependencies are linked.
24
+ // To enable: add the module to Build.cs PrivateDependencyModuleNames and uncomment here.
25
+ // #include "MCPValidationCommands.h" // Requires: DataValidation
26
+ // #include "MCPMaterialCommands.h" // Requires: MaterialEditor
27
+ // #include "MCPWorldPartitionCommands.h" // Requires: WorldPartitionEditor, DataLayerEditor
28
+ // #include "MCPImportExportCommands.h" // Requires: InterchangeEngine, InterchangeCore, InterchangePipelines
29
+ // #include "MCPAudioCommands.h" // Requires: MetasoundEngine, MetasoundFrontend
30
+ // #include "MCPGASCommands.h" // Requires: GameplayAbilities
31
+ // #include "MCPChaosCommands.h" // Requires: GeometryCollectionEngine, Chaos, ChaosCloth
32
+ // #include "MCPLiveLinkCommands.h" // Requires: LiveLinkInterface, LiveLink
33
+ // #include "MCPMotionDesignCommands.h" // Requires: AvalancheTransition, RemoteControl
34
+ // #include "MCPMovieRenderCommands.h" // Requires: MovieRenderPipelineCore, MovieRenderPipelineEditor
35
+ // #include "MCPNetworkingCommands.h" // Requires: OnlineSubsystem, OnlineSubsystemUtils
36
+
37
+ void UMCPBridgeSubsystem::Initialize(FSubsystemCollectionBase& Collection)
38
+ {
39
+ Super::Initialize(Collection);
40
+
41
+ const int32 Port = GetConfiguredPort();
42
+
43
+ Router = MakeUnique<FMCPCommandRouter>();
44
+
45
+ // --- Core handlers (always available) ---
46
+ RegisterBlueprintHandlers(*Router);
47
+ RegisterBlueprintBridgeHandlers(*Router);
48
+ RegisterActorCommands(*Router);
49
+ RegisterAssetCommands(*Router);
50
+ RegisterBlueprintWriteHandlers(*Router);
51
+ RegisterEditorStateCommands(*Router);
52
+ RegisterPieCommands(*Router);
53
+ RegisterViewportCommands(*Router);
54
+ RegisterInputHandlers(*Router);
55
+ RegisterSequencerCommands(*Router);
56
+ RegisterSelectionCommands(*Router);
57
+ RegisterCollisionPhysicsCommands(*Router);
58
+
59
+ // --- Optional handlers (uncomment when plugin dependencies are enabled) ---
60
+ // RegisterValidationCommands(*Router);
61
+ // RegisterMaterialCommands(*Router);
62
+ // RegisterWorldPartitionCommands(*Router);
63
+ // RegisterImportExportCommands(*Router);
64
+ // RegisterAudioCommands(*Router);
65
+ // RegisterGASCommands(*Router);
66
+ // RegisterChaosCommands(*Router);
67
+ // RegisterLiveLinkCommands(*Router);
68
+ // RegisterMotionDesignCommands(*Router);
69
+ // RegisterMovieRenderCommands(*Router);
70
+ // RegisterNetworkingCommands(*Router);
71
+
72
+ // Create and start the TCP server.
73
+ TcpServer = MakeUnique<FMCPTcpServer>(*Router);
74
+ bServerRunning = TcpServer->Start(Port);
75
+
76
+ if (!bServerRunning)
77
+ {
78
+ UE_LOG(LogTemp, Error, TEXT("[MCPBridge] Failed to start TCP server on port %d."), Port);
79
+ }
80
+ else
81
+ {
82
+ UE_LOG(LogTemp, Log, TEXT("[MCPBridge] TCP server started on port %d."), Port);
83
+ }
84
+ }
85
+
86
+ void UMCPBridgeSubsystem::Deinitialize()
87
+ {
88
+ if (TcpServer.IsValid())
89
+ {
90
+ TcpServer->Stop();
91
+ TcpServer.Reset();
92
+ }
93
+ if (Router.IsValid())
94
+ {
95
+ Router.Reset();
96
+ }
97
+ bServerRunning = false;
98
+
99
+ Super::Deinitialize();
100
+ }
101
+
102
+ int32 UMCPBridgeSubsystem::GetConfiguredPort() const
103
+ {
104
+ int32 Port = 55557;
105
+ if (GConfig)
106
+ {
107
+ GConfig->GetInt(TEXT("MCPBridge"), TEXT("Port"), Port, GEngineIni);
108
+ }
109
+ return Port;
110
+ }