Skip to content

Latest commit

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

UECortex

Native Unreal Engine 5 plugin that runs a full MCP (Model Context Protocol) server inside the Unreal Editor. Control your project directly from Claude Code, VS Code, or any MCP client — no Python sidecar, no Node.js process, no external dependencies.

169 built-in tools across 17 categories, plus a Python-backed dynamic tool layer.


Quick Start

1. Install

Copy the UECortex folder into your project's Plugins/ directory and enable it in your .uproject:

{
"Name": "UECortex",
"Enabled": true
}

Reopen the project. The server starts automatically on editor launch.

2. Connect

Claude Code:

claude mcp add uecortex --transport http http://localhost:7777/mcp

VS Code (.vscode/mcp.json):

{ "servers": { "uecortex": { "url": "http://localhost:7777/mcp" } } }

Claude Desktop (claude_desktop_config.json):

{ "mcpServers": { "uecortex": { "url": "http://localhost:7777/mcp" } } }

Health check:

GET http://localhost:7777/health

Tool Categories

Meta

Discover what's available before diving into the full tools list.

ToolWhat it does
list_tool_groupsLists all categories with tool counts and names

Level & Actors

Spawn, move, delete, and inspect actors in the current level.

ToolWhat it does
actor_spawnSpawn an actor by class at a given location/rotation/scale
actor_spawn_on_surfaceSpawn an actor snapped to the nearest surface below a point
actor_deleteDelete an actor from the level
actor_duplicateDuplicate an actor with optional offset
actor_set_transformSet an actor's position, rotation, and/or scale
actor_set_propertySet a property on an actor by name
actor_get_propertiesRead all exposed properties of an actor
actor_get_selectedGet the currently selected actors in the editor
actor_listList all actors in the level, with optional class filter
actor_find_by_nameFind an actor by label name
level_get_infoGet level name, world bounds, and actor count
line_traceCast a ray and return what it hits (location, normal, actor)
viewport_focusFocus the editor viewport on an actor
viewport_set_cameraSet the editor camera position and rotation
console_commandExecute an Unreal console command

Blueprints

Create and wire Blueprint assets programmatically.

ToolWhat it does
blueprint_createCreate a new Blueprint class from a parent class
blueprint_add_componentAdd a component (mesh, camera, audio, etc.) to a Blueprint
blueprint_set_component_propertySet a property on a Blueprint component
blueprint_set_cdo_propertySet a Class Default Object property
blueprint_set_inherited_component_propertySet a property on an inherited component
blueprint_add_variableAdd a typed variable to a Blueprint
blueprint_set_variableSet the default value of a Blueprint variable
blueprint_add_functionAdd a new function to a Blueprint
blueprint_add_event_nodeAdd an event node (BeginPlay, Tick, custom event, etc.)
blueprint_add_function_callAdd a function call node to a Blueprint graph
blueprint_connect_pinsConnect two pins in a Blueprint graph
blueprint_compileCompile a Blueprint asset
blueprint_get_graphRead the full node/pin/connection graph as JSON
blueprint_find_nodeFind a node by class or title
blueprint_set_node_propertySet a property on a graph node
blueprint_spawn_in_levelAdd a Blueprint actor to the current level
blueprint_create_input_actionCreate an Enhanced Input action and bind it
blueprint_add_gamemodeCreate a GameMode Blueprint and set it as the default

C++ Code Generation

Generate C++ source files and trigger editor recompilation.

ToolWhat it does
cpp_create_actorGenerate a new AActor subclass (.h + .cpp)
cpp_create_componentGenerate a new UActorComponent subclass
cpp_create_interfaceGenerate a new UInterface
cpp_create_gas_abilityGenerate a UGameplayAbility subclass
cpp_create_gas_effectGenerate a UGameplayEffect subclass
cpp_create_attribute_setGenerate a UAttributeSet subclass
cpp_add_includeAdd a #include to an existing header
cpp_add_upropertyAdd a UPROPERTY to an existing class
cpp_add_ufunctionAdd a UFUNCTION to an existing class
cpp_get_class_infoRead the properties and functions declared on a class
cpp_hot_reloadTrigger a hot reload of the project module
cpp_run_ubtRun a full UnrealBuildTool compile

