tutorial · 2026-01-31

How to Connect Claude Code (or Cursor) to Unreal Engine 5 with MCP

Give your AI coding agent a real bridge into the UE5 editor so it can spawn, observe and screenshot what it just wrote instead of guessing.

Mythic Dev Assist
Featured on Fab Mythic Dev Assist A queryable causal world-model of UE5 for AI coding agents, over MCP.
$24.99 Get on Fab →
101
HTTP action routes
14
Generic MCP tools
18
Always-on observability channels
4
Bundled Claude Code skills
127.0.0.1:7779
Default loopback bridge port

Why an AI agent needs a bridge into UE5

Hand a coding agent your Unreal Engine 5 project and it will happily write a new actor, a Niagara module, or a gameplay ability. What it cannot do, out of the box, is see what happened next. It cannot place the actor it just authored, watch it tick, confirm the Blueprint actually compiled, or read back the property values the editor settled on. Without a feedback channel the agent is reasoning blind, and a stateless model that is reasoning blind drifts fast.

The Model Context Protocol (MCP) is the open standard that lets an external client like Claude Code, Cursor or Codex CLI call into a separate server's tools. It solves the wiring problem, but it does not, by itself, give the agent eyes inside Unreal. You still need something running in the editor that speaks MCP and reports the live world state back. That bridge is what this guide wires up.

If you have searched for how to connect Claude Code or Cursor to Unreal Engine via MCP, the missing piece is an in-editor server plus a thin MCP layer in front of it. MythicDevAssist (MDA) is exactly that: an agent-native editor bridge that runs as an Engine Subsystem inside the UE5 editor process, exposing a loopback HTTP server and a companion Python MCP server. Its design thesis is glass-box: every response carries the live world state, structured read-backs and recovery hints so a stateless agent stays grounded. MDA is the bridge layer, not an AI itself; you bring your own agent.

What MythicDevAssist actually exposes

Inside the editor, MDA stands up an HTTP bridge bound to 127.0.0.1:7779, auto-cycling through ports 7779 to 7788 if the first is busy. Because it is loopback only, you do not need to open any firewall rules. The in-editor server speaks MCP natively over POST /mcp, and a companion Python rich-client wraps it with a curated tool surface for clients that prefer the standard MCP transport.

Under the hood there are 101 declarative HTTP action routes covering spawn, destroy, move, call, compile, capture, import, preview, trace, query, open and close. The Python MCP server distils these into 14 generic MCP tools: mda_bridges, mda_restart, mda_search, mda_observe_target, mda_set_target, mda_create, mda_destroy, mda_import, mda_capture, mda_open, mda_close, mda_watch, mda_query and mda_logs. That smaller surface is what your agent sees and reasons about.

The glass-box part is the response envelope. Every call comes back with a World Pulse _meta block (context such as pie, editor or headless, plus frame, actor_count, map, timescale, paused and game_time), an _observation, an agent_hint for recovery, and on the first call a Project Twin describing the engine version, build config and enabled plugins. Behind that, 18 always-on observability channels stream into a per-session SQLite database under your project's Saved/Observations folder, which the agent can query directly with SQL.

Step 1 - Install the MythicDevAssist plugin

1. Install MDA from Fab into your engine or project, then open your UE5 project. MDA supports Unreal Engine 5.3 through 5.7 on a Windows 64-bit editor host; the bridge and its modules are Win64 only.

2. Open Edit then Plugins, find the Developer Tools category, and enable MythicDevAssist. Restart the editor when prompted.

3. On restart, the engine plugin dependencies enable automatically: SQLiteCore, Niagara and GameplayAbilities, with AIModule optional. You do not need to hunt these down by hand.

