The UEMCP system uses a multi-layer approach to communicate with Unreal Engine:
Claude/AI Assistant → MCP Server (Node.js) → HTTP → Python Listener (in UE) → Unreal Engine
- Receives commands from AI assistants via Model Context Protocol
- Validates and routes commands through HTTP requests
- Location:
server/ - Runs on port 8080 (configurable)
- Makes HTTP POST requests to the Python listener in UE
- Handles retries and error responses
- Location:
server/src/services/python-bridge.ts
- Runs inside Unreal Engine on port 8765
- Receives HTTP commands and queues them for main thread execution
- Uses Unreal's Python API for all operations
- Location:
plugin/Content/Python/uemcp_listener.py
The UEMCP plugin is now a content-only plugin that requires no C++ compilation:
-
No C++ Required
- All functionality implemented through Python scripts
- Eliminates compilation requirements
- Works immediately after copying to UE project
-
HTTP Communication
- Python listener runs an HTTP server inside UE
- Commands sent as JSON over HTTP POST
- Asynchronous command queue for thread safety
-
Hot Reload Support
- Use
restart_listener()to reload changes without restarting UE - Instant development iteration
- Use
The Python plugin follows a modular architecture for better maintainability:
uemcp_utils.py- Common utilities (vector creation, actor finding, logging)uemcp_validation.py- Post-operation validation frameworkuemcp_command_registry.py- Command registration and dispatch system
uemcp_actor_ops.py- Actor spawn, delete, modify, duplicate, organizeuemcp_viewport_ops.py- Camera, screenshot, render modes, view fittinguemcp_asset_ops.py- Asset listing, info, validationuemcp_level_ops.py- Level save, project info, outliner structureuemcp_system_ops.py- Help, connection test, logs, python proxy
- 85% code reduction when using dedicated MCP tools vs python_proxy
- Better maintainability with focused, single-responsibility modules
- Easier testing with isolated components
- Type safety and parameter validation
- Consistent error handling across all operations
- Hot-reloadable modules for faster development
1. AI Assistant calls MCP tool
2. MCP Server receives tool request
3. Python Bridge sends HTTP POST to localhost:8765
4. Python Listener queues command
5. Main thread processes command using UE Python API
6. Result returned via HTTP response
7. MCP Server returns result to AI
{
"type": "project.info",
"params": {},
"requestId": "unique-id"
}- Content-only plugin (no C++ compilation)
- HTTP listener with command queue
- 11 working MCP tools
- Hot reload functionality
- Comprehensive error handling
- Rate limiting protection
- WebSocket support for real-time updates
- Batch command processing
- Command history and undo
- Performance metrics collection
The plugin will be installed in either:
- Project-specific:
<UE_PROJECT_PATH>/Plugins/UEMCP/ - Engine-wide:
<UE_ENGINE_PATH>/Engine/Plugins/UEMCP/
Project-specific is recommended for development.