flockbay 0.10.49 → 0.10.52
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/README.md +60 -60
- package/bin/flockbay-mcp.mjs +62 -62
- package/bin/flockbay.mjs +95 -95
- package/dist/{index-r3VTdgFI.cjs → index-IntvnrmZ.cjs} +71 -14
- package/dist/{index-D8AeVbvv.mjs → index-wkeSi0iC.mjs} +70 -13
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/lib.cjs +1 -1
- package/dist/lib.mjs +1 -1
- package/dist/{migratePlugin-CEvGPul8.mjs → migratePlugin-C71hAoc5.mjs} +12 -2
- package/dist/{migratePlugin-wFK-k3Wk.cjs → migratePlugin-D1XjjWFq.cjs} +12 -2
- package/dist/{runCodex-DuyuYqoB.cjs → runCodex-B7i_ICoQ.cjs} +34 -23
- package/dist/{runCodex-ZfUyhHF6.mjs → runCodex-BSx-hCu6.mjs} +34 -23
- package/dist/{runGemini-DBU1mMdp.mjs → runGemini-Dwyh7_WI.mjs} +2 -2
- package/dist/{runGemini-D7j5Y5TF.cjs → runGemini-gBKR3rdL.cjs} +2 -2
- package/dist/{types-DNr0xwSy.cjs → types-5z8UADAi.cjs} +224 -15
- package/dist/{types-BRJuZQj_.mjs → types-Bgzap7qR.mjs} +224 -16
- package/package.json +131 -131
- package/scripts/claude_local_launcher.cjs +72 -72
- package/scripts/claude_remote_launcher.cjs +15 -15
- package/scripts/claude_version_utils.cjs +445 -445
- package/scripts/ripgrep_launcher.cjs +32 -32
- package/scripts/run-with-root-env.mjs +37 -32
- package/scripts/session_hook_forwarder.cjs +49 -49
- package/scripts/test-codex-abort-history.mjs +77 -77
- package/scripts/unpack-tools.cjs +244 -244
- package/tools/licenses/difftastic-LICENSE +21 -21
- package/tools/licenses/ripgrep-LICENSE +3 -3
- package/tools/unreal-mcp/UPSTREAM_VERSION.md +8 -8
- package/tools/unreal-mcp/upstream/Docs/README.md +8 -8
- package/tools/unreal-mcp/upstream/Docs/Tools/README.md +6 -6
- package/tools/unreal-mcp/upstream/Docs/Tools/actor_tools.md +183 -183
- package/tools/unreal-mcp/upstream/Docs/Tools/blueprint_tools.md +268 -268
- package/tools/unreal-mcp/upstream/Docs/Tools/editor_tools.md +104 -104
- package/tools/unreal-mcp/upstream/Docs/Tools/node_tools.md +274 -274
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Config/FilterPlugin.ini +8 -8
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/FlockbayMCP.uplugin +36 -36
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/FlockbayMCP.Build.cs +82 -82
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Private/Commands/UnrealMCPBlueprintCommands.cpp +1364 -1364
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Private/Commands/UnrealMCPBlueprintNodeCommands.cpp +1310 -1310
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Private/Commands/UnrealMCPCommandSchema.cpp +756 -756
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Private/Commands/UnrealMCPCommonUtils.cpp +1177 -1177
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Private/Commands/UnrealMCPEditorCommands.cpp +2618 -2618
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Private/Commands/UnrealMCPProjectCommands.cpp +71 -71
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Private/Commands/UnrealMCPUMGCommands.cpp +543 -543
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Private/MCPServerRunnable.cpp +372 -372
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Private/UnrealMCPBridge.cpp +457 -457
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Private/UnrealMCPModule.cpp +21 -21
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Public/Commands/UnrealMCPBlueprintCommands.h +35 -35
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Public/Commands/UnrealMCPBlueprintNodeCommands.h +30 -30
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Public/Commands/UnrealMCPCommandSchema.h +41 -41
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Public/Commands/UnrealMCPCommonUtils.h +59 -59
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Public/Commands/UnrealMCPEditorCommands.h +61 -61
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Public/Commands/UnrealMCPProjectCommands.h +20 -20
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Public/Commands/UnrealMCPUMGCommands.h +82 -82
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Public/MCPServerRunnable.h +33 -33
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Public/UnrealMCPBridge.h +64 -64
- package/tools/unreal-mcp/upstream/MCPGameProject/Plugins/FlockbayMCP/Source/FlockbayMCP/Public/UnrealMCPModule.h +22 -22
- package/tools/unreal-mcp/upstream/Python/README.md +39 -39
- package/tools/unreal-mcp/upstream/Python/pyproject.toml +22 -22
- package/tools/unreal-mcp/upstream/Python/scripts/actors/test_cube.py +202 -202
- package/tools/unreal-mcp/upstream/Python/scripts/blueprints/test_create_and_spawn_blueprints_with_different_components.py +496 -496
- package/tools/unreal-mcp/upstream/Python/scripts/blueprints/test_create_and_spawn_cube_blueprint.py +193 -193
- package/tools/unreal-mcp/upstream/Python/scripts/node/test_component_reference.py +266 -266
- package/tools/unreal-mcp/upstream/Python/scripts/node/test_create_bird_blueprint_with_input_and_camera.py +617 -617
- package/tools/unreal-mcp/upstream/Python/scripts/node/test_input_mapping.py +365 -365
- package/tools/unreal-mcp/upstream/Python/scripts/node/test_physics_variables.py +389 -389
- package/tools/unreal-mcp/upstream/Python/tools/blueprint_tools.py +419 -419
- package/tools/unreal-mcp/upstream/Python/tools/editor_tools.py +369 -369
- package/tools/unreal-mcp/upstream/Python/tools/node_tools.py +429 -429
- package/tools/unreal-mcp/upstream/Python/tools/project_tools.py +63 -63
- package/tools/unreal-mcp/upstream/Python/tools/umg_tools.py +332 -332
- package/tools/unreal-mcp/upstream/Python/unreal_mcp_server.py +398 -398
- package/tools/unreal-mcp/upstream/Python/uv.lock +521 -521
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
#pragma once
|
|
2
|
-
|
|
3
|
-
#include "CoreMinimal.h"
|
|
4
|
-
#include "Json.h"
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Handles UMG (Widget Blueprint) related MCP commands
|
|
8
|
-
* Responsible for creating and modifying UMG Widget Blueprints,
|
|
9
|
-
* adding widget components, and managing widget instances in the viewport.
|
|
10
|
-
*/
|
|
11
|
-
class FLOCKBAYMCP_API FUnrealMCPUMGCommands
|
|
12
|
-
{
|
|
13
|
-
public:
|
|
14
|
-
FUnrealMCPUMGCommands();
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Handle UMG-related commands
|
|
18
|
-
* @param CommandType - The type of command to handle
|
|
19
|
-
* @param Params - JSON parameters for the command
|
|
20
|
-
* @return JSON response with results or error
|
|
21
|
-
*/
|
|
22
|
-
TSharedPtr<FJsonObject> HandleCommand(const FString& CommandType, const TSharedPtr<FJsonObject>& Params);
|
|
23
|
-
|
|
24
|
-
private:
|
|
25
|
-
/**
|
|
26
|
-
* Create a new UMG Widget Blueprint
|
|
27
|
-
* @param Params - Must include "name" for the blueprint name
|
|
28
|
-
* @return JSON response with the created blueprint details
|
|
29
|
-
*/
|
|
30
|
-
TSharedPtr<FJsonObject> HandleCreateUMGWidgetBlueprint(const TSharedPtr<FJsonObject>& Params);
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Add a Text Block widget to a UMG Widget Blueprint
|
|
34
|
-
* @param Params - Must include:
|
|
35
|
-
* "blueprint_name" - Name of the target Widget Blueprint
|
|
36
|
-
* "widget_name" - Name for the new Text Block
|
|
37
|
-
* "text" - Initial text content (optional)
|
|
38
|
-
* "position" - [X, Y] position in the canvas (optional)
|
|
39
|
-
* @return JSON response with the added widget details
|
|
40
|
-
*/
|
|
41
|
-
TSharedPtr<FJsonObject> HandleAddTextBlockToWidget(const TSharedPtr<FJsonObject>& Params);
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Add a widget instance to the game viewport
|
|
45
|
-
* @param Params - Must include:
|
|
46
|
-
* "blueprint_name" - Name of the Widget Blueprint to instantiate
|
|
47
|
-
* "z_order" - Z-order for widget display (optional)
|
|
48
|
-
* @return JSON response with the widget instance details
|
|
49
|
-
*/
|
|
50
|
-
TSharedPtr<FJsonObject> HandleAddWidgetToViewport(const TSharedPtr<FJsonObject>& Params);
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Add a Button widget to a UMG Widget Blueprint
|
|
54
|
-
* @param Params - Must include:
|
|
55
|
-
* "blueprint_name" - Name of the target Widget Blueprint
|
|
56
|
-
* "widget_name" - Name for the new Button
|
|
57
|
-
* "text" - Button text
|
|
58
|
-
* "position" - [X, Y] position in the canvas
|
|
59
|
-
* @return JSON response with the added widget details
|
|
60
|
-
*/
|
|
61
|
-
TSharedPtr<FJsonObject> HandleAddButtonToWidget(const TSharedPtr<FJsonObject>& Params);
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Bind an event to a widget (e.g. button click)
|
|
65
|
-
* @param Params - Must include:
|
|
66
|
-
* "blueprint_name" - Name of the target Widget Blueprint
|
|
67
|
-
* "widget_name" - Name of the widget to bind
|
|
68
|
-
* "event_name" - Name of the event to bind
|
|
69
|
-
* @return JSON response with the binding details
|
|
70
|
-
*/
|
|
71
|
-
TSharedPtr<FJsonObject> HandleBindWidgetEvent(const TSharedPtr<FJsonObject>& Params);
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* Set up text block binding for dynamic updates
|
|
75
|
-
* @param Params - Must include:
|
|
76
|
-
* "blueprint_name" - Name of the target Widget Blueprint
|
|
77
|
-
* "widget_name" - Name of the widget to bind
|
|
78
|
-
* "binding_name" - Name of the binding to set up
|
|
79
|
-
* @return JSON response with the binding details
|
|
80
|
-
*/
|
|
81
|
-
TSharedPtr<FJsonObject> HandleSetTextBlockBinding(const TSharedPtr<FJsonObject>& Params);
|
|
82
|
-
};
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#include "CoreMinimal.h"
|
|
4
|
+
#include "Json.h"
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Handles UMG (Widget Blueprint) related MCP commands
|
|
8
|
+
* Responsible for creating and modifying UMG Widget Blueprints,
|
|
9
|
+
* adding widget components, and managing widget instances in the viewport.
|
|
10
|
+
*/
|
|
11
|
+
class FLOCKBAYMCP_API FUnrealMCPUMGCommands
|
|
12
|
+
{
|
|
13
|
+
public:
|
|
14
|
+
FUnrealMCPUMGCommands();
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Handle UMG-related commands
|
|
18
|
+
* @param CommandType - The type of command to handle
|
|
19
|
+
* @param Params - JSON parameters for the command
|
|
20
|
+
* @return JSON response with results or error
|
|
21
|
+
*/
|
|
22
|
+
TSharedPtr<FJsonObject> HandleCommand(const FString& CommandType, const TSharedPtr<FJsonObject>& Params);
|
|
23
|
+
|
|
24
|
+
private:
|
|
25
|
+
/**
|
|
26
|
+
* Create a new UMG Widget Blueprint
|
|
27
|
+
* @param Params - Must include "name" for the blueprint name
|
|
28
|
+
* @return JSON response with the created blueprint details
|
|
29
|
+
*/
|
|
30
|
+
TSharedPtr<FJsonObject> HandleCreateUMGWidgetBlueprint(const TSharedPtr<FJsonObject>& Params);
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Add a Text Block widget to a UMG Widget Blueprint
|
|
34
|
+
* @param Params - Must include:
|
|
35
|
+
* "blueprint_name" - Name of the target Widget Blueprint
|
|
36
|
+
* "widget_name" - Name for the new Text Block
|
|
37
|
+
* "text" - Initial text content (optional)
|
|
38
|
+
* "position" - [X, Y] position in the canvas (optional)
|
|
39
|
+
* @return JSON response with the added widget details
|
|
40
|
+
*/
|
|
41
|
+
TSharedPtr<FJsonObject> HandleAddTextBlockToWidget(const TSharedPtr<FJsonObject>& Params);
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Add a widget instance to the game viewport
|
|
45
|
+
* @param Params - Must include:
|
|
46
|
+
* "blueprint_name" - Name of the Widget Blueprint to instantiate
|
|
47
|
+
* "z_order" - Z-order for widget display (optional)
|
|
48
|
+
* @return JSON response with the widget instance details
|
|
49
|
+
*/
|
|
50
|
+
TSharedPtr<FJsonObject> HandleAddWidgetToViewport(const TSharedPtr<FJsonObject>& Params);
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Add a Button widget to a UMG Widget Blueprint
|
|
54
|
+
* @param Params - Must include:
|
|
55
|
+
* "blueprint_name" - Name of the target Widget Blueprint
|
|
56
|
+
* "widget_name" - Name for the new Button
|
|
57
|
+
* "text" - Button text
|
|
58
|
+
* "position" - [X, Y] position in the canvas
|
|
59
|
+
* @return JSON response with the added widget details
|
|
60
|
+
*/
|
|
61
|
+
TSharedPtr<FJsonObject> HandleAddButtonToWidget(const TSharedPtr<FJsonObject>& Params);
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Bind an event to a widget (e.g. button click)
|
|
65
|
+
* @param Params - Must include:
|
|
66
|
+
* "blueprint_name" - Name of the target Widget Blueprint
|
|
67
|
+
* "widget_name" - Name of the widget to bind
|
|
68
|
+
* "event_name" - Name of the event to bind
|
|
69
|
+
* @return JSON response with the binding details
|
|
70
|
+
*/
|
|
71
|
+
TSharedPtr<FJsonObject> HandleBindWidgetEvent(const TSharedPtr<FJsonObject>& Params);
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Set up text block binding for dynamic updates
|
|
75
|
+
* @param Params - Must include:
|
|
76
|
+
* "blueprint_name" - Name of the target Widget Blueprint
|
|
77
|
+
* "widget_name" - Name of the widget to bind
|
|
78
|
+
* "binding_name" - Name of the binding to set up
|
|
79
|
+
* @return JSON response with the binding details
|
|
80
|
+
*/
|
|
81
|
+
TSharedPtr<FJsonObject> HandleSetTextBlockBinding(const TSharedPtr<FJsonObject>& Params);
|
|
82
|
+
};
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
#pragma once
|
|
2
|
-
|
|
3
|
-
#include "CoreMinimal.h"
|
|
4
|
-
#include "HAL/Runnable.h"
|
|
5
|
-
#include "Sockets.h"
|
|
6
|
-
#include "Interfaces/IPv4/IPv4Address.h"
|
|
7
|
-
|
|
8
|
-
class UUnrealMCPBridge;
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Runnable class for the MCP server thread
|
|
12
|
-
*/
|
|
13
|
-
class FMCPServerRunnable : public FRunnable
|
|
14
|
-
{
|
|
15
|
-
public:
|
|
16
|
-
FMCPServerRunnable(UUnrealMCPBridge* InBridge, TSharedPtr<FSocket> InListenerSocket);
|
|
17
|
-
virtual ~FMCPServerRunnable();
|
|
18
|
-
|
|
19
|
-
// FRunnable interface
|
|
20
|
-
virtual bool Init() override;
|
|
21
|
-
virtual uint32 Run() override;
|
|
22
|
-
virtual void Stop() override;
|
|
23
|
-
virtual void Exit() override;
|
|
24
|
-
|
|
25
|
-
protected:
|
|
26
|
-
void HandleClientConnection(TSharedPtr<FSocket> ClientSocket);
|
|
27
|
-
void ProcessMessage(TSharedPtr<FSocket> Client, const FString& Message);
|
|
28
|
-
|
|
29
|
-
private:
|
|
30
|
-
UUnrealMCPBridge* Bridge;
|
|
31
|
-
TSharedPtr<FSocket> ListenerSocket;
|
|
32
|
-
TSharedPtr<FSocket> ClientSocket;
|
|
33
|
-
bool bRunning;
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#include "CoreMinimal.h"
|
|
4
|
+
#include "HAL/Runnable.h"
|
|
5
|
+
#include "Sockets.h"
|
|
6
|
+
#include "Interfaces/IPv4/IPv4Address.h"
|
|
7
|
+
|
|
8
|
+
class UUnrealMCPBridge;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Runnable class for the MCP server thread
|
|
12
|
+
*/
|
|
13
|
+
class FMCPServerRunnable : public FRunnable
|
|
14
|
+
{
|
|
15
|
+
public:
|
|
16
|
+
FMCPServerRunnable(UUnrealMCPBridge* InBridge, TSharedPtr<FSocket> InListenerSocket);
|
|
17
|
+
virtual ~FMCPServerRunnable();
|
|
18
|
+
|
|
19
|
+
// FRunnable interface
|
|
20
|
+
virtual bool Init() override;
|
|
21
|
+
virtual uint32 Run() override;
|
|
22
|
+
virtual void Stop() override;
|
|
23
|
+
virtual void Exit() override;
|
|
24
|
+
|
|
25
|
+
protected:
|
|
26
|
+
void HandleClientConnection(TSharedPtr<FSocket> ClientSocket);
|
|
27
|
+
void ProcessMessage(TSharedPtr<FSocket> Client, const FString& Message);
|
|
28
|
+
|
|
29
|
+
private:
|
|
30
|
+
UUnrealMCPBridge* Bridge;
|
|
31
|
+
TSharedPtr<FSocket> ListenerSocket;
|
|
32
|
+
TSharedPtr<FSocket> ClientSocket;
|
|
33
|
+
bool bRunning;
|
|
34
34
|
};
|
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
#pragma once
|
|
2
|
-
|
|
3
|
-
#include "CoreMinimal.h"
|
|
4
|
-
#include "EditorSubsystem.h"
|
|
5
|
-
#include "Sockets.h"
|
|
6
|
-
#include "SocketSubsystem.h"
|
|
7
|
-
#include "Http.h"
|
|
8
|
-
#include "Json.h"
|
|
9
|
-
#include "Interfaces/IPv4/IPv4Address.h"
|
|
10
|
-
#include "Interfaces/IPv4/IPv4Endpoint.h"
|
|
11
|
-
#include "Commands/UnrealMCPEditorCommands.h"
|
|
12
|
-
#include "Commands/UnrealMCPBlueprintCommands.h"
|
|
13
|
-
#include "Commands/UnrealMCPBlueprintNodeCommands.h"
|
|
14
|
-
#include "Commands/UnrealMCPProjectCommands.h"
|
|
15
|
-
#include "Commands/UnrealMCPUMGCommands.h"
|
|
16
|
-
#include "UnrealMCPBridge.generated.h"
|
|
17
|
-
|
|
18
|
-
class FMCPServerRunnable;
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Editor subsystem for MCP Bridge
|
|
22
|
-
* Handles communication between external tools and the Unreal Editor
|
|
23
|
-
* through a TCP socket connection. Commands are received as JSON and
|
|
24
|
-
* routed to appropriate command handlers.
|
|
25
|
-
*/
|
|
26
|
-
UCLASS()
|
|
27
|
-
class FLOCKBAYMCP_API UUnrealMCPBridge : public UEditorSubsystem
|
|
28
|
-
{
|
|
29
|
-
GENERATED_BODY()
|
|
30
|
-
|
|
31
|
-
public:
|
|
32
|
-
UUnrealMCPBridge();
|
|
33
|
-
virtual ~UUnrealMCPBridge();
|
|
34
|
-
|
|
35
|
-
// UEditorSubsystem implementation
|
|
36
|
-
virtual void Initialize(FSubsystemCollectionBase& Collection) override;
|
|
37
|
-
virtual void Deinitialize() override;
|
|
38
|
-
|
|
39
|
-
// Server functions
|
|
40
|
-
void StartServer();
|
|
41
|
-
void StopServer();
|
|
42
|
-
bool IsRunning() const { return bIsRunning; }
|
|
43
|
-
|
|
44
|
-
// Command execution
|
|
45
|
-
FString ExecuteCommand(const FString& CommandType, const TSharedPtr<FJsonObject>& Params);
|
|
46
|
-
|
|
47
|
-
private:
|
|
48
|
-
// Server state
|
|
49
|
-
bool bIsRunning;
|
|
50
|
-
TSharedPtr<FSocket> ListenerSocket;
|
|
51
|
-
TSharedPtr<FSocket> ConnectionSocket;
|
|
52
|
-
FRunnableThread* ServerThread;
|
|
53
|
-
|
|
54
|
-
// Server configuration
|
|
55
|
-
FIPv4Address ServerAddress;
|
|
56
|
-
uint16 Port;
|
|
57
|
-
|
|
58
|
-
// Command handler instances
|
|
59
|
-
TSharedPtr<FUnrealMCPEditorCommands> EditorCommands;
|
|
60
|
-
TSharedPtr<FUnrealMCPBlueprintCommands> BlueprintCommands;
|
|
61
|
-
TSharedPtr<FUnrealMCPBlueprintNodeCommands> BlueprintNodeCommands;
|
|
62
|
-
TSharedPtr<FUnrealMCPProjectCommands> ProjectCommands;
|
|
63
|
-
TSharedPtr<FUnrealMCPUMGCommands> UMGCommands;
|
|
64
|
-
};
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#include "CoreMinimal.h"
|
|
4
|
+
#include "EditorSubsystem.h"
|
|
5
|
+
#include "Sockets.h"
|
|
6
|
+
#include "SocketSubsystem.h"
|
|
7
|
+
#include "Http.h"
|
|
8
|
+
#include "Json.h"
|
|
9
|
+
#include "Interfaces/IPv4/IPv4Address.h"
|
|
10
|
+
#include "Interfaces/IPv4/IPv4Endpoint.h"
|
|
11
|
+
#include "Commands/UnrealMCPEditorCommands.h"
|
|
12
|
+
#include "Commands/UnrealMCPBlueprintCommands.h"
|
|
13
|
+
#include "Commands/UnrealMCPBlueprintNodeCommands.h"
|
|
14
|
+
#include "Commands/UnrealMCPProjectCommands.h"
|
|
15
|
+
#include "Commands/UnrealMCPUMGCommands.h"
|
|
16
|
+
#include "UnrealMCPBridge.generated.h"
|
|
17
|
+
|
|
18
|
+
class FMCPServerRunnable;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Editor subsystem for MCP Bridge
|
|
22
|
+
* Handles communication between external tools and the Unreal Editor
|
|
23
|
+
* through a TCP socket connection. Commands are received as JSON and
|
|
24
|
+
* routed to appropriate command handlers.
|
|
25
|
+
*/
|
|
26
|
+
UCLASS()
|
|
27
|
+
class FLOCKBAYMCP_API UUnrealMCPBridge : public UEditorSubsystem
|
|
28
|
+
{
|
|
29
|
+
GENERATED_BODY()
|
|
30
|
+
|
|
31
|
+
public:
|
|
32
|
+
UUnrealMCPBridge();
|
|
33
|
+
virtual ~UUnrealMCPBridge();
|
|
34
|
+
|
|
35
|
+
// UEditorSubsystem implementation
|
|
36
|
+
virtual void Initialize(FSubsystemCollectionBase& Collection) override;
|
|
37
|
+
virtual void Deinitialize() override;
|
|
38
|
+
|
|
39
|
+
// Server functions
|
|
40
|
+
void StartServer();
|
|
41
|
+
void StopServer();
|
|
42
|
+
bool IsRunning() const { return bIsRunning; }
|
|
43
|
+
|
|
44
|
+
// Command execution
|
|
45
|
+
FString ExecuteCommand(const FString& CommandType, const TSharedPtr<FJsonObject>& Params);
|
|
46
|
+
|
|
47
|
+
private:
|
|
48
|
+
// Server state
|
|
49
|
+
bool bIsRunning;
|
|
50
|
+
TSharedPtr<FSocket> ListenerSocket;
|
|
51
|
+
TSharedPtr<FSocket> ConnectionSocket;
|
|
52
|
+
FRunnableThread* ServerThread;
|
|
53
|
+
|
|
54
|
+
// Server configuration
|
|
55
|
+
FIPv4Address ServerAddress;
|
|
56
|
+
uint16 Port;
|
|
57
|
+
|
|
58
|
+
// Command handler instances
|
|
59
|
+
TSharedPtr<FUnrealMCPEditorCommands> EditorCommands;
|
|
60
|
+
TSharedPtr<FUnrealMCPBlueprintCommands> BlueprintCommands;
|
|
61
|
+
TSharedPtr<FUnrealMCPBlueprintNodeCommands> BlueprintNodeCommands;
|
|
62
|
+
TSharedPtr<FUnrealMCPProjectCommands> ProjectCommands;
|
|
63
|
+
TSharedPtr<FUnrealMCPUMGCommands> UMGCommands;
|
|
64
|
+
};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
#pragma once
|
|
2
|
-
|
|
3
|
-
#include "CoreMinimal.h"
|
|
4
|
-
#include "Modules/ModuleManager.h"
|
|
5
|
-
|
|
6
|
-
class FUnrealMCPModule : public IModuleInterface
|
|
7
|
-
{
|
|
8
|
-
public:
|
|
9
|
-
/** IModuleInterface implementation */
|
|
10
|
-
virtual void StartupModule() override;
|
|
11
|
-
virtual void ShutdownModule() override;
|
|
12
|
-
|
|
13
|
-
static inline FUnrealMCPModule& Get()
|
|
14
|
-
{
|
|
15
|
-
return FModuleManager::LoadModuleChecked<FUnrealMCPModule>("FlockbayMCP");
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
static inline bool IsAvailable()
|
|
19
|
-
{
|
|
20
|
-
return FModuleManager::Get().IsModuleLoaded("FlockbayMCP");
|
|
21
|
-
}
|
|
22
|
-
};
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#include "CoreMinimal.h"
|
|
4
|
+
#include "Modules/ModuleManager.h"
|
|
5
|
+
|
|
6
|
+
class FUnrealMCPModule : public IModuleInterface
|
|
7
|
+
{
|
|
8
|
+
public:
|
|
9
|
+
/** IModuleInterface implementation */
|
|
10
|
+
virtual void StartupModule() override;
|
|
11
|
+
virtual void ShutdownModule() override;
|
|
12
|
+
|
|
13
|
+
static inline FUnrealMCPModule& Get()
|
|
14
|
+
{
|
|
15
|
+
return FModuleManager::LoadModuleChecked<FUnrealMCPModule>("FlockbayMCP");
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
static inline bool IsAvailable()
|
|
19
|
+
{
|
|
20
|
+
return FModuleManager::Get().IsModuleLoaded("FlockbayMCP");
|
|
21
|
+
}
|
|
22
|
+
};
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
# Unreal MCP
|
|
2
|
-
|
|
3
|
-
Python bridge for interacting with Unreal Engine 5.5 using the Model Context Protocol (MCP).
|
|
4
|
-
|
|
5
|
-
## Setup
|
|
6
|
-
|
|
7
|
-
1. Make sure Python 3.10+ is installed
|
|
8
|
-
2. Install `uv` if you haven't already:
|
|
9
|
-
```bash
|
|
10
|
-
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
11
|
-
```
|
|
12
|
-
3. Create and activate a virtual environment:
|
|
13
|
-
```bash
|
|
14
|
-
uv venv
|
|
15
|
-
source .venv/bin/activate # On Unix/macOS
|
|
16
|
-
# or
|
|
17
|
-
.venv\Scripts\activate # On Windows
|
|
18
|
-
```
|
|
19
|
-
4. Install dependencies:
|
|
20
|
-
```bash
|
|
21
|
-
uv pip install -e .
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
At this point, you can configure your MCP Client (Claude Desktop, Cursor, Windsurf) to use the Unreal MCP Server as per the [Configuring your MCP Client](README.md#configuring-your-mcp-client).
|
|
25
|
-
|
|
26
|
-
## Testing Scripts
|
|
27
|
-
|
|
28
|
-
There are several scripts in the [scripts](./scripts) folder. They are useful for testing the tools and the Unreal Bridge via a direct connection. This means that you do not need to have an MCP Server running.
|
|
29
|
-
|
|
30
|
-
You should make sure you have installed dependencies and/or are running in the `uv` virtual environment in order for the scripts to work.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
## Troubleshooting
|
|
34
|
-
|
|
35
|
-
- Make sure Unreal Engine editor is loaded loaded and running before running the server.
|
|
36
|
-
- Check logs in `unreal_mcp.log` for detailed error information
|
|
37
|
-
|
|
38
|
-
## Development
|
|
39
|
-
|
|
1
|
+
# Unreal MCP
|
|
2
|
+
|
|
3
|
+
Python bridge for interacting with Unreal Engine 5.5 using the Model Context Protocol (MCP).
|
|
4
|
+
|
|
5
|
+
## Setup
|
|
6
|
+
|
|
7
|
+
1. Make sure Python 3.10+ is installed
|
|
8
|
+
2. Install `uv` if you haven't already:
|
|
9
|
+
```bash
|
|
10
|
+
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
11
|
+
```
|
|
12
|
+
3. Create and activate a virtual environment:
|
|
13
|
+
```bash
|
|
14
|
+
uv venv
|
|
15
|
+
source .venv/bin/activate # On Unix/macOS
|
|
16
|
+
# or
|
|
17
|
+
.venv\Scripts\activate # On Windows
|
|
18
|
+
```
|
|
19
|
+
4. Install dependencies:
|
|
20
|
+
```bash
|
|
21
|
+
uv pip install -e .
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
At this point, you can configure your MCP Client (Claude Desktop, Cursor, Windsurf) to use the Unreal MCP Server as per the [Configuring your MCP Client](README.md#configuring-your-mcp-client).
|
|
25
|
+
|
|
26
|
+
## Testing Scripts
|
|
27
|
+
|
|
28
|
+
There are several scripts in the [scripts](./scripts) folder. They are useful for testing the tools and the Unreal Bridge via a direct connection. This means that you do not need to have an MCP Server running.
|
|
29
|
+
|
|
30
|
+
You should make sure you have installed dependencies and/or are running in the `uv` virtual environment in order for the scripts to work.
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
## Troubleshooting
|
|
34
|
+
|
|
35
|
+
- Make sure Unreal Engine editor is loaded loaded and running before running the server.
|
|
36
|
+
- Check logs in `unreal_mcp.log` for detailed error information
|
|
37
|
+
|
|
38
|
+
## Development
|
|
39
|
+
|
|
40
40
|
To add new tools, modify the `UnrealMCPBridge.py` file to add new command handlers, and update the `unreal_mcp_server.py` file to expose them through the HTTP API.
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
[project]
|
|
2
|
-
name = "unreal-mcp"
|
|
3
|
-
version = "0.1.0"
|
|
4
|
-
description = "Unreal MCP Server: A server for Unreal Engine integration via the Model Context Protocol (MCP)."
|
|
5
|
-
readme = "README.md"
|
|
6
|
-
requires-python = ">=3.10"
|
|
7
|
-
dependencies = [
|
|
8
|
-
"mcp[cli]>=1.4.1",
|
|
9
|
-
"fastmcp>=0.2.0",
|
|
10
|
-
"uvicorn",
|
|
11
|
-
"fastapi",
|
|
12
|
-
"pydantic>=2.6.1",
|
|
13
|
-
"requests"
|
|
14
|
-
]
|
|
15
|
-
|
|
16
|
-
[build-system]
|
|
17
|
-
requires = ["setuptools>=42", "wheel"]
|
|
18
|
-
build-backend = "setuptools.build_meta"
|
|
19
|
-
|
|
20
|
-
[tool.setuptools]
|
|
21
|
-
# The main server script is a single-file module
|
|
22
|
-
py-modules = ["unreal_mcp_server"]
|
|
1
|
+
[project]
|
|
2
|
+
name = "unreal-mcp"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "Unreal MCP Server: A server for Unreal Engine integration via the Model Context Protocol (MCP)."
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.10"
|
|
7
|
+
dependencies = [
|
|
8
|
+
"mcp[cli]>=1.4.1",
|
|
9
|
+
"fastmcp>=0.2.0",
|
|
10
|
+
"uvicorn",
|
|
11
|
+
"fastapi",
|
|
12
|
+
"pydantic>=2.6.1",
|
|
13
|
+
"requests"
|
|
14
|
+
]
|
|
15
|
+
|
|
16
|
+
[build-system]
|
|
17
|
+
requires = ["setuptools>=42", "wheel"]
|
|
18
|
+
build-backend = "setuptools.build_meta"
|
|
19
|
+
|
|
20
|
+
[tool.setuptools]
|
|
21
|
+
# The main server script is a single-file module
|
|
22
|
+
py-modules = ["unreal_mcp_server"]
|