UE-Editor-MCPServer
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
UE-Editor-MCPServer
将 Unreal Editor 封装为 MCP (Model Context Protocol) Server,供 AI Agent 通过 Python 脚本驱动编辑器,实现自动化迭代。
快速开始
1. 安装 Python 依赖
插件根目录下执行(需要 uv):
uv sync不使用 uv:
pip install -r requirements.txt
2. 启动 UE 编辑器
启动编辑器后,C++ 模块自动启动 Forwarder(监听 127.0.0.1:8100)。
3. 配置 MCP 客户端
stdio 模式(推荐)
由 MCP 客户端自动拉起 main.py,无需手动操作。
{
"mcpServers": {
"ue-editor": {
"command": "uv",
"args": [
"run", "--directory", "D:\\MCP\\Plugins\\UE-Editor-MCPServer",
"python", "main.py",
"--project", "D:\\MCP\\YourProj.uproject"
]
}
}
}
--project指向.uproject路径,用于额外暴露open_editor/close_editor工具(自动 GPF/Build/启动/关闭编辑器)。省略则只暴露execute_command/excute_file/get_editor_state三个工具。
SSE 模式
手动启动 MCPStandalone:
python main.py --transport sse客户端配置:
{
"mcpServers": {
"ue-editor": {
"url": "http://127.0.0.1:8099/SSE"
}
}
}SSE 端点路径大小写不敏感:
/SSE、/sse、/Sse均可。
Related MCP server: unreal-engine-mcp
配置说明
配置优先级:命令行参数 > 环境变量 > .env 文件 > 默认值。
.env 配置文件
在插件根目录创建 .env(可复制 .env.example):
# MCP 服务监听地址(仅 SSE 模式使用)
MCP_HOST=127.0.0.1
MCP_PORT=8099
# UE 编辑器 Forwarder 地址(TCP 转发器)
EDITOR_HOST=127.0.0.1
EDITOR_PORT=8100默认端口:MCP 8099,Editor Forwarder 8100。多项目需分配不同端口。
参数 | 说明 | 默认值 |
| 传输模式: |
|
| MCP 监听地址(仅 SSE 模式) |
|
| MCP 监听端口(仅 SSE 模式) |
|
| 编辑器 Forwarder 地址 |
|
| 编辑器 Forwarder 端口 |
|
|
| 无 |
| 调试模式(输出详细日志到 stderr) | 关闭 |
| 执行 Python 代码前启用 mypy 类型检查 | 关闭 |
mypy 类型检查(可选)
在 Python 代码执行前自动进行 mypy 类型检查,尽早发现类型错误。
启用
# .env
MYPY_ENABLED=true或命令行:python main.py --mypy-enabled
需要系统 Python 安装 mypy:
pip install mypy
故障排除
客户端无法连接
stdio 模式:检查客户端配置中的
command和args路径是否正确SSE 模式:确认已手动运行
python main.py --transport sse确认端口未被占用(默认 8099/8100)
使用调试模式:
python main.py --transport sse --debug
工具调用失败 / execute_command 无返回
确认编辑器已完全加载(底部状态栏无"Loading")
确认 Forwarder 正常运行:在编辑器 Python 控制台执行
from mcp_server import Start; Start.print_status()检查
8099和8100端口是否都可访问查看 MCPStandalone 的 stderr 输出(stdio 模式在客户端日志中)
端口冲突
修改 .env:
MCP_PORT=8199
EDITOR_PORT=8200重启编辑器并更新客户端配置。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to control Unreal E…
Make games with AI: one MCP server that connects your agent to Unity, Unreal and Godot editors.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
MCP server exposing the Backtest360 engine API as tools for AI agents.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMCP server for controlling Unreal Engine 5 from AI agents, providing 120+ commands for spawning actors, editing Blueprints, managing assets, and more via CLI or MCP.34 PyPI216MIT
- AlicenseBqualityCmaintenanceAn MCP server that gives AI agents broad control over Unreal Engine 5.7, enabling actor/asset/level management, Blueprint and material creation, screenshots, automation, and arbitrary editor Python execution.35MIT
- AlicenseCqualityCmaintenanceEnables AI clients to control Unreal Engine 5 editor for automated Blueprint authoring, level inspection, actor spawning, and other editor workflows via a local Python MCP server and UE plugin.5004AGPL 3.0
- AlicenseBqualityCmaintenanceAn MCP server that lets an AI agent drive Unreal Engine 5: create projects, import assets, build levels and Blueprints, configure replication, compile C++, run Play In Editor and package the game.100116 PyPI6MIT