io.github.ChiR24/unreal-engine-mcp
编码与调试by chir24
面向生产环境的 Unreal Engine MCP 服务器,提供全面的游戏开发工具与集成能力。
想把 AI 真正接入 Unreal Engine 开发流程,它提供面向生产环境的 MCP 服务,把开发、调试与工具集成一次打通。
什么是 io.github.ChiR24/unreal-engine-mcp?
面向生产环境的 Unreal Engine MCP 服务器,提供全面的游戏开发工具与集成能力。
README
Unreal Engine MCP Server
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to control Unreal Engine through a native C++ Automation Bridge plugin. Built with TypeScript and C++.
Table of Contents
- Features
- Getting Started
- Configuration
- Available Tools
- Docker
- Documentation
- Community
- Development
- Contributing
Features
| Category | Capabilities |
|---|---|
| Asset Management | Browse, import, duplicate, rename, delete assets; create materials |
| Actor Control | Spawn, delete, transform, physics, tags, components |
| Editor Control | PIE sessions, camera, viewport, screenshots, bookmarks |
| Level Management | Load/save levels, streaming, lighting |
| Animation & Physics | Animation BPs, state machines, ragdolls, vehicles, constraints |
| Visual Effects | Niagara particles, GPU simulations, procedural effects, debug shapes |
| Sequencer | Cinematics, timeline control, camera animations, keyframes |
| Graph Editing | Blueprint, Niagara, Material, and Behavior Tree graph manipulation |
| Audio | Sound cues, audio components, sound mixes, ambient sounds |
| System | Console commands, UBT, tests, logs, project settings, CVars |
Architecture
- Native C++ Automation — All operations route through the MCP Automation Bridge plugin
- Dual Transport — Native HTTP/SSE (no bridge needed) or WebSocket via TypeScript bridge
- Dynamic Type Discovery — Runtime introspection for lights, debug shapes, and sequencer tracks
- Graceful Degradation — Server starts even without an active Unreal connection
- On-Demand Connection — Retries automation handshakes with exponential backoff
- Command Safety — Blocks dangerous console commands with pattern-based validation
- Capability Token Auth — Optional token-based authentication for both WS and HTTP transports
- Asset Caching — 10-second TTL for improved performance
- Metrics Rate Limiting — Per-IP rate limiting (60 req/min) on Prometheus endpoint
- Centralized Configuration — Unified class aliases and type definitions
Getting Started
Prerequisites
- Unreal Engine 5.0–5.8 (5.8 preview validated)
Choose your transport:
- Option A: Native MCP (recommended) — no additional dependencies
- Option B: TypeScript Bridge — requires Node.js 18+
Step 1: Install MCP Server (Option B only — skip for Native MCP)
Skip this step if using Option A: Native MCP Transport (Step 4A below).
NPX (Recommended):
npx unreal-engine-mcp-server
Clone & Build:
git clone https://github.com/ChiR24/Unreal_mcp.git
cd Unreal_mcp
npm install
npm run build
node dist/cli.js
Step 2: Install Unreal Plugin
The MCP Automation Bridge plugin is included at Unreal_mcp/plugins/McpAutomationBridge.
From source (requires a project with code target)
Your project must have a code target (.sln or .xcworkspace).
Blueprint-only projects cannot compile native plugins — to convert, add any class via Tools > New C++ Class in the editor.
Method 1: Copy Folder
Copy: Unreal_mcp/plugins/McpAutomationBridge/
To: YourUnrealProject/Plugins/McpAutomationBridge/
Method 2: External Plugin Directory (no copy needed)
- Open Unreal Editor → Edit → Plugins
- Click Plugin Directories (bottom-left)
- In Additional Plugin Directories, add the path to
Unreal_mcp/plugins/ - Restart the editor — the plugin will be picked up from the external location
This saves the path in your .uproject file so the plugin stays linked without copying.
The plugin compiles automatically when you open the project — UE detects the .uplugin + Source/ and runs UnrealBuildTool.
Video Guide:
https://github.com/user-attachments/assets/d8b86ebc-4364-48c9-9781-de854bf3ef7d
⚠️ First-Time Project Open: UE may prompt "Would you like to rebuild them now?" — click Yes. If instead you see "Missing Modules — McpAutomationBridge. Engine modules cannot be compiled at runtime. Please build through your IDE." — open your project in Visual Studio (Win) or Xcode (Mac) and build from there. After that, the editor will open normally with the plugin loaded.
Pre-built (works with any project, including Blueprint-only)
Build the plugin once, then distribute the compiled binaries — no IDE or compilation needed on the target machine.
1. Build:
# macOS / Linux
./scripts/package-plugin.sh /path/to/UE_5.6
# Windows
scripts\package-plugin.bat C:\Path\To\UE_5.6
This produces a zip like McpAutomationBridge-v0.5.30-UE5.6-Mac.zip.
2. Install: unzip into YourProject/Plugins/ and open the project. That's it — no compilation step.
Note: pre-built binaries are tied to a specific UE version. A build for 5.6 won't work with 5.5, 5.7, or 5.8.
Step 3: Enable Required Plugins
Enable via Edit → Plugins, then restart the editor.
<details> <summary><b>Core Plugins (Required)</b></summary>| Plugin | Required For |
|---|---|
| MCP Automation Bridge | All automation operations |
| Python Editor Script Plugin | Python-backed editor automation helpers |
| Editor Scripting Utilities | Asset/Actor subsystem operations |
| Niagara | Visual effects and particle systems |
| Gameplay Abilities | manage_gas operations |
| Smart Objects | AI smart object operations |
| Plugin | Required For |
|---|---|
| Level Sequence Editor | manage_sequence operations |
| Control Rig | animation_physics operations |
| GeometryScripting | manage_geometry operations |
| Behavior Tree Editor | manage_ai Behavior Tree operations |
| Niagara Editor | Niagara authoring |
| Environment Query Editor | AI/EQS operations |
| MetaSound | manage_audio MetaSound authoring |
| StateTree | manage_ai State Tree operations |
| Enhanced Input | manage_networking input mapping operations |
| Chaos Cloth | Cloth simulation |
| Interchange | Asset import/export |
| Data Validation | Data validation |
| PCG | manage_pcg graph authoring and execution when enabled for the build |
| Procedural Mesh Component | Procedural geometry |
| OnlineSubsystem | Session/networking operations |
| OnlineSubsystemUtils | Session/networking operations |
💡 Optional plugins are auto-enabled by the MCP Automation Bridge plugin when needed. PCG support is compiled for source projects when the project explicitly enables PCG. Versioned release packages for UE 5.2+ include PCG support.
Step 4: Configure MCP Client
Option A: Native MCP Transport (Direct HTTP — no bridge needed)
The plugin includes a built-in MCP Streamable HTTP server. AI clients connect directly to the plugin over HTTP — no TypeScript bridge, no Node.js, no npm.
Enable in Unreal:
- Edit > Project Settings > Plugins > MCP Automation Bridge
- Check Enable Native MCP
- Set port (default:
3000) - Optionally set Native MCP Instructions for project-specific guidance
- Restart the editor
Configure your MCP client to use Streamable HTTP transport at:
http://localhost:3000/mcp
Claude Code:
claude mcp add unreal-engine --transport http http://localhost:3000/mcp
Or manually in ~/.claude/settings.json or project .mcp.json:
{
"mcpServers": {
"unreal-engine": {
"type": "url",
"url": "http://localhost:3000/mcp"
}
}
}
Cursor (.cursor/mcp.json):
{
"mcpServers": {
"unreal-engine": {
"url": "http://localhost:3000/mcp"
}
}
}
Verify it works:
- Status bar — look for
● MCP :3000 (2)in the bottom-right of the editor. Green dot = server running, number in parens = active sessions. Click it to open settings. - Output Log — filter by
LogMcpNativeTransportto see connections, tool calls, and session activity:codeLogMcpNativeTransport: Native MCP server started on http://localhost:3000/mcp LogMcpNativeTransport: MCP session initialized: ... (client: claude-code 2.1.92, active sessions: 1) LogMcpNativeTransport: tools/call: inspect (RequestId=...) LogMcpNativeTransport: tools/call completed: ... (tool=inspect, success=true)
Features:
- SSE streaming for real-time progress during long operations
- Multiple concurrent sessions (Cursor + Claude Code + others simultaneously)
- Dynamic tool management — core tools load by default, enable more via
manage_tools - Python execution via
execute_pythonaction (inline code or .py files) - Capability token authentication — enable in project settings for network security
Option B: TypeScript Bridge (stdio — classic setup)
Add to your Claude Desktop / Cursor config file:
Using Clone/Build:
{
"mcpServers": {
"unreal-engine": {
"command": "node",
"args": ["path/to/Unreal_mcp/dist/cli.js"],
"env": {
"UE_PROJECT_PATH": "C:/Path/To/YourProject",
"MCP_AUTOMATION_PORT": "8091"
}
}
}
}
Using NPX:
{
"mcpServers": {
"unreal-engine": {
"command": "npx",
"args": ["unreal-engine-mcp-server"],
"env": {
"UE_PROJECT_PATH": "C:/Path/To/YourProject"
}
}
}
}
Configuration
Environment Variables
# Required
UE_PROJECT_PATH="C:/Path/To/YourProject"
# Automation Bridge
MCP_AUTOMATION_HOST=127.0.0.1
MCP_AUTOMATION_PORT=8091
# LAN Access (optional)
# SECURITY: Set to true to allow binding to non-loopback addresses (e.g., 0.0.0.0)
# Only enable if you understand the security implications.
MCP_AUTOMATION_ALLOW_NON_LOOPBACK=false
# Logging
LOG_LEVEL=info # debug | info | warn | error
# Optional
MCP_CONNECTION_TIMEOUT_MS=5000
MCP_REQUEST_TIMEOUT_MS=120000
ASSET_LIST_TTL_MS=10000
# Optional Prometheus metrics endpoint
# Loopback-only by default. Non-loopback metrics requires both explicit opt-in and a token.
# MCP_METRICS_PORT=9100
# MCP_METRICS_HOST=127.0.0.1
# MCP_METRICS_ALLOW_NON_LOOPBACK=false
# MCP_METRICS_TOKEN=change-me
# Custom content mount points (comma-separated)
# Plugins with CanContainContent register mount points beyond /Game/.
# MCP_ADDITIONAL_PATH_PREFIXES=/ProjectObject/,/ProjectAnimation/
LAN Access Configuration
By default, the automation bridge only binds to loopback addresses (127.0.0.1) for security. To enable access from other machines on your network:
TypeScript (MCP Server):
MCP_AUTOMATION_ALLOW_NON_LOOPBACK=true
MCP_AUTOMATION_HOST=0.0.0.0
Unreal Engine Plugin:
- Go to Edit → Project Settings → Plugins → MCP Automation Bridge
- Under Security, enable "Allow Non Loopback"
- Under Connection, set "Listen Host" to
0.0.0.0 - Restart the editor
⚠️ Security Warning: Enabling LAN access exposes the automation bridge to your local network. Only use on trusted networks with appropriate firewall rules. Enable capability token authentication (Require Capability Token in project settings) to prevent unauthorized access when using LAN mode.
Available Tools
23 exposed MCP tools in broad all-tools mode. Related actions live directly on their parent tools so clients load less context without losing capabilities.
<details> <summary><b>Core Tools</b></summary>| Tool | Description |
|---|---|
manage_asset | Assets, Materials, Render Targets, Behavior Trees |
manage_blueprint | Blueprints, SCS components, graph editing, UMG widgets, layout, bindings, animations |
control_actor | Spawn, delete, transform, physics, tags |
control_editor | PIE, Camera, viewport, screenshots |
manage_level | Load/save, streaming, lighting |
system_control | UBT, Tests, Logs, Project Settings, CVars, Python Execution |
inspect | Object Introspection |
manage_tools | Dynamic tool management (enable/disable at runtime) |
| Tool | Description |
|---|---|
build_environment | Landscapes, foliage, procedural terrain, lighting, spline roads/rivers/fences |
manage_level_structure | Levels, sublevels, World Partition, streaming, data layers, HLOD, volumes |
manage_geometry | Procedural mesh creation and editing with Geometry Script |
manage_pcg | PCG graph assets, subgraphs, input/sampler/filter/spawner nodes, pin connections, execution, partition grid size, and node settings |
| Tool | Description |
|---|---|
animation_physics | Animation BPs, skeletons, sockets, physics assets, cloth, vehicles, ragdolls, Control Rig, IK |
manage_effect | Niagara, particles, debug shapes, GPU simulations |
manage_gas | Gameplay Ability System: abilities, effects, attributes |
manage_character | Character creation, movement, advanced locomotion |
manage_combat | Weapons, projectiles, damage, melee combat |
manage_ai | AI controllers, Behavior Trees, EQS, perception, State Trees, Smart Objects, NavMesh/pathfinding |
manage_inventory | Items, equipment, loot tables, crafting |
manage_interaction | Interactables, destructibles, triggers |
| Tool | Description |
|---|---|
manage_audio | Audio Assets, Components, Sound Cues, MetaSounds, Attenuation |
manage_sequence | Sequencer, cinematics, bindings, tracks, playback, keyframes |
manage_networking | Replication, RPCs, network prediction, sessions, split-screen, LAN/voice, game framework, input mappings |
Blueprints • Materials • Textures • Static Meshes • Skeletal Meshes • Levels • Sounds • Particles • Niagara Systems • Behavior Trees
Docker
docker build -t unreal-mcp .
docker run -it --rm -e UE_PROJECT_PATH=/project unreal-mcp
Documentation
| Document | Description |
|---|---|
| Handler Mappings | TypeScript to C++ routing |
| Plugin Extension | C++ plugin architecture |
| Testing Guide | How to run and write tests |
| Roadmap | Development roadmap |
Development
npm run build # Build TypeScript
npm run lint # Run ESLint
npm run test:unit # Run unit tests
npm run test:all # Run all tests
Community
| Resource | Description |
|---|---|
| Project Roadmap | Track roadmap progress and priorities |
| Discussions | Ask questions, share ideas, get help |
| Issues | Report bugs and request features |
Contributing
Contributions welcome! Please:
- Include reproduction steps for bugs
- Keep PRs focused and small
- Follow existing code style
License
MIT — See LICENSE
常见问题
io.github.ChiR24/unreal-engine-mcp 是什么?
面向生产环境的 Unreal Engine MCP 服务器,提供全面的游戏开发工具与集成能力。
相关 Skills
前端设计
by anthropics
面向组件、页面、海报和 Web 应用开发,按鲜明视觉方向生成可直接落地的前端代码与高质感 UI,适合做 landing page、Dashboard 或美化现有界面,避开千篇一律的 AI 审美。
✎ 想把页面做得既能上线又有设计感,就用前端设计:组件到整站都能产出,难得的是能避开千篇一律的 AI 味。
网页应用测试
by anthropics
用 Playwright 为本地 Web 应用编写自动化测试,支持启动开发服务器、校验前端交互、排查 UI 异常、抓取截图与浏览器日志,适合调试动态页面和回归验证。
✎ 借助 Playwright 一站式验证本地 Web 应用前端功能,调 UI 时还能同步查看日志和截图,定位问题更快。
网页构建器
by anthropics
面向复杂 claude.ai HTML artifact 开发,快速初始化 React + Tailwind CSS + shadcn/ui 项目并打包为单文件 HTML,适合需要状态管理、路由或多组件交互的页面。
✎ 在 claude.ai 里做复杂网页 Artifact 很省心,多组件、状态和路由都能顺手搭起来,React、Tailwind 与 shadcn/ui 组合效率高、成品也更精致。
相关 MCP Server
GitHub
编辑精选by GitHub
GitHub 是 MCP 官方参考服务器,让 Claude 直接读写你的代码仓库和 Issues。
✎ 这个参考服务器解决了开发者想让 AI 安全访问 GitHub 数据的问题,适合需要自动化代码审查或 Issue 管理的团队。但注意它只是参考实现,生产环境得自己加固安全。
Context7 文档查询
编辑精选by Context7
Context7 是实时拉取最新文档和代码示例的智能助手,让你告别过时资料。
✎ 它能解决开发者查找文档时信息滞后的问题,特别适合快速上手新库或跟进更新。不过,依赖外部源可能导致偶尔的数据延迟,建议结合官方文档使用。
by tldraw
tldraw 是让 AI 助手直接在无限画布上绘图和协作的 MCP 服务器。
✎ 这解决了 AI 只能输出文本、无法视觉化协作的痛点——想象让 Claude 帮你画流程图或白板讨论。最适合需要快速原型设计或头脑风暴的开发者。不过,目前它只是个基础连接器,你得自己搭建画布应用才能发挥全部潜力。