unreal-mcp
by chongdashu·★ 1,879·综合分 45
MCP 服务器让 AI 助手通过自然语言控制虚幻引擎。
概述
这个 MCP 服务器通过自然语言命令,让 AI 助手(如 Cursor、Windsurf 和 Claude Desktop)控制虚幻引擎。它提供演员管理、蓝图开发、节点图操作和编辑器控制等功能。项目包含一个与虚幻编辑器集成的 C++ 插件和一个实现模型上下文协议的 Python MCP 服务器。
试试问 AI
装完之后,这里有 7 个你可以让 AI 做的事:
什么时候选它
如果你正在使用虚幻引擎,并希望通过自然语言命令利用 AI 助手自动化场景设置、蓝图开发和编辑器控制,应选择此方案。
什么时候不要选它
如果你需要稳定的生产级 API,或者不使用虚幻引擎,请勿选择此方案,因为它目前处于实验阶段且需要虚幻引擎集成。
此 server 暴露的工具
从 README 抽取出 12 个工具create_actorCreate actors (cubes, spheres, lights, cameras, etc.) in the Unreal Engine scene
delete_actorDelete actors from the current level
set_actor_transformSet actor properties like position, rotation, and scale
query_actor_propertiesQuery properties and find actors by name
list_actorsList all actors in the current level
create_blueprint_classCreate new Blueprint classes with custom components
add_blueprint_componentAdd and configure components to Blueprints
compile_blueprintCompile Blueprint scripts to validate and build them
add_blueprint_nodeAdd nodes to Blueprint graphs
add_blueprint_variableCreate variables with custom types in Blueprints
focus_viewportFocus viewport on specific actors or locations
spawn_blueprint_actorSpawn Blueprint actors in the world
可对比工具
安装
安装步骤
- **先决条件**
- 虚幻引擎 5.5+ - Python 3.12+ - MCP 客户端(Claude Desktop、Cursor、Windsurf)
- **插件设置**
- 将 MCPGameProject/Plugins/UnrealMCP 复制到项目的 Plugins 文件夹 - 在虚幻编辑器中启用插件:编辑 > 插件 > UnrealMCP - 生成并构建 Visual Studio 项目文件
- **Python 服务器设置**
- 设置 Python 环境 - 导航到 Python 文件夹 - 安装依赖项 - 运行 unreal_mcp_server.py
- **配置 MCP 客户端**
在配置文件中添加:
{
"mcpServers": {
"unrealMCP": {
"command": "uv",
"args": [
"--directory",
"<path/to/the/folder/PYTHON>",
"run",
"unreal_mcp_server.py"
]
}
}
}配置文件位置:
- Claude Desktop:
~/.config/claude-desktop/mcp.json - Cursor:
.cursor/mcp.json - Windsurf:
~/.config/windsurf/mcp.json
FAQ
- 这个项目是否可用于生产环境?
- 否,此项目目前处于 EXPERIMENTAL 状态。可能会发生不通知的破坏性更改,功能可能不完整,目前不建议在生产环境中使用。
- 支持哪些虚幻引擎版本?
- 此项目支持虚幻引擎 5.5 及更高版本。
- 如何将 Python 服务器连接到虚幻引擎插件?
- Python 服务器通过端口 55557 上的 TCP 套接字连接到 C++ 插件。插件充当 MCP 通信的原生 TCP 服务器。
unreal-mcp 对比
最后更新于 · 由 README + GitHub 公开数据自动生成。