UMG MCP turns Unreal Editor UMG work into explicit, reviewable tool calls. An AI agent can create widgets, update layout, wire Blueprint logic, edit materials, drive UMG animation, and round-trip UI files through JSON instead of relying on screenshots or fragile click automation.
The README is the front door. The step-by-step tutorials live in the deployed documentation site:
Why It Exists
| Problem in normal AI UI work | UMG MCP approach |
|---|---|
| Agents guess from screenshots | Agents read the actual widget tree, slots, properties, materials, and graph state |
| UI edits are hard to diff | UMG can be exported, patched, and re-applied as structured JSON |
| Blueprint wiring is click-heavy | BlueCode and MCP commands create nodes, pins, references, and links directly |
| Long chat history wastes context | Fab edition adds production packaging and context-management work for larger sessions |
Blueprint API Status (Transitional)
BlueCode now separates attention-compressed semantic reads from round-trip/debug evidence. Union writes support graph revisions, source maps, dry-run plans, LCS right-anchor insertion, safe append, and rollback on failure. It is still transitional: complete structured CFG recovery and editing for nested branches, loops, Sequence/Switch, latent nodes, and arbitrary irreducible graphs remains v2 work. Low-level node commands are compatibility execution primitives, not the BlueCode language.
Install
UMG MCP currently targets Unreal Engine 5.8 on Win64. The plugin descriptor in this package is set to EngineVersion: 5.8.0.
Option A: Fab Edition
Use this if you want the shortest install path and the in-editor workflow.
- Open the Fab Marketplace listing.
- Add the plugin to your Epic Games / Unreal Engine library.
- Install it for Unreal Engine 5.8.
- Open your project, enable
UmgMcp, then restart the editor. - Open the plugin settings and configure your model provider. The web manual covers Google OAuth, Gemini API, ZhipuAI, and OpenAI-compatible endpoints.
Option B: Source Edition
Use this if you want to inspect the protocol, develop fixes, or integrate the plugin manually.
cd D:\UE5Project\YourProject
mkdir Plugins
cd Plugins
git clone https://github.com/winyunq/UnrealMotionGraphicsMCP.git UmgMcp
Then open the project in Unreal Engine 5.8 and allow Unreal Build Tool to compile the plugin. If you move the plugin between projects, keep the final folder name as UmgMcp unless you also update your MCP client configuration.
Connect An MCP Client
External MCP clients use the Python server under Resources/Python. Each Unreal Editor instance binds an OS-assigned local port and publishes it to the shared UmgMcp discovery registry. With one editor, the Python front end selects it automatically; with several editors, use list_umg_mcp_servers and connect_umg_mcp to choose the project.
Add this to the mcpServers section of your client settings, replacing the path with your own absolute plugin path:
{
"mcpServers": {
"UmgMcp": {
"command": "uv",
"args": [
"run",
"--directory",
"D:\\UE5Project\\YourProject\\Plugins\\UmgMcp\\Resources\\Python",
"UmgMcpServer.py"
]
}
}
}
Notes:
- The path must point to
Resources/Python, not the repository root. - On Windows JSON paths need escaped backslashes:
D:\\Path\\To\\Project. - If
uvis missing, install it first or create the optional virtual environment below.
Optional local Python setup:
cd D:\UE5Project\YourProject\Plugins\UmgMcp\Resources\Python
uv venv
.\.venv\Scripts\activate
uv pip install "mcp[cli]>=1.4.1" fastmcp uvicorn fastapi "pydantic>=2.6.1" requests
python -c "import mcp, fastapi, pydantic, requests; print('deps ok')"
Verify The Setup
Run static protocol checks without opening a project:
cd D:\UE5Project\YourProject\Plugins\UmgMcp\Resources\Python
uv run python APITest\Umg_Widget_Protocol_Static_Check.py
uv run python APITest\Blueprint_MCP_Schema_Check.py
uv run python APITest\Material_Protocol_Static_Check.py
uv run python APITest\Animation_Protocol_Static_Check.py
Run an editor smoke test after Unreal Editor is open:
uv run python APITest\UE5_Editor_Imitation.py
If the editor-side test cannot connect, check that the plugin is enabled and use list_umg_mcp_servers to confirm its dynamically assigned endpoint is discoverable.
Documentation Map
| Goal | Web page | Repository file |
|---|---|---|
| Set up model providers | Model configuration | Document/model_config.html |
| Use the in-editor chat workflow | Chat dialogue guide | Document/chat_dialogue.html |
| Understand MCP support | MCP support | Document/mcp_support.html |
| Widget command protocol | - | Document/UmgWidgetMcpProtocol.md |
| Blueprint / BlueCode protocol | - | Document/BlueprintBluecodeProtocol.md |
| Material and HLSL protocol | - | Document/MaterialMcpProtocol.md |
| Animation protocol | - | Document/AnimationMcpProtocol.md |
| Google OAuth setup | - | Document/Google_OAuth_Setup.md |
What Agents Can Do
| Area | Examples |
|---|---|
| UMG widgets | Create widgets, set slot data, reorder tree nodes, replace subtrees, export and apply JSON |
| Blueprint / BlueCode | Create graphs, add nodes, connect pins, bind widget references, apply compact code-like statements |
| Materials | Build UI materials, set scalar/vector parameters, add HLSL snippets, validate supported material fields |
| Animation / Sequencer | Create UMG animation tracks and keyframes for render transform, opacity, color, and timing |
| Editor utilities | Inspect selected assets, read project state, manage the active target, and run focused tests |
Example prompt for an MCP-capable agent:
Create /Game/UI/WBP_LoginPanel with a centered login card, email and password fields,
a primary submit button, and a subtle material background. Export the final widget JSON
and summarize which MCP tools changed the asset.
Videos
- Designing an RTS UI
- Recreating the UE5 editor
- Editing UMG inside the UMG editor
- Chatting with Gemini to edit a UMG file
Troubleshooting
| Symptom | Fix |
|---|---|
MCP client reports ConnectionRefusedError, WinError 10061, or WinError 1225 |
Open Unreal Editor first, enable UmgMcp, then call list_umg_mcp_servers. Each editor uses a unique OS-assigned port; reconnect to the endpoint in its live discovery record. |
uv is not recognized |
Install uv, restart the terminal, or use the optional local virtual environment setup above. |
| Plugin does not compile after copying between projects | Confirm the project is using UE 5.8 Win64, remove stale generated build output for this plugin/project, then let Unreal rebuild. |
| Tool calls succeed but edit the wrong widget | Set the active UMG target first or pass the full asset path, for example /Game/UI/WBP_LoginPanel.WBP_LoginPanel. |
| A protocol command is unclear | Use the web manual for workflow guidance and the protocol markdown files for exact payload shapes. |
Fab And Open Source
| Edition | Best for | Notes |
|---|---|---|
| Open source repository | Protocol review, research, custom integration, issue fixes | Core UMG MCP behavior remains available here. |
| Fab edition | Artists, technical artists, and production projects that want a packaged install | Adds the marketplace install path, in-editor workflow packaging, and production-focused support. |
Core protocol improvements are intended to flow back to the open repository. If you report an issue from a project using the Fab package, include your UE version, plugin version, target asset path, and the failing MCP tool payload when possible.
Developer Program
Developers who contribute useful fixes, tests, documentation, or protocol examples can request Fab access for validation work. Open an issue or contact the maintainer with the contribution link and the scenario you want to test.
License
This repository is released under the MIT License.
No comments yet
Be the first to share your take.