Labsco
remiphilippe logo

Unreal Engine

β˜… 55

from remiphilippe

Let AI agents see, build, test, and edit inside Unreal Engine 5.7 β€” including Blueprints, which are normally opaque binary assets.

πŸ”₯πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedFreeAdvanced setup

mcp-unreal

CI Go 1.25+ License: Apache-2.0

MCP (Model Context Protocol) server that gives AI coding agents complete autonomous control over an Unreal Engine 5.7 project. Single Go binary, zero external dependencies.

Build, test, manipulate the editor, edit Blueprints, generate procedural meshes, and look up UE API documentation β€” all through 49 MCP tools that any MCP-compatible agent can call directly.

Recommended System Prompt

For best results, add the following to your project's system prompt (e.g. CLAUDE.md, .cursorrules, .codex/instructions.md, or equivalent). This tells the AI agent how to use the MCP tools effectively.

Copy & paste β€” that's it

## Unreal Engine MCP Tools

This project uses mcp-unreal for AI-driven Unreal Engine development. The following MCP tools are available:

### Workflow Guidelines

1. **Always check status first**: Call `status` to verify the editor and plugin connections before attempting editor operations.
2. **Look up docs before writing UE code**: Use `lookup_class` to get class references (inheritance, properties, functions) and `lookup_docs` for API patterns before writing C++ or Blueprint logic.
3. **Build-test cycle**: After editing C++ files, call `build_project` to compile, then `run_tests` to verify. Read build errors carefully β€” use `lookup_docs` to understand UE APIs.
4. **Actor workflow**: Use `get_level_actors` to discover existing actors, `spawn_actor` to create new ones, `move_actor` to position them, and `set_property`/`get_property` to read/write properties.
5. **Blueprint workflow**: Use `blueprint_query` with operation `list` to find Blueprints, then `list_variables`/`list_functions`/`list_nodes` to inspect them. Use `blueprint_modify` to make changes, and always `compile` after modifications.
6. **Material workflow**: Use `material_ops` with `create` to make new materials, `get_parameters` to inspect existing ones, and `set_parameter` or `set_texture` to modify them.
7. **Save your work**: The editor does not auto-save. After making changes, use `level_ops` with `save_level` or remind the user to save.
8. **PIE testing**: Use `pie_control` with operation `start` to begin a Play In Editor session, `status` to verify it started, and `stop` to end it. Use `capture_viewport` with `include_ui=true` during PIE to see the game view with HUD/menus. Use `player_control` to move the player pawn (`teleport`, `set_rotation`) or reposition the editor viewport camera (`get_camera`, `set_camera`).

### Tool Modes

- **Headless tools** (`build_project`, `run_tests`, `cook_project`, etc.) do NOT require the editor to be running. They invoke UnrealEditor-Cmd directly.
- **Editor tools** (actors, blueprints, materials, etc.) require the Unreal Editor to be open with the MCPUnreal plugin loaded.
- **Documentation tools** (`lookup_docs`, `lookup_class`) are always available β€” use them liberally.

### Object Paths

Many tools require UE object paths. The format is:
- Actor paths: `/Game/Maps/MapName.MapName:PersistentLevel.ActorName`
- Asset paths: `/Game/Folder/AssetName`
- Engine assets: `/Engine/BasicShapes/Cube`

Use `get_level_actors` to discover actor paths, and `search_assets` to find asset paths.

Tip: For Claude Code, save this as CLAUDE.md in your project root. For Cursor, save as .cursorrules. For Codex, save as .codex/instructions.md.

Architecture

Copy & paste β€” that's it
                                                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                                                    β”‚   UE 5.7 Editor       β”‚
                                                    β”‚                       β”‚
                                                    β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
                                                    β”‚  β”‚ Remote Control  β”‚  β”‚
                                              β”Œβ”€β”€β”€β”€β–Ίβ”‚  β”‚ API (port 30010)β”‚  β”‚
                                              β”‚     β”‚  β”‚ (built-in)      β”‚  β”‚
                                              β”‚     β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    stdio     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”‚     β”‚                       β”‚
