A comprehensive Unreal Engine 5 plugin that enables AI assistants to control the editor through the Model Context Protocol (MCP).
Copy the McpAutomationBridge folder to your UE project:
YourProject/Plugins/McpAutomationBridge/
- Windows: Right-click
.uproject→ "Generate Visual Studio project files" - Mac: Right-click
.uproject→ "Generate Xcode project"
- Open project in Unreal Editor
- When prompted to rebuild missing modules, click "Yes"
- Close and reopen the editor
- Go to Edit → Plugins
- Enable:
- MCP Automation Bridge
- Editor Scripting Utilities
- Niagara (optional)
cd ue-mcp-server
npm install
npm run buildRefer to mcp-config.example.json for configuration examples.
Claude Desktop Configuration
Add to claude_desktop_config.json:
{
"mcpServers": {
"unreal-engine": {
"command": "node",
"args": ["/absolute/path/to/ue-mcp-server/dist/index.js"],
"env": {
"MCP_AUTOMATION_HOST": "127.0.0.1",
"MCP_AUTOMATION_PORT": "8091"
}
}
}
}Config File Locations:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
- Open your UE project
- Restart Claude Desktop
- The plugin will automatically start the WebSocket server on port 8091
Claude Desktop (AI)
↓ MCP Protocol
ue-mcp-server (TypeScript)
↓ WebSocket (Port 8091)
McpAutomationBridge (UE C++ Plugin)
↓ UE C++ API
Unreal Engine Editor
- Node operations: create, move, delete, copy
- Connection management: data flow and execution flow
- Variable & function creation with access control
- Support: Actor, Widget, Function Library, Interface, Enum, Structure
- Actor management: spawn, move, rotate, scale, delete
- Level management: create, switch, streaming
- Environment: terrain, vegetation, lighting
- Create materials and instances
- Connect material nodes
- Configure blend modes and parameters
- Create widgets (Button, Text, Image, etc.)
- Layout controls (Canvas Panel, Box, Grid, etc.)
- Event binding and interactions
- Create animation blueprints
- Design state machines
- Configure transitions
- Import and manage audio assets
- Configure attenuation and concurrency
- Dynamic audio systems
- Collision configuration
- Physical materials
- Physics simulation
- Behavior trees
- Perception systems
- AI decision logic
- Input mappings
- Gameplay tags
- Asset management
- Visual debugging
- Logging system
- Performance optimization
get_blueprint_nodes- Get blueprint node informationcreate_blueprint_node- Create blueprint nodesmove_blueprint_node- Move blueprint nodesdelete_blueprint_node- Delete blueprint nodesconnect_blueprint_pins- Connect blueprint pinsdisconnect_blueprint_pins- Disconnect blueprint pinsget_node_connections- Get node connection informationcreate_blueprint_variable- Create blueprint variablescreate_blueprint_function- Create blueprint functions
spawn_actor- Spawn actorsmove_actor- Move actorsrotate_actor- Rotate actorsscale_actor- Scale actorsdelete_actor- Delete actorsget_scene_actors- Get scene actor list
find_assets- Find assets in projectcreate_asset- Create assetsrename_asset- Rename assetsmove_asset- Move assetsdelete_asset- Delete assetsduplicate_asset- Duplicate assetsget_asset_references- Get asset references
create_game_mode- Create game modesconfigure_input- Configure input mappingscreate_game_tag- Create gameplay tags
- Create character blueprint class (inheriting from Character)
- Add character movement component
- Add spring arm and camera components
- Create movement input logic (WASD)
- Add mouse view control
- Reference animation blueprint
- Configure default properties
- Place instance in scene
- Create game mode blueprint
- Design scoring variables and logic
- Create UI Widget for score display
- Implement scoring events
- Configure win/lose conditions
- Add sound effects
- Implement level restart
- Analyze project structure
- Identify performance bottlenecks
- Optimize material complexity
- Merge static meshes
- Configure LOD
- Set culling distance
- Organize asset directory
- Generate optimization report
- Close Unreal Editor
- Reopen the project
- Plugin should load correctly
- Verify plugin is enabled in Edit → Plugins
- Check port 8091 is not blocked by firewall
- Ensure MCP server is running
- Close your IDE
- Delete
Intermediate/,Binaries/,Saved/folders - Regenerate project files
- Rebuild the project
Each MCP tool performs one specific operation:
- Allows flexible operation combination
- Reduces error probability
- Simplifies testing and maintenance
- Provides clear error messages
Complete editor state information:
- Currently selected objects
- All actors in scene
- All nodes in blueprint
- Connection relationships
- Asset references
- Operation suggestions
- Parameter auto-completion
- Context-aware recommendations
- Best practice tips
- Operation whitelist
- Sensitive operation confirmation
- Complete operation logs
- Automatic backup
- Operation rollback support
- Blueprint node operations
- Blueprint connection operations
- Variable and function management
- Basic scene operations
- Material system operations
- UI system operations
- Animation system operations
- Physics system configuration
- AI system operations
- Project configuration management
- Performance optimization tools
- Advanced debugging features
- Unreal Engine 5.0 - 5.7
- Platforms: Win64, Mac, Linux
MIT License
一个完整的虚幻引擎5插件,通过MCP协议使AI助手能够控制编辑器。
将 McpAutomationBridge 文件夹复制到您的UE项目:
YourProject/Plugins/McpAutomationBridge/
- Windows:右键
.uproject→ "Generate Visual Studio project files" - Mac:右键
.uproject→ "Generate Xcode project"
- 在虚幻编辑器中打开项目
- 提示重建缺失模块时,点击"是"
- 关闭并重新打开编辑器
- 前往 编辑 → 插件
- 启用:
- MCP Automation Bridge
- Editor Scripting Utilities
- Niagara(可选)
cd ue-mcp-server
npm install
npm run build请参考 mcp-config.example.json 查看完整配置示例。
Claude Desktop 配置
添加到 claude_desktop_config.json:
{
"mcpServers": {
"unreal-engine": {
"command": "node",
"args": ["/绝对路径/ue-mcp-server/dist/index.js"],
"env": {
"MCP_AUTOMATION_HOST": "127.0.0.1",
"MCP_AUTOMATION_PORT": "8091"
}
}
}
}配置文件位置:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
- 打开您的UE项目
- 重启Claude Desktop
- 插件会自动在8091端口启动WebSocket服务器
Claude Desktop (AI)
↓ MCP协议
ue-mcp-server (TypeScript)
↓ WebSocket (端口 8091)
McpAutomationBridge (UE C++ 插件)
↓ UE C++ API
虚幻引擎编辑器
- 节点操作:创建、移动、删除、复制
- 连接管理:数据流和执行流
- 变量与函数创建,支持访问控制
- 支持:Actor、Widget、函数库、接口、枚举、结构体
- Actor管理:生成、移动、旋转、缩放、删除
- 关卡管理:创建、切换、流式加载
- 环境构建:地形、植被、光照
- 创建材质和实例
- 连接材质节点
- 配置混合模式和参数
- 创建控件(按钮、文本、图像等)
- 布局控件(画布面板、框、网格等)
- 事件绑定和交互
- 创建动画蓝图
- 设计状态机
- 配置过渡
- 导入和管理音频资产
- 配置衰减和并发
- 动态音频系统
- 碰撞配置
- 物理材质
- 物理模拟
- 行为树
- 感知系统
- AI决策逻辑
- 输入映射
- 游戏标签
- 资产管理
- 可视化调试
- 日志系统
- 性能优化
get_blueprint_nodes- 获取蓝图节点信息create_blueprint_node- 创建蓝图节点move_blueprint_node- 移动蓝图节点delete_blueprint_node- 删除蓝图节点connect_blueprint_pins- 连接蓝图引脚disconnect_blueprint_pins- 断开蓝图引脚get_node_connections- 获取节点连接信息create_blueprint_variable- 创建蓝图变量create_blueprint_function- 创建蓝图函数
spawn_actor- 生成Actormove_actor- 移动Actorrotate_actor- 旋转Actorscale_actor- 缩放Actordelete_actor- 删除Actorget_scene_actors- 获取场景Actor列表
find_assets- 查找项目资产create_asset- 创建资产rename_asset- 重命名资产move_asset- 移动资产delete_asset- 删除资产duplicate_asset- 复制资产get_asset_references- 获取资产引用
create_game_mode- 创建游戏模式configure_input- 配置输入映射create_game_tag- 创建游戏标签
- 创建角色蓝图类(继承自Character)
- 添加角色移动组件
- 添加弹簧臂和摄像机组件
- 创建移动输入逻辑(WASD)
- 添加鼠标视角控制
- 引用动画蓝图
- 配置默认属性
- 在场景中放置实例
- 创建游戏模式蓝图
- 设计计分变量和逻辑
- 创建UI Widget显示分数
- 实现得分事件
- 配置胜利/失败条件
- 添加音效反馈
- 实现关卡重启
- 分析项目结构
- 识别性能瓶颈
- 优化材质复杂度
- 合并静态网格体
- 配置LOD
- 设置剔除距离
- 整理资产目录
- 生成优化报告
- 关闭虚幻编辑器
- 重新打开项目
- 插件应该能正确加载
- 验证插件已在 编辑 → 插件 中启用
- 检查端口8091未被防火墙阻止
- 确保MCP服务器正在运行
- 关闭您的IDE
- 删除
Intermediate/、Binaries/、Saved/文件夹 - 重新生成项目文件
- 重新构建项目
每个MCP工具执行一个特定操作:
- 允许灵活的操作组合
- 降低错误概率
- 简化测试和维护
- 提供清晰的错误信息
完整的编辑器状态信息:
- 当前选中的对象
- 场景中的所有Actor
- 蓝图中的所有节点
- 连接关系
- 资产引用
- 操作建议
- 参数自动补全
- 上下文感知推荐
- 最佳实践提示
- 操作白名单
- 敏感操作确认
- 完整的操作日志
- 自动备份
- 操作回滚支持
- 蓝图节点操作
- 蓝图连接操作
- 变量和函数管理
- 基础场景操作
- 材质系统操作
- UI系统操作
- 动画系统操作
- 物理系统配置
- AI系统操作
- 项目配置管理
- 性能优化工具
- 高级调试功能
- 虚幻引擎 5.0 - 5.7
- 平台:Win64, Mac, Linux
MIT License