Add in-editor Slate setup wizard (Tools > MCP Setup Wizard)
Native UE editor tab (SMCPWizard) so setup happens inside Unreal, not just the Node CLI. Three sections: - Remote Control: live status of the :30010 bridge + a button to start it (WebControl.StartServer + EnableServerOnStartup). - API keys: paste/save the agent-gateway Anthropic token (auth.env) and ElevenLabs key (integrations.json) — both git-ignored. - MCP tools: lists the catalogue from tools.json. Wiring: - UEBlueprintMCPEditor module registers a nomad tab + a Tools-menu entry. - Build.cs gains the Projects module (IPluginManager). - server.js exports TOOLS and only launches the stdio server when run directly (isMain), so src/dumpTools.mjs can generate tools.json. `npm run dump-tools`. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
49
Source/UEBlueprintMCPEditor/Private/SMCPWizard.h
Normal file
49
Source/UEBlueprintMCPEditor/Private/SMCPWizard.h
Normal file
@ -0,0 +1,49 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "Widgets/SCompoundWidget.h"
|
||||
#include "Styling/SlateColor.h"
|
||||
|
||||
class SEditableTextBox;
|
||||
|
||||
/**
|
||||
* In-editor setup wizard for the UE Blueprint MCP plugin. A Nomad tab opened from
|
||||
* Tools > MCP Setup Wizard. Three sections:
|
||||
* 1. Remote Control — show status of the HTTP bridge (:30010) and start it.
|
||||
* 2. API keys — paste the agent-gateway Anthropic token + ElevenLabs key.
|
||||
* 3. MCP tools — list the tool catalogue (read from the plugin's tools.json).
|
||||
*/
|
||||
class SMCPWizard : public SCompoundWidget
|
||||
{
|
||||
public:
|
||||
SLATE_BEGIN_ARGS(SMCPWizard) {}
|
||||
SLATE_END_ARGS()
|
||||
|
||||
void Construct(const FArguments& InArgs);
|
||||
|
||||
private:
|
||||
// --- Remote Control ---
|
||||
enum class ERCStatus : uint8 { Unknown, Checking, Up, Down };
|
||||
ERCStatus RcStatus = ERCStatus::Unknown;
|
||||
FText GetRcStatusText() const;
|
||||
FSlateColor GetRcStatusColor() const;
|
||||
FReply OnStartRemoteControl();
|
||||
FReply OnRefreshStatus();
|
||||
void PingRemoteControl();
|
||||
|
||||
// --- API keys ---
|
||||
TSharedPtr<SEditableTextBox> AnthropicBox;
|
||||
TSharedPtr<SEditableTextBox> ElevenLabsBox;
|
||||
FReply OnSaveAnthropicToken();
|
||||
FReply OnSaveElevenLabsKey();
|
||||
void LoadExistingKeys();
|
||||
|
||||
// --- Tools ---
|
||||
TSharedRef<SWidget> BuildToolsSection();
|
||||
|
||||
// --- helpers ---
|
||||
FString PluginDir() const;
|
||||
FString GatewayDir() const;
|
||||
static void Notify(const FText& Message, bool bSuccess);
|
||||
static bool UpsertEnvVar(const FString& FilePath, const FString& Key, const FString& Value);
|
||||
};
|
||||
Reference in New Issue
Block a user