$git clone https://github.com/chongdashu/unreal-mcp</div>
| 1 | <div align="center"> |
| 2 | |
| 3 | # Model Context Protocol for Unreal Engine |
| 4 | <span style="color: #555555">unreal-mcp</span> |
| 5 | |
| 6 | [](https://opensource.org/licenses/MIT) |
| 7 | [](https://www.unrealengine.com) |
| 8 | [](https://www.python.org) |
| 9 | [](https://github.com/chongdashu/unreal-mcp) |
| 10 | |
| 11 | </div> |
| 12 | |
| 13 | This project enables AI assistant clients like Cursor, Windsurf and Claude Desktop to control Unreal Engine through natural language using the Model Context Protocol (MCP). |
| 14 | |
| 15 | ## ⚠️ Experimental Status |
| 16 | |
| 17 | This project is currently in an **EXPERIMENTAL** state. The API, functionality, and implementation details are subject to significant changes. While we encourage testing and feedback, please be aware that: |
| 18 | |
| 19 | - Breaking changes may occur without notice |
| 20 | - Features may be incomplete or unstable |
| 21 | - Documentation may be outdated or missing |
| 22 | - Production use is not recommended at this time |
| 23 | |
| 24 | ## 🌟 Overview |
| 25 | |
| 26 | The Unreal MCP integration provides comprehensive tools for controlling Unreal Engine through natural language: |
| 27 | |
| 28 | | Category | Capabilities | |
| 29 | |----------|-------------| |
| 30 | | **Actor Management** | • Create and delete actors (cubes, spheres, lights, cameras, etc.)<br>• Set actor transforms (position, rotation, scale)<br>• Query actor properties and find actors by name<br>• List all actors in the current level | |
| 31 | | **Blueprint Development** | • Create new Blueprint classes with custom components<br>• Add and configure components (mesh, camera, light, etc.)<br>• Set component properties and physics settings<br>• Compile Blueprints and spawn Blueprint actors<br>• Create input mappings for player controls | |
| 32 | | **Blueprint Node Graph** | • Add event nodes (BeginPlay, Tick, etc.)<br>• Create function call nodes and connect them<br>• Add variables with custom types and default values<br>• Create component and self references<br>• Find and manage nodes in the graph | |
| 33 | | **Editor Control** | • Focus viewport on specific actors or locations<br>• Control viewport camera orientation and distance | |
| 34 | |
| 35 | All these capabilities are accessible through natural language commands via AI assistants, making it easy to automate and control Unreal Engine workflows. |
| 36 | |
| 37 | ## 🧩 Components |
| 38 | |
| 39 | ### Sample Project (MCPGameProject) `MCPGameProject` |
| 40 | - Based off the Blank Project, but with the UnrealMCP plugin added. |
| 41 | |
| 42 | ### Plugin (UnrealMCP) `MCPGameProject/Plugins/UnrealMCP` |
| 43 | - Native TCP server for MCP communication |
| 44 | - Integrates with Unreal Editor subsystems |
| 45 | - Implements actor manipulation tools |
| 46 | - Handles command execution and response handling |
| 47 | |
| 48 | ### Python MCP Server `Python/unreal_mcp_server.py` |
| 49 | - Implemented in `unreal_mcp_server.py` |
| 50 | - Manages TCP socket connections to the C++ plugin (port 55557) |
| 51 | - Handles command serialization and response parsing |
| 52 | - Provides error handling and connection management |
| 53 | - Loads and registers tool modules from the `tools` directory |
| 54 | - Uses the FastMCP library to implement the Model Context Protocol |
| 55 | |
| 56 | ## 📂 Directory Structure |
| 57 | |
| 58 | - **MCPGameProject/** - Example Unreal project |
| 59 | - **Plugins/UnrealMCP/** - C++ plugin source |
| 60 | - **Source/UnrealMCP/** - Plugin source code |
| 61 | - **UnrealMCP.uplugin** - Plugin definition |
| 62 | |
| 63 | - **Python/** - Python server and tools |
| 64 | - **tools/** - Tool modules for actor, editor, and blueprint operations |
| 65 | - **scripts/** - Example scripts and demos |
| 66 | |
| 67 | - **Docs/** - Comprehensive documentation |
| 68 | - See [Docs/README.md](Docs/README.md) for documentation index |
| 69 | |
| 70 | ## 🚀 Quick Start Guide |
| 71 | |
| 72 | ### Prerequisites |
| 73 | - Unreal Engine 5.5+ |
| 74 | - Python 3.12+ |
| 75 | - MCP Client (e.g., Claude Desktop, Cursor, Windsurf) |
| 76 | |
| 77 | ### Sample project |
| 78 | |
| 79 | For getting started quickly, feel free to use the starter project in `MCPGameProject`. This is a UE 5.5 Blank Starter Project with the `UnrealMCP.uplugin` already configured. |
| 80 | |
| 81 | 1. **Prepare the project** |
| 82 | - |