Rendering & Materials

Control Lumen, Nanite, shadows, post-process, fog, sky, and materials at runtime.

ToolWhat it does
render_set_lumenEnable/disable Lumen GI and configure quality settings
render_get_lumen_settingsRead current Lumen settings
render_set_naniteEnable/disable Nanite on a Static Mesh
render_get_nanite_settingsRead Nanite settings for a mesh
render_set_shadowsConfigure shadow distance, cascades, and quality
render_set_post_processSet post-process volume settings (bloom, AO, DOF, etc.)
render_get_post_processRead current post-process settings
render_set_fogConfigure exponential height fog
render_set_sky_atmosphereConfigure the sky atmosphere component
render_set_sky_lightSet sky light intensity and source type
render_set_ambient_occlusionConfigure SSAO settings
render_get_materialsList materials assigned to a mesh
render_set_materialAssign a material to a mesh slot
render_set_material_paramSet a scalar or vector parameter on a material instance
render_create_material_instanceCreate a Material Instance from a parent material

Splines & Volumes

Build spline paths and place trigger/blocking volumes.

ToolWhat it does
spline_createCreate a new Spline actor in the level
spline_add_pointAdd a point to a spline
spline_modify_pointMove or change the tangent of an existing spline point
spline_queryRead all points and metadata from a spline
spline_attach_meshAttach a Static Mesh along a spline
volume_createCreate a volume actor (trigger, blocking, post-process, etc.)
volume_set_propertiesResize and reposition an existing volume

PCG (requires Procedural Content Generation plugin)

Build and execute PCG graphs for procedural level population.

ToolWhat it does
pcg_create_graphCreate a new PCG Graph asset
pcg_add_nodeAdd a node to a PCG graph
pcg_connect_pinsConnect two nodes in a PCG graph
pcg_disconnect_pinsDisconnect a pin connection
pcg_get_graphRead the full PCG graph as JSON
pcg_get_node_paramsRead the parameters on a PCG node
pcg_set_node_paramSet a parameter on a PCG node
pcg_set_graph_paramSet a graph-level parameter (exposed input)
pcg_list_node_typesList all available PCG node types
pcg_execute_graphTrigger a PCG graph to regenerate
pcg_create_attribute_nodeCreate an attribute node with a given name/type
pcg_create_subgraphCreate a subgraph node referencing another PCG asset
pcg_place_volumePlace a PCG Volume in the level and assign a graph
pcg_place_seed_actorPlace a PCG seed actor for point-based generation

Gameplay Ability System (requires GameplayAbilities plugin)

Wire up GAS components, abilities, attributes, and gameplay tags.

ToolWhat it does
gas_add_ability_componentAdd an Ability System Component to a Blueprint
gas_grant_abilityGrant a gameplay ability to an actor
gas_revoke_abilityRemove a granted ability from an actor
gas_get_abilitiesList all abilities granted to an actor
gas_apply_effectApply a Gameplay Effect to an actor
gas_get_active_effectsList active effects on an actor
gas_get_attributesRead all attribute values on an actor
gas_set_attributeSet an attribute value directly
gas_add_gameplay_tagAdd a gameplay tag to an actor
gas_remove_gameplay_tagRemove a gameplay tag from an actor
gas_get_gameplay_tagsList all gameplay tags on an actor
gas_list_registered_tagsList all gameplay tags registered in the project

Niagara VFX

Spawn, configure, and control Niagara particle systems.

ToolWhat it does
niagara_list_systemsList all Niagara System assets in the project
niagara_create_systemCreate a new Niagara System asset
niagara_list_emittersList emitters inside a Niagara System
niagara_get_parametersRead user-exposed parameters on a Niagara System
niagara_set_parameterSet a parameter value on a Niagara System asset
niagara_spawn_componentSpawn a Niagara component on an actor in the level
niagara_activate_componentActivate or deactivate a spawned Niagara component
niagara_set_component_parameterSet a runtime parameter on a spawned Niagara component

