Files
unreal-engine-mcp-system-pl…/Source/UEBlueprintMCPEditor/Private/SMCPWizard.h
Bonchellon 341e694ab5 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>
2026-06-24 01:35:53 +03:00

50 lines
1.5 KiB
C++

#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);
};