Model Context Protocol for Unreal Engine
Enable AI assistant clients like Cursor, Windsurf and Claude Desktop to control Unreal Engine through natural language using the Model Context Protocol (MCP).
chongdashu
README
<div align="center">
Model Context Protocol for Unreal Engine
<span style="color: #555555">unreal-mcp</span>
</div>
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).
⚠️ Experimental Status
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:
- Breaking changes may occur without notice
- Features may be incomplete or unstable
- Documentation may be outdated or missing
- Production use is not recommended at this time
🌟 Overview
The Unreal MCP integration provides comprehensive tools for controlling Unreal Engine through natural language:
Category | Capabilities |
---|---|
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 |
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 |
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 |
Editor Control | • Focus viewport on specific actors or locations<br>• Control viewport camera orientation and distance |
All these capabilities are accessible through natural language commands via AI assistants, making it easy to automate and control Unreal Engine workflows.
🧩 Components
Sample Project (MCPGameProject) MCPGameProject
- Based off the Blank Project, but with the UnrealMCP plugin added.
Plugin (UnrealMCP) MCPGameProject/Plugins/UnrealMCP
- Native TCP server for MCP communication
- Integrates with Unreal Editor subsystems
- Implements actor manipulation tools
- Handles command execution and response handling
Python MCP Server Python/unreal_mcp_server.py
- Implemented in
unreal_mcp_server.py
- Manages TCP socket connections to the C++ plugin (port 55557)
- Handles command serialization and response parsing
- Provides error handling and connection management
- Loads and registers tool modules from the
tools
directory - Uses the FastMCP library to implement the Model Context Protocol
📂 Directory Structure
-
MCPGameProject/ - Example Unreal project
- Plugins/UnrealMCP/ - C++ plugin source
- Source/UnrealMCP/ - Plugin source code
- UnrealMCP.uplugin - Plugin definition
- Plugins/UnrealMCP/ - C++ plugin source
-
Python/ - Python server and tools
- tools/ - Tool modules for actor, editor, and blueprint operations
- scripts/ - Example scripts and demos
-
Docs/ - Comprehensive documentation
- See Docs/README.md for documentation index
🚀 Quick Start Guide
Prerequisites
- Unreal Engine 5.5+
- Python 3.12+
- MCP Client (e.g., Claude Desktop, Cursor, Windsurf)
Sample project
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.
- Prepare the project
- Right-click your .uproject file
- Generate Visual Studio project files
- Build the project (including the plugin)
- Open solution (
.sln
) - Choose
Development Editor
as your target. - Build
- Open solution (
Plugin
Otherwise, if you want to use the plugin in your existing project:
-
Copy the plugin to your project
- Copy
MCPGameProject/Plugins/UnrealMCP
to your project's Plugins folder
- Copy
-
Enable the plugin
- Edit > Plugins
- Find "UnrealMCP" in Editor category
- Enable the plugin
- Restart editor when prompted
-
Build the plugin
- Right-click your .uproject file
- Generate Visual Studio project files
- Open solution (`.sln)
- Build with your target platform and output settings
Python Server Setup
See Python/README.md for detailed Python setup instructions, including:
- Setting up your Python environment
- Running the MCP server
- Using direct or server-based connections
Configuring your MCP Client
Use the following JSON for your mcp configuration based on your MCP client.
{
"mcpServers": {
"unrealMCP": {
"command": "uv",
"args": [
"--directory",
"<path/to/the/folder/PYTHON>",
"run",
"unreal_mcp_server.py"
]
}
}
}
An example is found in mcp.json
MCP Configuration Locations
Depending on which MCP client you're using, the configuration file location will differ:
MCP Client | Configuration File Location | Notes |
---|---|---|
Claude Desktop | ~/.config/claude-desktop/mcp.json |
On Windows: %USERPROFILE%\.config\claude-desktop\mcp.json |
Cursor | .cursor/mcp.json |
Located in your project root directory |
Windsurf | ~/.config/windsurf/mcp.json |
On Windows: %USERPROFILE%\.config\windsurf\mcp.json |
Each client uses the same JSON format as shown in the example above. Simply place the configuration in the appropriate location for your MCP client.
License
MIT
Questions
For questions, you can reach me on X/Twitter: @chongdashu
推荐服务器
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
MCP Package Docs Server
促进大型语言模型高效访问和获取 Go、Python 和 NPM 包的结构化文档,通过多语言支持和性能优化来增强软件开发。
Claude Code MCP
一个实现了 Claude Code 作为模型上下文协议(Model Context Protocol, MCP)服务器的方案,它可以通过标准化的 MCP 接口来使用 Claude 的软件工程能力(代码生成、编辑、审查和文件操作)。
@kazuph/mcp-taskmanager
用于任务管理的模型上下文协议服务器。它允许 Claude Desktop(或任何 MCP 客户端)在基于队列的系统中管理和执行任务。
mermaid-mcp-server
一个模型上下文协议 (MCP) 服务器,用于将 Mermaid 图表转换为 PNG 图像。
Jira-Context-MCP
MCP 服务器向 AI 编码助手(如 Cursor)提供 Jira 工单信息。

Linear MCP Server
一个模型上下文协议(Model Context Protocol)服务器,它与 Linear 的问题跟踪系统集成,允许大型语言模型(LLM)通过自然语言交互来创建、更新、搜索和评论 Linear 问题。

Sequential Thinking MCP Server
这个服务器通过将复杂问题分解为顺序步骤来促进结构化的问题解决,支持修订,并通过完整的 MCP 集成来实现多条解决方案路径。
Curri MCP Server
通过管理文本笔记、提供笔记创建工具以及使用结构化提示生成摘要,从而实现与 Curri API 的交互。