4. Open the dockable MDA dashboard. It shows the live HTTP endpoint (for example http://127.0.0.1:7779), the session database path, and a per-call action log with a full request and response viewer. Confirm the endpoint is showing a port in the 7779 to 7788 range before you go any further. Note that MDA's runtime module is UncookedOnly, so it is excluded from cooked shipping builds and adds zero runtime cost to a packaged game.

Step 2 - Set up Python and the mcp package

The Python MCP server is what your agent client talks to, and it has exactly one Python dependency.

1. Make sure Python 3.10 or newer is installed and on your PATH. Verify with python --version in a terminal.

2. Install the MCP package with pip install mcp. That single package is the only Python requirement the server has.

3. Note the full path to mda_mcp_server.py, which ships with the plugin. You will pass that path to each agent client in the next step. Keep the path handy; every client uses the same {command: python, args: [mda_mcp_server.py]} shape.

Step 3 - Register the MCP server in Claude Code, Cursor and Codex

All three clients launch the same Python server the same way; only the registration mechanism differs.

1. For Claude Code, run claude mcp add mda --command python --args mda_mcp_server.py (substituting the full path to the file). If you prefer to edit configuration directly, add the same entry to ~/.claude/mcp.json.

2. For Cursor, open ~/.cursor/mcp.json and add an entry with the identical shape: command set to python and args set to the path to mda_mcp_server.py.

3. For Codex CLI, add the same {command: python, args: [mda_mcp_server.py]} entry to codex.config.json.

4. Restart the agent client so it picks up the new server. Because every client points at the same Python script and the same loopback bridge, the behaviour is consistent across all three. For a custom agent host that does not use the Python server at all, you can integrate directly against the in-editor server over POST /mcp.

Step 4 - Install the four ue5-mda-* skills (Claude Code)

MDA bundles four Claude Code skills that teach the agent how to use the bridge well: ue5-mda-actions, ue5-mda-capture, ue5-mda-diagnose and ue5-mda-query. These are a Claude Code feature specifically.

1. Locate the four ue5-mda-* skill folders that ship with the plugin.

2. Junction or symlink each folder into ~/.claude/skills/. A junction is recommended over a copy so that updates to the skills propagate automatically when the plugin is updated.

3. Restart Claude Code so it discovers the skills. With the skills installed, the agent has curated playbooks for driving actions, capturing screenshots and video, diagnosing gameplay issues, and querying the session database, rather than rediscovering the tool surface from scratch each session.

Step 5 - Verify the connection with 'list MDA bridges'

Before you ask the agent to do anything real, confirm the wiring end to end.

1. Launch your UE5 editor with MythicDevAssist enabled so the bridge is live.

2. In your agent client, ask it to list MDA bridges (this maps to the mda_bridges action with action set to list).

3. A healthy response shows the running editor's process ID, its port, and the project name. That is your confirmation that the agent's MCP client, the Python server and the in-editor bridge are all talking to the same editor.

4. If you ever call a tool with no action it returns full self-documenting help, and a call that is missing a parameter returns targeted help, so you can always interrogate the surface from inside the agent. The bridge identity is also PID-bound: a call is rejected if the target editor exited and another process bound the same port, which prevents an agent from silently driving the wrong editor.

Step 6 - Your first agent-driven spawn and screenshot

With the bridge verified, run the canonical first task: spawn an actor, change a value, and screenshot it. A natural-language request such as spawn this Blueprint, set Health to 50, and screenshot it from the front decomposes into three structured calls, and the agent gets a grounded read-back from each one.

The mutation responses are deliberately rich so the agent is never guessing. A destroy returns the names, classes and locations of removed actors; a set-property call returns the actual read-back values plus any per-property failures; a move returns the post-collision-adjusted position. Spawn and move calls are also enriched with spatial context such as speed, whether the actor is on the navmesh, grounded state, ground slope, animation state and overlap count, computed on the fly.

Two behaviours smooth out common friction. Actions that require Play-In-Editor will auto-start it, observe for a short boot delay, and tag the response auto_started_pie, so the agent does not stall waiting for play mode. And for destructive operations you can run a dry-run first: previewing a console command like DestroyAll BP_Enemy_C reports the would-affect count before anything is committed, letting the agent confirm the blast radius before pulling the trigger.

From here the agent can watch a system over time with mda_watch to confirm it reached steady-state, complete with a per-sample timeline and screenshots, or query the session database directly. Because 18 channels and a kinematic tracker feed that database, you can ask the agent to find jittering NPCs with a query like WHERE jerk > 10000, surface actors that have fallen off the navmesh, or flag teleport spikes. The agent reads what actually happened instead of asserting that its code probably worked.

Where MDA fits alongside the rest of your toolkit

MDA is the bridge; it pairs naturally with the tools your agent will be driving. If your agent's job is authoring VFX, AI Flipbook Generator turns a text prompt into a game-ready Niagara spritesheet (4x4, 6x6 or 8x8 grids) baked one-click into a Texture2D, Material Instance and Niagara System, using your own OpenAI key. MDA's Niagara Preview Capture then lets the agent screenshot that system at percentage intervals and read back per-frame brightness and blank-ratio diagnostics, no PIE required.

For planning the work the agent ships, Easy Kanban Board docks a drag-and-drop task board inside the editor with columns, priority colours, tags, real-time search and JSON import/export, so feature tracking never leaves Unreal. And when the agent needs to check a scene rather than the code, Lumen Meter (a drop-in BP_LumenMeter actor on UE 5.6) re-renders the local scene to report a raw and dynamically-calibrated 0-1 brightness value that already includes Lumen GI bounce, shadows and skylight.

Start small: get the bridge verified with list MDA bridges, run the spawn-set-screenshot loop once, and let the agent read its own results. Once that feedback loop is closed, every subsequent edit it makes is grounded in what the editor actually did.

Registering the MDA MCP server per client

ClientHow to registerSkills support
Claude Codeclaude mcp add mda --command python --args mda_mcp_server.py, or edit ~/.claude/mcp.jsonYes - the four ue5-mda-* skills
CursorAdd the entry to ~/.cursor/mcp.jsonNot applicable
Codex CLIAdd the entry to codex.config.jsonNot applicable
Custom agent hostIntegrate directly over POST /mcp (no Python server)Not applicable

Every client launches the same Python server with the same {command: python, args: [mda_mcp_server.py]} shape; only the registration mechanism differs.

FAQ

How do I connect Claude Code or Cursor to Unreal Engine via MCP?

Install the MythicDevAssist plugin and enable it (SQLiteCore, Niagara and GameplayAbilities auto-enable), install Python 3.10+ and run pip install mcp, then register the bundled mda_mcp_server.py with your client - claude mcp add mda --command python --args mda_mcp_server.py for Claude Code, or the same {command: python, args: [mda_mcp_server.py]} entry in ~/.cursor/mcp.json for Cursor. Verify by asking the agent to list MDA bridges.

Do I need to open firewall ports or configure networking?

No. The bridge is bound to 127.0.0.1 (loopback only) on port 7779, auto-cycling to ports up to 7788 if 7779 is busy, so no firewall rules are required.

Which Unreal Engine versions and platforms does MythicDevAssist support?

MDA targets Unreal Engine 5.3, 5.4, 5.5, 5.6 and 5.7 on a Windows 64-bit editor host. The plugin's modules are Win64 only. The runtime module is UncookedOnly, so it is excluded from cooked shipping builds.

Will the agent be working blind, or can it see what happened?

It can see what happened. Every response carries a World Pulse _meta block, structured read-backs and an agent_hint, and 18 observability channels stream into a per-session SQLite database the agent can query with SQL. Mutations return concrete results - destroy returns removed actors' names and locations, set-property returns read-back values, move returns the post-collision position.

How do I confirm the connection is working?

Launch the editor with MythicDevAssist enabled and ask your agent to list MDA bridges (the mda_bridges action with action set to list). A healthy response returns the running editor's process ID, its port, and the project name, confirming the client, the Python server and the in-editor bridge are all talking to the same editor.

Get it on Fab

Mythic Dev Assist

Give AI coding agents (Claude Code, Cursor, any MCP client) eyes inside Unreal — a queryable causal world model exposing perception, memory, causality, verification and action through an in-editor HTTP bridge and an external MCP server. Observe, set, create, destroy and watch the editor programmatically.

$24.99USD · one-time · free updates
Report a bug