Animation

Build Animation Blueprints, state machines, and retarget animations across skeletons.

Inspection

ToolWhat it does
anim_list_skeletonsList all Skeleton assets in the project
anim_list_skeletal_meshesList all Skeletal Mesh assets
anim_list_anim_blueprintsList all Animation Blueprints
anim_list_sequencesList AnimSequences compatible with a given skeleton
anim_get_skeleton_bonesList every bone name and parent in a skeleton
anim_get_anim_graphInspect all graphs, states, and nodes in an AnimBP

Building Animation Blueprints

ToolWhat it does
anim_create_anim_blueprintCreate a new Animation Blueprint for a skeleton
anim_add_state_machineAdd a State Machine node to the AnimGraph
anim_add_stateAdd a named state to a State Machine
anim_set_state_animationAssign an AnimSequence or BlendSpace to a state
anim_add_transitionAdd a transition arrow between two states
anim_set_transition_conditionWire a variable condition onto a transition rule (supports always_true)
anim_set_entry_stateConnect the Entry node to a named state in a State Machine
anim_compile_anim_blueprintCompile and save an Animation Blueprint
anim_create_locomotion_setupOne-call full locomotion setup: SM + 5 states + transitions + EventGraph wiring

IK Retargeting(requires IKRig plugin)

ToolWhat it does
ik_rig_assign_meshAssign a SkeletalMesh to an IK Rig (required first step)
ik_rig_set_retarget_rootSet the retarget root bone on an IK Rig
ik_rig_add_retarget_chainAdd a retarget chain (limb, spine, head, etc.)
ik_rig_remove_retarget_chainRemove a retarget chain by name
ik_retarget_createCreate an IK Retargeter pairing two IK Rigs with auto chain-mapping
anim_retarget_batchBatch-retarget a list of animations to a new skeleton

Maintenance

ToolWhat it does
skeleton_fix_broken_referencesRepair broken skeleton references across anim assets

Animation Blueprint workflow: add variable → add state machine → add states → assign animations → add transitions → compile → set transition conditions → compile again. Compile must happen before anim_set_transition_condition so the variable getter can resolve its type.

For standard locomotion, use anim_create_locomotion_setup to do all of the above in a single call (includes EventGraph wiring for Speed and IsInAir).


UMG Widgets

Create and populate Widget Blueprint UIs.

ToolWhat it does
umg_list_widgetsList all Widget Blueprint assets
umg_create_widgetCreate a new Widget Blueprint
umg_get_widget_treeRead the full widget tree as JSON
umg_add_widgetAdd a widget (Text, Button, Image, etc.) to the tree
umg_set_textSet the text content of a Text widget
umg_set_canvas_slotSet position and size of a widget on a Canvas Panel
umg_set_anchorSet anchor alignment on a Canvas Slot
umg_set_visibilityShow or hide a widget
umg_add_variableAdd a variable to a Widget Blueprint
umg_compile_widgetCompile a Widget Blueprint

Sequencer

Build cinematic Level Sequences with camera cuts, tracks, and keyframes.

ToolWhat it does
seq_createCreate a new Level Sequence asset
seq_listList all Level Sequences in the project
seq_get_infoRead sequence duration, framerate, and track layout
seq_set_playback_rangeSet the in/out point of a sequence
seq_add_actor_bindingBind an actor to a sequence for animation
seq_add_transform_trackAdd a transform (movement) track to a bound actor
seq_add_keyframeSet a keyframe value at a given frame
seq_add_camera_cutAdd a camera cut section
seq_add_spawnable_cameraAdd a new spawnable camera actor to the sequence
seq_add_visibility_trackAdd a visibility track to a bound actor

Asset Management

Browse, move, copy, delete, and migrate content browser assets.

ToolWhat it does
asset_listList assets in a folder (with optional class filter)
asset_get_infoGet metadata for an asset (class, path, size, dependencies)
asset_get_referencesList assets that reference a given asset
asset_get_dependenciesList assets that a given asset depends on
asset_moveMove or rename an asset
asset_copyDuplicate an asset to a new path
asset_deleteDelete an asset permanently
asset_create_folderCreate a new content browser folder
asset_list_redirectorsList all redirector assets in a path
asset_fix_redirectorsConsolidate and remove redirectors
asset_migrateMigrate an asset and all dependencies to another project

