unreal-mcp
unreal-mcp
一个 MCP 服务器,用于从 Claude 驱动正在运行的 Unreal Engine 编辑器。
它使用 Epic 官方的 Python Remote Execution 协议:
通过 239.0.0.1:6766 上的 UDP 多播发现编辑器实例,然后通过 TCP 通道在编辑器内运行 Python。
Claude ──stdio──▶ unreal-mcp ──UDP discovery + TCP──▶ Unreal Editor (PythonScriptPlugin)协议的客户端部分未内置。服务器在运行时于你的引擎安装目录中定位 Epic 的
remote_execution.py,因此它能跨引擎版本持续工作。
要求
Unreal Engine 5.x(针对 5.6 开发)
Python 3.10+ 和
uv
Related MCP server: unreal-mcp
设置
1. 在 Unreal 中启用远程执行——这是每个人都会遗漏的步骤
远程执行默认关闭。不启用它,编辑器对发现机制不可见,所有工具都会失败。
Edit > Plugins→ 启用 Python Editor Script Plugin → 重启。Edit > Project Settings > Plugins > Python→ 勾选 Enable Remote Execution。重启编辑器。
2. 安装
cd unreal-mcp
uv sync3. 注册到 Claude
添加到 claude_desktop_config.json:
{
"mcpServers": {
"unreal": {
"command": "uv",
"args": ["--directory", "E:\\Maya\\unreal-mcp", "run", "unreal-mcp"]
}
}
}然后启动新对话——会话中途添加的服务器不会被已经运行的聊天拾取。
如果你的引擎位于非标准位置,请设置 UNREAL_ENGINE_ROOT:
"env": { "UNREAL_ENGINE_ROOT": "D:\\Epic\\UE_5.6" }工具
工具 | 只读 | 功能 |
| ✅ | 编辑器是否可达?哪个项目、关卡、Actor 数量。任何失败时从这里开始。 |
| ✅ | 浏览内容浏览器,支持过滤和分页 |
| ✅ | 当前打开关卡中的 Actor 及其变换 |
| 通过自动化管线导入 FBX / OBJ / 纹理 | |
| 将内容资产放置到关卡中 | |
| 移动 / 旋转 / 缩放已放置的 Actor | |
| 破坏性操作——销毁一个 Actor | |
| 对准编辑器视口 | |
| 视口的高分辨率 PNG | |
| 保存已修改的资产和关卡 | |
| 逃生舱口:在编辑器中执行任意 Python |
列表类工具使用 limit / offset 分页,并返回 has_more 以及
next_offset。
结果如何返回
工具主体被包装在一个辅助框架中发送到编辑器,该框架将结果赋值给
result 变量,并以 JSON 格式在哨兵标记之间打印。这样可以防止杂散的
print() 或 Unreal 日志行破坏负载,并将编辑器内的异常转换为结构化错误,而不是埋在 stdout 中的堆栈跟踪。
安全说明
unreal_execute_python 在编辑器的解释器中运行无沙箱代码,具有完整的 unreal 模块访问权限。它可以修改或删除项目内容。请像对待编辑器本身的 Python 控制台一样谨慎使用。
故障排除
"未发现正在运行的 Unreal Editor" ——几乎总是上述的 Enable Remote Execution 设置问题。用 unreal_get_status 确认。
"运行命令时丢失连接……" ——编辑器已关闭或被模态对话框阻塞。关闭对话框后重试;会话会自动重新发现。
打开了多个编辑器 ——第一个被发现的节点胜出。
unreal_get_status 会列出所有节点,以便你区分它们。
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Unreal Editor 5 through the Python remote execution protocol. It allows for managing the editor lifecycle, configuring project settings, and executing Python scripts directly within the Unreal Engine environment.MIT
- AlicenseBqualityDmaintenanceEnables Claude Desktop to interact with Unreal Engine 5.3 via Remote Control API, creating and manipulating 3D objects from text prompts for scene building and editor control.2146MIT
- AlicenseBqualityBmaintenanceEnables Claude to control Unreal Engine 5 editor, spawn actors, build materials, author Blueprints, and more, with zero plugin installation.31MIT
- FlicenseNot gradedqualityDmaintenanceBridges Claude AI to a live Unreal Engine 5 editor session, enabling natural language control of scene inspection, modification, logging, source search, console commands, and C++ class scaffolding.
Related MCP Connectors
Control Unreal Engine to browse assets, import content, and manage levels and sequences. Automate…
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to control Unreal E…
Drive a live Cinevva game session: edit game files, import CC0 assets, preview changes.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Christancho-co/unreal-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server