# NAJEMWEHBE/unreal-ai-connection [Health: Active]

**Category:** 🎮 Gaming  
**Repository:** https://github.com/NAJEMWEHBE/unreal-ai-connection  
**GitHub Stars:** 9  
**Views:** 11  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/najemwehbe-unreal-ai-connection

## Description
Drive the Unreal Engine 5.7 editor from any MCP client over a local TCP socket — 105 editor-automation tools (72 native C++ + 33 bridge-side). Native C++ plugin + thin Python bridge, 50ms round-trips. 498 tests, MIT.

## Tools
Capabilities this server exposes over MCP:

- **execute_unreal_python** — Universal escape hatch — run arbitrary `unreal.*` Python in the editor's interpreter. Multi-line scripts work.
- **run_python_file** — Execute a `.py` file from disk in the editor's Python interpreter.
- **apply_python_to_selection** — Run a Python snippet with the editor's current selection bound as `actors` / `assets`.
- **exec_python_persistent** — Persistent Python session — variables defined in one call survive into the next.
- **reset_python_state** — Wipe the persistent session's globals.
- **get_project_summary** — Project name, engine version, enabled plugins, asset count.
- **find_assets** — Query the asset registry by class + path + name.
- **inspect_asset** — Class, tags, dependencies, referencers, on-disk size.
- **move_asset** — Move an asset to a different folder; UE creates a redirector at the source path.
- **rename_asset** — Change an asset's leaf name in place; UE creates a redirector at the old name.
- **duplicate_asset** — Copy an asset to a new path.
- **delete_asset** — Delete an asset; refuses if referenced by other packages unless `force=true`.
- **fix_up_redirectors** — Resolve all object redirectors under a folder.
- **create_data_table** — Create a new `UDataTable` asset whose rows conform to a given row `UScriptStruct`.
- **create_data_asset** — Create a new `UDataAsset` (or subclass) asset from a `UDataAsset` subclass path.
- **inspect_blueprint** — Variables, function/event graphs, parent class of any Blueprint asset.
- **compile_blueprint** — Recompile a Blueprint asset and report errors.
- **inspect_widget_tree** — Read the widget hierarchy of a `UWidgetBlueprint` or EUW (the thing UE Python can't do).
- **inspect_widget_blueprint** — Widget-BP-specific surface: animations, delegate bindings, palette category, inherited named slots, property-binding count, blueprint compile status. Pairs with `inspect_blueprint` + `inspect_widget_tree`.
- **edit_widget_tree** — Mutate the tree: `set_root` / `add_child` / `set_property`. Solves the EUW WidgetTree blocker.
- **inspect_anim_blueprint** — Read variables and state machines of an Animation Blueprint.
- **inspect_anim_montage** — Read sections, slots, and notify tracks of an `UAnimMontage`.
- **inspect_static_mesh** — LODs, materials, collision, bounds for a `UStaticMesh`.
- **inspect_skeletal_mesh** — LODs, materials, sockets, skeleton info for a `USkeletalMesh`.
- **inspect_physics_asset** — Body setups (one per simulated bone), constraint setups (joints between bodies), bounds-bodies subset, named physical-animation + constraint profiles. Cross-links to `inspect_skeletal_mesh` via `preview_skeletal_mesh`.
- **inspect_niagara_system** — Emitters and exposed user parameters of a Niagara system.
- **inspect_landscape** — Components, layers, and material info for a landscape actor.
- **inspect_data_table** — RowStruct identity, sorted row names, per-property name+type for every `FProperty` on the row struct, plus client-strip / ignore-extra/missing-fields flags.
- **inspect_curve** — UCurveBase channel layout (1ch UCurveFloat / 4ch UCurveLinearColor / 3ch UCurveVector), per-channel name + key count + per-channel + global time/value range.
- **create_blueprint** — Create a new `UBlueprint` asset under `/Game/` from a parent class (default `/Script/Engine.Actor`).
- **add_blueprint_variable** — Add a typed member variable (bool/int/float/string/name/vector/rotator/transform/object) to an existing `UBlueprint`.
- **add_blueprint_function** — Add a new empty function graph to an existing `UBlueprint`.
- **add_blueprint_node** — Add a K2 node (`call_function` / `variable_get` / `variable_set` / `branch`) to a Blueprint event or function graph; returns the new node's GUID + pins.
- **connect_blueprint_pins** — Wire two pins (exec or data) between nodes by GUID + pin name, via the schema-validated `UEdGraphSchema_K2::TryCreateConnection`.
- **set_blueprint_node_pin_default** — Set a literal or object default on an input pin (verified by read-back).
- **create_material_instance** — Create a `UMaterialInstanceConstant` asset with a parent material set.
- **set_mi_parameter** — Override a scalar/vector/texture parameter on a material instance. Type discriminator picks value shape.
- **inspect_material** — List parameter names declared by a `UMaterial` or `UMaterialInstance` (scalar/vector/texture/static-switch).
- **inspect_material_instance** — Read a material instance's parent + currently-overridden parameter values.
- **add_material_expression** — Create a `UMaterialExpression` node inside an existing `UMaterial`'s graph, then recompile the material.
- **connect_material_expression** — Wire an expression's output to a material property input (`property:BaseColor`) or another expression's input (`node:<ExprName>:<InputName>`), then recompile.
- **import_texture** — Bring an image file (PNG / JPG / EXR / TGA / BMP / HDR) from disk into the project as a `UTexture2D` asset via UE's canonical import path.
- **configure_texture** — Adjust SRGB / compression / LOD group / filter on an existing texture asset.
- **inspect_texture** — Texture class, surface dimensions, sRGB, compression, filter, LOD group, mip-gen, virtual-texture / never-stream flags, composite-texture cross-link. UTexture2D-specific size / mips / pixel format / imported source dimensions emitted conditionally.
- **inspect_sequence** — Read structure of a Level Sequence: tracks, sections, bindings, frame rate, playback range.
- **create_sequence** — Create a new empty Level Sequence asset with a configured display rate and playback range.
- **bind_actor_to_sequence** — Add a level actor as a possessable binding to a Level Sequence.
- **set_sequence_playback_range** — Set a Level Sequence's playback start/end (display-rate frames).
- **add_cine_camera_to_sequence** — Spawn an `ACineCameraActor` and add it as a possessable binding; returns the binding GUID (feed it to `add_camera_cut_track`).
- **add_camera_cut_track** — Add (or reuse) the camera-cut track and bind a camera over a `[start, end]` frame range.
- **add_audio_track** — Add a master audio track + sound section to a Level Sequence.
- **add_visibility_track** — Add an actor-visibility track that keys an actor shown/hidden over time (inverted `bHidden`).
- **render_sequence_mrq** — Async-render a Level Sequence (optional map override) to PNG / JPG / BMP / EXR via Movie Render Queue; returns a `task_id` (completion via `poll_task`).
- **get_actors_in_level** — Name / class / transform of every actor; optional case-insensitive substring filter.
- **spawn_actor** — Create an actor at a location with optional rotation, label, and initial properties. Class path supports built-ins and Blueprints.
- **set_actor_transform** — Move / rotate / scale an existing actor by name. Absolute or relative mode.
- **delete_actor** — Remove an actor by name. Force flag overrides children-attached safety check.
- **set_actor_property** — Mutate any UPROPERTY on an actor. Supports primitives, FName/FText, vectors, rotators, colors, enums, and TSoftObjectPtr.
- **add_component** — Attach a component (UActorComponent / USceneComponent subclass) to an existing actor at runtime, optionally socketed.
- **duplicate_actor** — Clone an existing level actor (label or FName), optionally offset and relabel. Undoable (single Ctrl+Z).
- **set_actor_folder** — Set an actor's World Outliner folder path (e.g. `Lighting/Key`); empty string moves it to the outliner root. Undoable.
- **rename_actor** — Change an actor's World Outliner display label (`SetActorLabel`); the stable FName is unchanged. Undoable.
- **focus_actor** — Select an actor by label and frame the viewport on it.
- **load_level_by_path** — Open a level by package path.
- **create_level** — Create a new empty level (`UWorld`) asset under `/Game/` and open it as the active level.
- **build_lighting** — Invoke a static-lighting build on the active editor world. Non-interactive; may take time on large levels.
- **spawn_niagara_at_location** — Place a Niagara system in the level (`ANiagaraActor` + `SetAsset`) at a world transform; optional auto-activate. Undoable.
- **spawn_niagara_attached** — Attach a Niagara system component to an existing actor, optionally socketed. Undoable.
- **set_niagara_user_param** — Set a user-exposed Niagara parameter (float / vec3 / linear-color / bool) on a placed Niagara component, with type-match validation. Undoable.
- **find_actors_by_class** — Filter the active level's actors by class. Composes `get_actors_in_level` and matches against the short class name. Bridge-side synthetic.
- **bulk_focus_actors** — Frame the viewport on each actor in a sequence, optionally screenshotting each one. Composes `focus_actor` (+ `get_viewport_screenshot`) per name. Bridge-side synthetic.
- **bulk_screenshot_actors** — Focus + screenshot each actor in a sequence. Composes `screenshot_actor` per name. Bridge-side synthetic.
- **bulk_set_actor_property** — Apply many `{actor, property, value}` mutations in one call. Composes `set_actor_property` per assignment. Bridge-side synthetic.
- **compare_assets** — Symmetric diff between two assets' `inspect_asset` outputs. Bridge-side synthetic.
- **bulk_set_console_variables** — Set many CVars in one call with optional atomic rollback. Composes `get_console_variable` + `set_console_variable`. Bridge-side synthetic.
- **inspect_dependency_graph** — BFS the asset dependency graph (down by default, optional bidirectional sweep). Composes `inspect_asset` recursively. Bridge-side synthetic.
- **bulk_fix_redirectors** — Resolve redirectors across many content folders in one call. Composes `fix_up_redirectors` per folder. Bridge-side synthetic.
- **get_viewport_screenshot** — Active viewport as a PNG written to a project-confined disk path (throttle-proof fresh frame; optional small inline thumbnail).
- **take_high_res_screenshot** — Trigger UE's `HighResShot` console command.
- **render_camera_to_png** — Force a synchronous render of the level-editor viewport (or an off-screen SceneCapture2D at arbitrary resolution) and write a PNG — works headless where deferred screenshots fail.

## Claude Desktop Quick Installation
No confirmed install details yet, so no config is published. Follow the setup steps in the repository above.

## Documentation

## What NAJEMWEHBE/unreal-ai-connection does

NAJEMWEHBE/unreal-ai-connection lets an MCP client operate a running Unreal Engine editor. Its tool surface covers project and asset queries, asset moves and duplication, Blueprint compilation, widget-tree editing, animation and mesh inspection, data asset creation, and execution of arbitrary `unreal.*` Python code inside the editor.

The package addresses editor operations that are difficult or unavailable through Unreal's Python reflection alone. In particular, it provides native handling for widget-tree inspection and mutation, including editor utility widgets. The broader project also includes authoring and automation tools for Unreal content beyond the specific inspection and asset-management operations listed here.

## How it works

The connection has two local parts. An MCP client communicates with a Python bridge through standard input and output. The bridge forwards tool calls as framed JSON-RPC messages to the UnrealAIConnection plugin at `127.0.0.1:18888`. The plugin runs native C++ handlers inside the editor process and returns the result through the same path.

The plugin must be installed in the Unreal project's `Plugins/` directory, and the editor must be running before calls can reach it. The localhost-only binding keeps the editor endpoint off the network. The project describes round trips of roughly 50 milliseconds and uses native C++ handlers rather than Unreal's Python Remote Execution system.

## Setup and configuration

Install the UE 5.7 plugin separately, then start the project in Unreal Editor. Configure the MCP client to launch `bridge/unreal_ai_connection_bridge.py` with Python. The documented client configurations use `python3`; on Windows, `py` can be used when `python3` is unavailable or resolves to the Microsoft Store alias.

Client-specific setup paths are provided for Claude Code, Claude Desktop, Cursor, Codex CLI, Windsurf, Continue, Cline, Zed, Gemini CLI, and VS Code Copilot. Cursor and VS Code support install links, while other routes use their MCP configuration files or command-line setup. Python 3.11 or newer is listed as a runtime requirement. No environment variables are needed by the documented launch configuration.

## Tools and capabilities

The exposed tools include:

- Execute multi-line Unreal Python, run Python files, apply snippets to selected actors or assets, and maintain or reset persistent Python state.
- Summarize a project, search the asset registry, inspect asset metadata and dependencies, and move, rename, duplicate, delete, or repair redirectors for assets.
- Create data tables, data assets, and Blueprints; compile Blueprints and inspect their variables, graphs, and parent classes.
- Inspect and edit widget trees, including root replacement, child insertion, and property changes.
- Examine animation Blueprints, animation montages, static and skeletal meshes, physics assets, Niagara systems, landscapes, data tables, and curves.

For example, `delete_asset` refuses referenced packages unless `force=true`, while move and rename operations leave Unreal redirectors that can later be resolved with `fix_up_redirectors`.

_Full upstream README: https://allmcps.com/mcp/najemwehbe-unreal-ai-connection/readme_

