UMGBridgePlugin
TCP-based bridge plugin for AI-assisted UMG widget creation via MCP (Model Context Protocol)
Ask AI about UMGBridgePlugin
Powered by Claude Β· Grounded in docs
I know everything about UMGBridgePlugin. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
UMGBridge Plugin
A TCP-based bridge plugin for Unreal Engine 5 that enables AI-assisted UMG (Unreal Motion Graphics) widget creation and manipulation via MCP (Model Context Protocol).
Features
- TCP Server: Built-in TCP server listening on port 9999 for receiving commands
- Widget Operations: Create, modify, delete, and query UMG widgets programmatically
- Animation Support: Create widget animations with keyframes
- Asset Management: Create, open, and save Widget Blueprints
- Screenshot: Capture widget preview screenshots
- JSON Protocol: Simple JSON-based command/response protocol
- MCP Integration: Works with Claude Code and other MCP-compatible AI assistants
- UI Analysis: Analyze UI screenshots and generate widget hierarchies
Architecture
βββββββββββββββββββ TCP βββββββββββββββββββ
β AI Assistant βββββββββββββββΊβ Python MCP β
β (Claude Code) β stdio β Server β
βββββββββββββββββββ ββββββββββ¬βββββββββ
β
β TCP:9999
βΌ
ββββββββββββββββββ
β UMGBridge β
β TCP Server β
β (UE5 C++) β
ββββββββββ¬ββββββββ
β
βΌ
ββββββββββββββββββ
β Command β
β Executor β
ββββββββββ¬ββββββββ
β
βββββββββββββββββββββββΌββββββββββββββββββββββ
βΌ βΌ βΌ
βββββββββββββββββ βββββββββββββββββ βββββββββββββββββ
β Widget β β Animation β β Asset β
β Handler β β Handler β β Handler β
βββββββββββββββββ βββββββββββββββββ βββββββββββββββββ
Requirements
- Unreal Engine 5.3 or later
- Python 3.10+ (for MCP server)
- Windows 10/11
Installation
Plugin Installation
- Clone or download this repository
- Copy the
UMGBridgePluginfolder to your project'sPluginsdirectory - Restart Unreal Editor
- Enable the plugin in Edit > Plugins > UMG Bridge
MCP Server Installation
# Navigate to the MCP server directory
cd Plugins/UMGBridgePlugin/Resources/mcp_server
# Install the package
pip install -e .
Or using uvx:
uvx install umg-mcp
Configuration
Configure the plugin in Edit > Project Settings > Plugins > UMG Bridge:
| Setting | Description | Default |
|---|---|---|
| Server Port | TCP port for incoming connections | 9999 |
| Auto Start Server | Start server automatically when plugin loads | false |
| Max Connections | Maximum number of concurrent connections | 10 |
| Connection Timeout | Connection timeout in seconds | 30.0 |
| Log Commands | Log all received commands | true |
| Log Responses | Log all sent responses | false |
Claude Code Configuration
Add to your Claude Code MCP settings:
Windows: %APPDATA%\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"umg-mcp": {
"command": "umg-mcp",
"description": "MCP server for creating UMG widgets in UE5"
}
}
}
Quick Start
- Open your UE5 project with the UMGBridge plugin enabled
- Create or open a Widget Blueprint
- Start the MCP server (automatically done when using Claude Code with MCP)
- Use natural language to create UI:
Create a main menu UI with:
- A title text "My Game" at the top
- A vertical box with Start, Options, and Quit buttons
- Style the buttons with blue background
Available MCP Tools
Connection
| Tool | Description |
|---|---|
umg_connect | Connect to UE5 UMGBridge plugin via TCP |
umg_disconnect | Disconnect from UE5 |
Widget Operations
| Tool | Description |
|---|---|
umg_create_widget | Create a UMG widget in UE5 |
umg_set_property | Set a property on a widget |
umg_delete_widget | Delete a widget |
umg_get_widget_tree | Get the widget hierarchy as JSON |
umg_batch_create | Create multiple widgets in one request |
Animation Operations
| Tool | Description |
|---|---|
umg_create_animation | Create a new animation |
umg_add_keyframe | Add a keyframe to an animation |
umg_play_animation | Play an animation |
umg_stop_animation | Stop an animation |
umg_list_animations | List all animations in the blueprint |
umg_apply_animation_preset | Apply a predefined animation preset |
Asset Operations
| Tool | Description |
|---|---|
umg_create_widget_blueprint | Create a new Widget Blueprint asset |
umg_open_widget_blueprint | Open an existing Widget Blueprint |
umg_save_asset | Save the current blueprint |
umg_take_screenshot | Take a screenshot of the widget preview |
UI Analysis
| Tool | Description |
|---|---|
umg_analyze_ui | Analyze a UI image and generate widget structure |
umg_create_from_description | Create UMG widgets from natural language description |
umg_create_from_json | Create UMG widgets from JSON description |
Supported Widget Types
Layout Widgets
- CanvasPanel, VerticalBox, HorizontalBox, GridPanel
- Overlay, ScrollBox, SizeBox, ScaleBox
- WrapBox, UniformGridPanel
- Border, InvalidationBox, RetainerBox
Basic Widgets
- Button, TextBlock, Image
- Spacer, ProgressBar, Slider
Input Widgets
- CheckBox, EditableText, EditableTextBox
- ComboBoxString, SpinBox, MultiLineEditableText
Advanced Widgets
- ListView, TreeView, RichTextBlock
Animation Presets
| Preset | Description |
|---|---|
fade_in, fade_out, fade_in_out | Opacity fade animations |
slide_in_left, slide_in_right, slide_in_top, slide_in_bottom | Slide from screen edges |
scale_up, scale_down | Scale animations |
bounce, shake, pulse, rotate | Special effect animations |
Protocol
Request Format
{
"request_id": "unique-request-id",
"command": "command_name",
"params": {
// Command-specific parameters
}
}
Response Format
{
"request_id": "unique-request-id",
"success": true,
"result": {
// Command-specific result
}
}
Error Response
{
"request_id": "unique-request-id",
"success": false,
"error": {
"code": "ERROR_CODE",
"message": "Error description"
}
}
Example Usage
Creating a Simple Button
# Connect to UE5
umg_connect(host="127.0.0.1", port=9999)
# Create a widget blueprint
umg_create_widget_blueprint(asset_path="/Game/UI/WBP_MainMenu", name="WBP_MainMenu")
# Create widgets
umg_batch_create(widgets=[
{"type": "CanvasPanel", "name": "RootCanvas"},
{"type": "Button", "name": "StartButton", "parent": "RootCanvas",
"properties": {"text": "Start Game", "font_size": 24}}
])
# Save the asset
umg_save_asset()
Applying Animation
# Create animation
umg_create_animation(name="ButtonFade", target_widget="RootCanvas.StartButton")
# Add keyframes
umg_add_keyframe(animation="ButtonFade", widget="RootCanvas.StartButton",
property="RenderOpacity", time=0.0, value=0.0)
umg_add_keyframe(animation="ButtonFade", widget="RootCanvas.StartButton",
property="RenderOpacity", time=0.5, value=1.0)
Project Structure
UMGBridgePlugin/
βββ Source/UMGBridge/
β βββ Public/
β β βββ Animation/ # Animation builder
β β βββ Commands/ # Command types and executor
β β βββ TCP/ # TCP server interface
β β βββ Widgets/ # Widget factory
β β βββ UMGBridgeModule.h
β βββ Private/
β βββ Animation/
β βββ Commands/
β β βββ Handlers/ # Command handlers
β βββ TCP/
β βββ Widgets/
βββ Resources/
β βββ mcp_server/
β βββ src/umg_mcp/
β β βββ models/ # Data models
β β βββ parser/ # UI parsers
β β βββ tools/ # MCP tools
β β βββ transport/ # TCP client
β βββ pyproject.toml
β βββ README.md
βββ UMGBridge.uplugin
βββ README.md
βββ CHANGELOG.md
βββ LICENSE
Troubleshooting
Connection Failed
- Ensure the UMGBridge plugin is enabled in UE5
- Check if Auto Start Server is enabled, or manually start the server
- Verify port 9999 is not blocked by firewall
- Check UE5 Output Log for plugin initialization messages
Widget Not Found
- Ensure you have opened a Widget Blueprint before creating widgets
- Use the correct widget path format:
Parent.Child.Grandchild - Check widget names are unique within their parent
Animation Keyframes Not Working
Note: The current implementation of keyframe creation is a placeholder. Full MovieScene integration requires additional UE5 API work.
- Animation objects can be created
- Animation presets can be applied
- Keyframe creation logs requests but does not create actual keyframes yet
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Areas for Contribution
- Full MovieScene keyframe implementation
- Additional widget types
- More animation presets
- Widget property validation
- Undo/redo support
- Widget template system
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
- Documentation: https://github.com/umg-mcp/UMGBridgePlugin#readme
- Issues: https://github.com/umg-mcp/UMGBridgePlugin/issues
- Repository: https://github.com/umg-mcp/UMGBridgePlugin
