Unreal Engine 5.5 plugin providing C++ APIs for the Model Context Protocol (MCP) bridge, enabling programmatic control of Unreal Editor operations through JSON commands.
For interfacing via MCP for your coding agents, go to the Python MCP Server Repository
This MCP plugin provides 35+ commands across 6 categories:
- Blueprint Introspection & Management
- Component Operations & Physics
- Variable & Function Management
- Actor & Level Operations
- Enhanced Input System
- UMG Widget Creation
The main subsystem that manages MCP communication and command routing.
Public Methods:
StartServer()- Start the MCP TCP serverStopServer()- Stop the MCP serverIsRunning()- Check if server is activeExecuteCommand(CommandType, Params)- Execute a command with JSON parameters
Level and actor management operations.
Available Commands:
get_actors_in_level- List all actors in current levelfind_actors_by_name- Find actors by name patternspawn_actor- Create new actors with transformdelete_actor- Remove actors from levelset_actor_transform- Modify actor position, rotation, scaleget_actor_properties- Retrieve actor property valuesset_actor_property- Set actor property valuesfocus_viewport- Focus camera on specific targetstake_screenshot- Capture viewport screenshots
Comprehensive blueprint introspection, creation, and modification.
Blueprint Introspection:
list_blueprints- List all blueprints in directoryblueprint_exists- Check if blueprint existsget_blueprint_info- Get comprehensive blueprint metadataget_blueprint_path- Get blueprint asset pathget_blueprint_components- List all blueprint componentsget_blueprint_variables- List all variables with typesget_blueprint_functions- List all custom functionsget_component_hierarchy- Get component parent-child tree
Blueprint Asset Management:
create_blueprint- Create new Blueprint classesdelete_blueprint- Delete blueprint assetsduplicate_blueprint- Clone blueprints with new namecompile_blueprint- Compile Blueprint assetsspawn_blueprint_actor- Spawn Blueprint actors in level
Variable Management:
remove_variable- Delete variablesrename_variable- Rename variables with reference updatesset_variable_default_value- Set default values (bool, int, float, string, Vector, Rotator)set_variable_metadata- Configure variable metadata (tooltip, category, visibility)
Function Management:
add_function- Create custom functionsremove_function- Delete functionsadd_function_parameter- Add parameters to functionsset_function_return_type- Configure return value typeset_function_metadata- Configure function metadata (category, tooltip, pure)
Component Management:
add_component_to_blueprint- Add components to Blueprintsremove_component- Delete componentsrename_component- Rename componentsset_component_transform- Update component transformset_component_property- Set component property valuesset_physics_properties- Configure physics simulationset_static_mesh_properties- Configure static mesh componentsset_pawn_properties- Configure pawn-specific propertiesget_component_properties- Get detailed component properties
Visual scripting node operations.
Available Commands:
connect_blueprint_nodes- Connect Blueprint graph nodesadd_blueprint_self_reference- Add self reference nodesadd_blueprint_get_self_component_reference- Add component reference nodesfind_blueprint_nodes- Search for specific nodesadd_blueprint_event_node- Add event nodesadd_blueprint_input_action_node- Add input action nodesadd_blueprint_function_node- Add function call nodesadd_blueprint_variable- Create variable nodes
Enhanced input system management.
Available Commands:
create_enhanced_input_action- Create enhanced input actionscreate_input_mapping_context- Create input mapping contextsadd_enhanced_input_mapping- Add mappings to contextsapply_mapping_context- Apply contexts at runtimeremove_mapping_context- Remove contexts at runtimeclear_all_mapping_contexts- Clear all active contexts
Dynamic discovery of available classes and types.
Available Commands:
get_supported_parent_classes- Query all available parent classes (100+ via reflection)get_supported_component_types- Query all available component types (50+ via reflection)get_available_api_methods- Get list of all API methods organized by category
User interface widget creation and management.
Available Commands:
create_umg_widget_blueprint- Create widget blueprintsadd_text_block_to_widget- Add text elementsadd_button_to_widget- Add interactive buttonsbind_widget_event- Bind widget events to functionsadd_widget_to_viewport- Display widgets in gameset_text_block_binding- Bind text to data properties
All commands use strongly-typed parameter structures defined in Core/MCPTypes.h:
FBlueprintCreationParams- Blueprint creation parametersFBlueprintSpawnParams- Blueprint actor spawningFComponentParams- Component addition parametersFPropertyParams- Property modification parametersFPhysicsParams- Physics configurationFStaticMeshParams- Static mesh setupFWidgetCreationParams- Widget creationFTextBlockParams- Text block configurationFButtonParams- Button configurationFWidgetEventBindingParams- Event bindingFInputActionParams- Input action creationFInputMappingContextParams- Mapping context setup
All operations return TResult<T> types for error handling:
- Success operations return wrapped values
- Failed operations return descriptive error messages
This plugin implements the Model Context Protocol (MCP) for JSON-based command/response communication. The Python MCP server provides the interface for coding agents to access these capabilities.
Python MCP Repository: sengokudaikon/unreal-mcp
Commands are registered using a registry pattern in each command handler class:
// Example from FUnrealMCPEditorCommands
CommandHandlers.Add(TEXT("spawn_actor"), &FSpawnActor::Handle);All command handlers parse JSON parameters using the FromJson static methods on parameter structures:
auto Result = FSpawnParams::FromJson(Params);
if (!Result.IsSuccess()) {
return CreateErrorResult(Result.GetError());
}Consistent error handling across all commands using the Result<T> pattern:
- Validation errors return immediately
- Runtime errors are logged and returned
- Success responses contain operation results
High-level actor management operations with validation and error handling.
Blueprint asset operations including creation, compilation, and modification.
Visual scripting node manipulation and graph management.
Enhanced input system integration and management.
Viewport control and screenshot capabilities.
UMG widget creation and runtime management.
Commands are executed through the bridge subsystem:
// Get bridge instance
UUnrealMCPBridge* Bridge = GEditor->GetEditorSubsystem<UUnrealMCPBridge>();
// Create JSON parameters
TSharedPtr<FJsonObject> Params = MakeShared<FJsonObject>();
Params->SetStringField(TEXT("actor_name"), TEXT("MyActor"));
// Execute command
TSharedPtr<FJsonObject> Result = Bridge->ExecuteCommand(TEXT("spawn_actor"), Params);- Install this plugin in your Unreal Engine project
- Deploy the Python MCP Server from sengokudaikon/unreal-mcp
- Connect your coding agent to the MCP server to access all blueprint and editor operations
- Use available commands to manipulate blueprints, actors, and game content programmatically