Sandbox
@winyunq/UnrealMotionGraphicsMCP

MCP server plugin for Unreal Engine UMG editing

UMG MCP turns Unreal Editor UMG work into explicit MCP tool calls. An agent can read the widget tree, patch UI as JSON, create Blueprint nodes and links, edit materials, and build UMG animations without relying on fragile click automation.

197 stars38 forksC++Updated 1mo ago
Can Gemini 3 design UMG in Unreal 5? UE5 MCP Demo & GitHub Project!
winyunq1.6k views • 9 months ago

Videos about this repo

Who it's for

Builders who use MCP-capable agents to edit Unreal UMG and Blueprint UI inside Unreal Engine.

What it delivers

You can let your agent make reviewable UI changes in Unreal instead of guessing from screenshots or manual clicks.

What it does

Widget tree editing

Creates widgets, updates slots and properties, reorders nodes, replaces subtrees, and exports or reapplies UI as JSON.

Blueprint and BlueCode control

Creates graphs, nodes, pins, references, and links for UMG Blueprint logic through structured commands.

Material editing

Builds UI materials, sets parameters, adds HLSL snippets, and validates supported material fields.

Animation control

Creates UMG animation tracks and keyframes for transform, opacity, color, and timing.

MCP client connection flow

Runs a Python MCP server that discovers live Unreal editor instances and connects to the right project port.

Protocol checks and smoke tests

Includes static protocol tests and an editor smoke test to verify widget, blueprint, material, and animation flows.

How to get it

  1. 1Use this if you want to inspect the protocol, develop fixes, or integrate the plugin…
    cd D:\UE5Project\YourProject
    mkdir Plugins
    cd Plugins
    git clone https://github.com/winyunq/UnrealMotionGraphicsMCP.git UmgMcp
  2. 2Run 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
  3. 3Run an editor smoke test after Unreal Editor is open
    uv run python APITest\UE5_Editor_Imitation.py

README

中文版

UMG MCP logo

UMG MCP for Unreal Engine 5.8

Build, inspect, refactor, and version UMG UI through AI agents and MCP tools.

Web Manual · Install · MCP Client · Fab Marketplace · Discord

License MIT Unreal Engine 5.8 Platform Win64 AgentSeal MCP


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:

Start hereOpen the web manual
Repository copyDocument/index.html and Document/index_zh.html

Why It Exists

Problem in normal AI UI workUMG MCP approach
Agents guess from screenshotsAgents read the actual widget tree, slots, properties, materials, and graph state
UI edits are hard to diffUMG can be exported, patched, and re-applied as structured JSON
Blueprint wiring is click-heavyBlueCode and MCP commands create nodes, pins, references, and links directly
Long chat history wastes contextFab 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.

  1. Open the Fab Marketplace listing.
  2. Add the plugin to your Epic Games / Unreal Engine library.
  3. Install it for Unreal Engine 5.8.
  4. Open your project, enable UmgMcp, then restart the editor.
  5. 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 uv is 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

GoalWeb pageRepository file
Set up model providersModel configurationDocument/model_config.html
Use the in-editor chat workflowChat dialogue guideDocument/chat_dialogue.html
Understand MCP supportMCP supportDocument/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

AreaExamples
UMG widgetsCreate widgets, set slot data, reorder tree nodes, replace subtrees, export and apply JSON
Blueprint / BlueCodeCreate graphs, add nodes, connect pins, bind widget references, apply compact code-like statements
MaterialsBuild UI materials, set scalar/vector parameters, add HLSL snippets, validate supported material fields
Animation / SequencerCreate UMG animation tracks and keyframes for render transform, opacity, color, and timing
Editor utilitiesInspect 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

Troubleshooting

SymptomFix
MCP client reports ConnectionRefusedError, WinError 10061, or WinError 1225Open 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 recognizedInstall uv, restart the terminal, or use the optional local virtual environment setup above.
Plugin does not compile after copying between projectsConfirm 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 widgetSet the active UMG target first or pass the full asset path, for example /Game/UI/WBP_LoginPanel.WBP_LoginPanel.
A protocol command is unclearUse the web manual for workflow guidance and the protocol markdown files for exact payload shapes.

Fab And Open Source

EditionBest forNotes
Open source repositoryProtocol review, research, custom integration, issue fixesCore UMG MCP behavior remains available here.
Fab editionArtists, technical artists, and production projects that want a packaged installAdds 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.

Files in the repo

Repository payload23 top-level entries
  • .github
  • Config
  • Document
  • Resources
  • Skills
  • Source
  • .Doxyfile
  • .gitattributes
  • .gitignore
  • check.py
  • class.py
  • CONTRIBUTING.md
  • export_fab.bat
  • export_fab.py
  • fab_export.json
  • Gemini_export_binary.py
  • Gemini_history_user_inputs.txt
  • Gemini_LiteRM_Integration_Plan.md
  • Gemini_README_Fix.md
  • LICENSE
  • Readme_zh.md
  • Readme.md
  • UmgMcp.uplugin

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More connectors

High-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph — average repo in milliseconds. 158 languages, sub-ms queries, 99% fewer tokens. Single static binary, zero dependencies.

43k

Universal provider proxy for OpenAI Codex & Claude Code — use any LLM (Claude, Gemini, Grok, DeepSeek, Ollama…) with Codex CLI, App, SDK, and Claude Code

14k
okf-memory/
okf-agent-memory

Git-native persistent memory for AI coding agents. Implements Google OKF v0.2 with sub-300µs in-memory BM25 search, embedded MCP server, and progressive disclosure. Slashes token bloat by 80% with zero external databases or dependencies. Built in pure Go.

547
tirth8205/
code-review-graph

Local-first code intelligence graph for MCP and CLI. Builds a persistent map of your codebase so AI coding tools read only what matters, with benchmarked context reductions on reviews and large-repo workflows.

31k
2akouwu/
reverify

Stop your AI from making things up — it proposes, deterministic tools decide, every claim checked against ground truth with evidence. Grounded facts and context survive resets. Reverse engineering is the proving ground. MCP server + CLI.

1.1k
t8y2/dbxConnectors

20 MB lightweight cross-platform database client for 90+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 90+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP Server。

19k