β”‚  AI Coding   β”‚   JSON-RPC   β”‚              β”‚β”‚     β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚    Agent     │◄────────────►│  mcp-unreal  β”‚β”œβ”€β”€β”€β”€β–Ίβ”‚  β”‚ MCPUnreal       β”‚  β”‚
β”‚ (Claude Code β”‚              β”‚ (Go binary)  β”‚β”‚     β”‚  β”‚ Plugin (port    β”‚  β”‚
β”‚  Cursor, etc)β”‚              β”‚              β”‚β”‚     β”‚  β”‚ 8090)           β”‚  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜              β”‚ 49 tools     β”‚β”˜     β”‚  β”‚ β€’ Actors        β”‚  β”‚
                              β”‚ doc index    β”‚      β”‚  β”‚ β€’ Blueprints    β”‚  β”‚
                              β”‚              β”‚      β”‚  β”‚ β€’ Materials     β”‚  β”‚
                              β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚      β”‚  β”‚ β€’ PCG / GAS    β”‚  β”‚
                              β”‚ β”‚ Headless β”‚ β”‚      β”‚  β”‚ β€’ Niagara       β”‚  β”‚
                              β”‚ β”‚ exec.Cmd │─┼──────│──│ β€’ Mesh ops      β”‚  β”‚
                              β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚      β”‚  β”‚ β€’ Levels        β”‚  β”‚
                              β”‚              β”‚      β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
                              β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚      β”‚                       β”‚
                              β”‚ β”‚ Bleve    β”‚ β”‚      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                              β”‚ β”‚ Doc Indexβ”‚ β”‚
                              β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                              β”‚              │──────│ docs/                 β”‚
                              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β”‚ β”œβ”€β”€ ue5.7/            β”‚
                                                    β”‚ β”œβ”€β”€ realtimemesh/     β”‚
                                                    β”‚ └── index.bleve       β”‚
                                                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Three communication paths:

  1. Headless β€” exec.Command invokes UnrealEditor-Cmd for builds, tests, and cooking. No editor needed.
  2. Remote Control API β€” HTTP PUT to localhost:30010 for property access and function calls. Built into UE.
  3. MCPUnreal Plugin β€” HTTP POST to localhost:8090 for Blueprint editing, asset queries, mesh ops, and other deep editor internals.

See IMPLEMENTATION.md for the full architecture document.

Available Tools (48)

Build & Compile (Headless)

ToolDescription
build_projectBuild the UE project via UnrealEditor-Cmd / UBT. Returns structured JSON with error count and error details.
cook_projectCook (package) content for a target platform using RunUAT. Supports iterative cooks.
generate_project_filesRegenerate IDE project files (.xcworkspace / .sln) after adding or removing C++ modules.

Project & Config (Headless)

ToolDescription
project_opsRead and modify the .uproject file: get project info, list/enable/disable plugins, add modules, set target platforms.
config_opsRead and write UE project .ini config files (DefaultEngine.ini, DefaultGame.ini, etc.): get, set, delete keys, list sections.

Test Automation (Headless)

ToolDescription
run_testsRun headless automation tests (-nullrhi) with per-test pass/fail results and failure details.
run_visual_testsRun automation tests with GPU rendering enabled (no -nullrhi) for visual/rendering tests.
list_testsList available automation test names matching a filter pattern.
get_test_logRead raw UE log files with line limits, offsets, and keyword filtering.

Actors & Properties (Editor)

ToolDescription
get_level_actorsList all actors in the current level with class, path, location, rotation, scale.
spawn_actorSpawn an actor by class name at a given location/rotation/scale.
delete_actorsDelete one or more actors by object path or display name.
move_actorSet location, rotation, and/or scale of an actor via RC API function calls (K2_SetActorLocation, K2_SetActorRotation, SetActorScale3D).
get_propertyRead a property value from an actor via the Remote Control API.
set_propertySet a property value on an actor via the Remote Control API.
call_functionCall a function on an object via the Remote Control API.

Blueprint Editing (Editor)

ToolDescription
blueprint_queryQuery Blueprint structure: list all BPs, inspect a BP's variables/functions/graphs, get graph nodes and connections.
blueprint_modifyModify Blueprints: create, add/remove variables, add/remove functions, add/delete nodes, connect/disconnect pins, set pin values, compile.

Animation Blueprint Editing (Editor)

ToolDescription
anim_blueprint_queryQuery AnimBP state machines and states: list state machines, inspect states/transitions/blend spaces.
anim_blueprint_modifyModify AnimBPs: add/remove states, add/remove transitions, set blend spaces, set state animations, set transition rules, add notify states.

Assets (Editor)

ToolDescription
search_assetsSearch assets by class, path, name, or tag. Returns paginated results.
get_asset_infoGet detailed asset info including dependencies and referencers.

Materials (Editor)

ToolDescription
material_opsMaterial operations: create, create_instance, set_parameter, set_texture, get_parameters, list_parameters.

Characters & Input (Editor)

ToolDescription
character_configCharacter configuration: get_config, set_movement, set_capsule, set_mesh, set_camera, get_movement_modes.
input_opsEnhanced Input operations: list_actions, list_contexts, add_action, remove_action, add_context, bind_action, unbind_action, get_bindings.

Procedural Content Generation (Editor)

ToolDescription
pcg_opsPCG graph operations: list_components, get_graph, execute, set_parameter, add_node, connect_nodes, get_results.

