UnrealMCP plugs Unreal Engine 5 into any LLM agent โ Claude, Cursor, Copilot โ through the Model Context Protocol. Describe what you want; watch it appear in the viewport.
You: "Spawn a row of glowing cubes and point a camera at them."
Agent: โฆcalls
execute_python, runsunrealAPI, returns the captured log.Editor: the cubes are there.
That's the whole idea. An agent gets a small set of MCP tools wired straight into a running Unreal Editor, so natural language turns into real edits โ actors, assets, materials, Blueprints โ with the engine's own output flowing back so the agent can see what it did and fix its own mistakes.
Making games is hard, and the learning curve keeps a lot of good ideas trapped in people's heads. UnrealMCP is a bet that the gap between "I can picture it" and "it exists in the engine" should be a conversation. It's also a great way to learn Unreal โ you can watch the agent work and read every API call it makes.
โโโโโโโโโโโโโโโ MCP / stdio โโโโโโโโโโโโโโโโโโโโโ TCP :55557 โโโโโโโโโโโโโโโโโโโโโโโ
โ Claude / โ โโโโโโโโโโโโโโโบ โ Python MCP server โ โโโโโโโโโโโโโโบ โ UnrealMCP plugin โ
โ Cursor / โ โ (server/) โ โ (in Unreal Editor) โ
โ Copilot โ โโโโโโโโโโโโโโโ โ โ โโโโโโโโโโโโโโ โ runs on game thread โ
โโโโโโโโโโโโโโโ tool calls โโโโโโโโโโโโโโโโโโโโโ JSON cmds โโโโโโโโโโโโโโโโโโโโโโโ
- Plugin (
MCPProject/Plugins/UnrealMCP) โ aUEditorSubsystemstarts a TCP server on127.0.0.1:55557from anFRunnableworker thread. Requests are JSON{ "type": <command>, "params": {โฆ} }; each command is marshalled onto the game thread and answered with{ "status": "success" | "error", โฆ }. - Server (
server/) โ a FastMCP server (stdio transport) exposing MCP tools that forward to the plugin.
The headliner tool, execute_python, runs code in the editor's Python scope
(the full unreal module) and returns captured logs and any exception trace โ
so the agent always knows what actually happened. It's the universal escape hatch
while higher-level tools grow up around it.
| Tool | What it does |
|---|---|
ping |
Health check โ returns pong. |
execute_python |
Run arbitrary Python in the editor; returns logs + errors. |
spawn_actor |
Spawn an actor (any unreal class) with location/rotation/scale/label; static meshes get a mesh. |
list_actors |
List level actors (label, class, location), with optional name filter. |
set_actor_transform |
Move / rotate / scale the actor(s) with a given label. |
delete_actor |
Delete the actor(s) with a given label. |
The actor tools are thin wrappers over execute_python โ no plugin rebuild
needed to add more, so the surface grows fast.
Requirements: Unreal Engine 5.7 (other 5.x likely work with minor tweaks), a C++ toolchain UnrealBuildTool can use (Visual Studio 2022 or VS Build Tools 2022 with the MSVC v143 toolchain + a Windows 10/11 SDK), Python 3.10+, and an MCP-capable client (Claude Desktop / Claude Code, Cursor, โฆ).
1 โ Build the plugin
& "C:\Program Files\Epic Games\UE_5.7\Engine\Build\BatchFiles\Build.bat" `
MCPProjectEditor Win64 Development `
-Project="<repo>\MCPProject\MCPProject.uproject" -WaitMutexOpen MCPProject/MCPProject.uproject. The plugin auto-starts its server on load โ
look for MCP server listening on 127.0.0.1:55557 in the Output Log.
2 โ Set up the MCP server
cd server
python -m venv .venv
.venv/Scripts/python -m pip install -r requirements.txt # Windows3 โ Connect your agent
See docs/connecting-agents.md for Claude Desktop /
Claude Code / Cursor. Minimal Claude Desktop entry:
{
"mcpServers": {
"unreal-mcp": {
"command": "<repo>/server/.venv/Scripts/python.exe",
"args": ["<repo>/server/unreal_mcp_server.py"]
}
}
}With the editor open and the agent connected, ask:
"Use the unreal-mcp
pingtool." โ returnspong."Spawn a cube at the origin." โ the agent calls
execute_python:import unreal sub = unreal.get_editor_subsystem(unreal.EditorActorSubsystem) sub.spawn_actor_from_class(unreal.StaticMeshActor, unreal.Vector(0, 0, 0))
No agent handy? Run the bundled round-trip smoke test (editor open):
cd server && .venv/Scripts/python test_roundtrip.py| Path | What |
|---|---|
MCPProject/ |
UE5 host project used to develop & test the plugin |
MCPProject/Plugins/UnrealMCP/ |
The plugin โ drop into any UE project to use it |
server/ |
The Python MCP server |
docs/ |
Connection + usage docs |
- End-to-end pipeline:
ping+execute_pythonwith log/error feedback - Actor commands โ
spawn_actor/list_actors/set_actor_transform/delete_actor - More native coverage โ assets, materials, Blueprints, Niagaraโฆ
- Blueprint graph authoring (K2Node creation + pin wiring)
- A real grounding loop โ viewport screenshots + structured error feedback
- Packaging / runtime agent support
See the Releases for what's shipped.
UnrealMCP lets an agent run arbitrary Python inside your editor. The bridge
binds to loopback only and runs only while the editor is open โ but there's no
auth on the local socket yet. Read SECURITY.md before you wire up
anything you don't fully trust.
This is young and there's a lot of surface to cover โ new commands, docs,
bug reports, or just trying it and telling us what broke. Start with
CONTRIBUTING.md; agents and humans alike should skim
AGENTS.md for how the bridge is built.
MIT ยฉ x0cipher