Viewport & Input

Capture screenshots and drive the editor UI programmatically.

ToolWhat it does
viewport_captureCapture the 3D viewport or full editor window as a PNG
viewport_focusFocus the viewport on an actor
viewport_set_cameraSet the editor camera position and rotation
editor_inputSimulate mouse clicks and keyboard input on the editor window

Fab Marketplace

Search and inspect assets from the Fab marketplace inside the editor.

ToolWhat it does
fab_login_statusCheck EOS login state (required before purchases)
fab_searchSearch Fab for assets by keyword (dynamic — load once per session)
fab_get_assetGet full details for a Fab asset by ID (dynamic — load once per session)

Load the dynamic tools once per session:

python_reload_tools_from_file → Scripts/fab_tools.json

Purchase consent policy:fab_get_asset is information-only. Every response includes an explicit CONSENT REQUIRED notice. AI agents must never trigger a purchase, add-to-cart, or any payment action without explicit user confirmation.


Python & Dynamic Tools

Execute Python in the editor context and register new tools at runtime without recompiling.

ToolWhat it does
python_execRun a Python snippet in the editor's Python environment
python_exec_fileRun a Python script file from the project's Scripts folder
python_checkCheck whether a Python expression evaluates without error
python_set_varStore a named variable for use across python_exec calls
python_get_varRead a stored variable
python_list_scriptsList available Python scripts in the Scripts folder
python_register_toolRegister a new MCP tool backed by a Python snippet
python_unregister_toolRemove a dynamically registered tool
python_list_dynamic_toolsList all currently registered dynamic tools
python_reload_tools_from_fileLoad a batch of tools from a JSON file

Example — register a tool at runtime:

{
"name": "python_register_tool",
"arguments": {
"name": "count_actors",
"description": "Count all actors in the current level.",
"code": "import unreal\nactors = unreal.get_editor_subsystem(unreal.EditorActorSubsystem).get_all_level_actors()\n_mcp_result = f'{len(actors)} actors'"
}
}

Tools receive their arguments as _mcp_params (dict) and return a result by assigning _mcp_result (string).

Batch load from a JSON file:

[
{ "name": "tool_a", "description": "...", "code": "..." },
{ "name": "tool_b", "description": "...", "code": "..." }
]

Optional Plugin Dependencies

Some categories only activate when their plugin is enabled:

CategoryRequired PluginEnable via
PCGProcedural Content GenerationPlugins window
GASGameplay AbilitiesPlugins window
NiagaraNiagaraEnabled by default in UE5
IK RetargetIKRigPlugins window

All other categories load unconditionally.


Architecture

  • Transport: HTTP + SSE on localhost:7777
  • Protocol: MCP 2024-11-05 / JSON-RPC 2.0
  • Engine version: UE 5.6+ (5.7 compatible)
  • Module type: Editor plugin, PostEngineInit
  • Threading: HTTP handlers run on the game thread tick — all UE API calls are direct, no AsyncTask wrappers

Module layout

ModuleContents
UECortexCore server, router, registry, level/blueprint/rendering/spline/volume/cpp/viewport/fab/meta tools
UECortexAssetAsset management tools
UECortexAnimAnimation Blueprint, skeleton, and state machine tools
UECortexIKRetargetIK Rig setup and batch retarget tools (optional — requires IKRig)
UECortexUMGWidget Blueprint tools
UECortexSequencerLevel Sequence / cinematics tools
UECortexPCGPCG graph tools (optional — requires PCG plugin)
UECortexGASGameplay Ability System tools (optional — requires GameplayAbilities)
UECortexNiagaraNiagara VFX tools
UECortexPythonPython executor + dynamic tool registration

About

An Unreal Engine native MCP server and tools to interface with LLM models such as Claude to automate various workflows

Topics

Resources

Stars

5 stars

Watchers

0 watching

Forks

Packages

Contributors

Languages