Gameplay Ability System (Editor)

ToolDescription
gas_opsGAS operations: list_abilities, grant_ability, activate, get_attributes, set_attribute, apply_effect, remove_effect, list_active_effects.

Niagara VFX (Editor)

ToolDescription
niagara_opsNiagara operations: spawn_system, set_parameter, get_parameter, activate, deactivate, list_emitters, set_emitter_enabled, get_system_info.

Mesh Generation (Editor)

ToolDescription
procedural_meshCreate and modify ProceduralMeshComponent geometry: create_section, update_section, clear, set_material.
realtime_meshCreate and modify RealtimeMeshComponent geometry (requires RMC plugin): create_lod, create_section_group, create_section, update_mesh_data, set_material_slot, setup_collision.

Levels (Editor)

ToolDescription
level_opsLevel management: get_current, list_levels, load_level, save_level, new_level, add_sublevel, remove_sublevel, set_streaming_method.

Editor Utilities (Editor)

ToolDescription
run_console_commandExecute an Unreal console command in the editor.
get_output_logRead the editor output log with optional category and verbosity filtering.
capture_viewportCapture a screenshot of the active viewport. Returns MCP ImageContent (viewable by the LLM) or saves to file. Set include_ui=true to capture with Slate/UMG overlays (HUD, menus) β€” requires PIE.
execute_scriptExecute a Python script in the editor's Python environment.
live_compileTrigger Live Coding (hot reload) compilation without restarting the editor.
pie_controlControl Play In Editor (PIE) sessions: start, stop, or check status. Supports map override and Simulate In Editor mode. Start/stop are async β€” use status to verify.
player_controlControl player pawn and editor viewport camera. Operations: get_info (player state), teleport (move pawn), set_rotation (set view direction), set_view_target (change camera target) β€” require PIE. get_camera/set_camera move the editor viewport camera without PIE.

Components & Instancing (Editor)

ToolDescription
get_actor_componentsGet the full component hierarchy for an actor, including types, visibility, mesh references, and transforms.
ism_opsManage ISM/HISM components: create, add/remove/update instances, set materials, get instance counts.

Textures (Editor)

ToolDescription
texture_opsImport images as texture assets, query texture info, assign textures to material parameters, list textures.

DataTables (Editor)

ToolDescription
data_asset_opsManage DataTables: list, read rows, add/update/delete rows, create tables, import from CSV.

Fab Marketplace (Editor)

ToolDescription
fab_opsManage Fab marketplace asset cache: list downloaded assets, import into project, clear cache.

Subsystems & UI (Editor)

ToolDescription
subsystem_queryList active UE subsystems by type (world, game_instance, engine, editor, local_player).
ui_queryIntrospect Slate and UMG widget hierarchy: tree, find by class, get details, list bindings.

Network Debug (Editor)

ToolDescription
network_debugIntrospect active HTTP requests, WebSocket connections, and recent request/response logs.

Documentation (Always Available)

ToolDescription
statusCheck server health, UE installation path, project info, and editor connectivity.
lookup_docsSearch UE 5.7 API docs, RealtimeMesh docs, and project docs by natural language query.
lookup_classGet structured class reference (inheritance, properties, functions) for a specific UE class.

Documentation Index

Build the local documentation search index:

Copy & paste β€” that's it
mcp-unreal --build-index

This indexes markdown files from docs/ue5.7/ and docs/realtimemesh/, plus your project's CLAUDE.md. The index is stored at ./docs/index.bleve (configurable via MCP_UNREAL_DOCS_INDEX).

To add custom documentation, place markdown files in the docs/ directory and rebuild the index. See docs/README.md.

Development

Copy & paste β€” that's it
# Build
make build

# Run all tests with race detector
make test

# Go lint
make lint

# C++ format check (requires clang-format)
make cpp-fmt-check

# Run all checks (Go format, C++ format, vet, lint, tests)
make check

C++ Plugin Tests

The MCPUnreal plugin includes automation tests that run inside the UE editor headlessly. These require UE 5.7 installed locally and are not part of CI β€” they are opt-in for local development.

Copy & paste β€” that's it
# Build the test project (first run ~2-5 min, incremental after)
make test-cpp-build

# Build and run all MCPUnreal.* automation tests
make test-cpp

This uses a minimal UE project in test-project/ that symlinks the plugin source and runs all MCPUnreal.* tests via UnrealEditor-Cmd -nullrhi.

Contributing

See CONTRIBUTING.md for development setup, coding standards, and how to add new tools.

License

Apache-2.0 β€” see LICENSE.

Unreal Engine is a trademark of Epic Games, Inc. This project is not affiliated with or endorsed by Epic Games.