
unreal-mcp-ue4-for-ohd
io.github.RibatTRW由 GitHub 帳號 RibatTRW 發布v2026.5.12-12更新於 Oct 24, 2026
UE4.25 MCP server for Unreal Editor via Python Remote Execution (OHD mod-kit retarget).
概覽
讓 AI 助理透過 Python 遠端執行檢查並修改已開啟的 Unreal Engine 4.25.4 編輯器工作階段,用於 Operation Harsh Doorstop 模組開發。
- 可以做什麼
- 透過 stdio 提供 34 個工具:工作階段資訊與直接的 Actor 建立/更新/刪除基本操作,以及面向資產、Actor、編輯器、關卡、光照、材質、貼圖、藍圖、控件、序列、音訊、資料資產、輸入對應、行為樹等的 manage_* 命名空間。標準讀取入口包括 project_info、map_info 與 world_outliner;manage_editor.run_python 可作為相容 Python 2.7 的指令碼逃生通道。它能生成、變換與刪除關卡 Actor,建立與編輯資產,並架設 WebBrowser 側邊欄分頁。
- 適用情境
- 當你希望助理驅動一個已開啟的 UE4.25.4 OHDCore Mod Kit 編輯器工作階段時使用:讀取專案、地圖與資產狀態,生成或編輯關卡 Actor,建立資料資產、藍圖、控件或序列,或執行臨時的編輯器 Python。它面向在一次性測試專案中工作的模組作者,而非正式發布內容。
- 執行需求
- 本機需要 Node.js 20+ 與 npm,並安裝 unreal-mcp-ue4-for-ohd 套件,另需一個 MCP 用戶端。目標編輯器必須是經 LaunchEditor.bat 啟動的 OHDCore Mod Kit UE4.25.4 專案,並啟用 Python Editor Script Plugin 與 Enable Remote Execution;進階 manage_sequence 操作需要 SequencerScripting。連線可透過 UNREAL_MCP_* 環境變數調整。未宣告任何身分驗證。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 unreal-mcp-ue4-for-ohd,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
unreal-mcp-ue4-for-OHD
UE4.25.4-first MCP server for Operation Harsh Doorstop modding via Unreal Python Remote Execution (stdio transport)
Fork of runreal/unreal-mcp, heavily refactored UE4-first (via a UE4.27.2 stage) and retargeted here to UE4.25.4 for the OHDCore Mod Kit: same transport and tool surface, with version pins, docs links, and Python-dialect constraints adjusted for the kit's embedded Python 2.7.14. Port, tool, docs, and smoke-test work were developed with assistance from OpenAI Codex.
[!NOTE] Still under active development — expect bugs, rough edges, and UE4.25-specific limitations. Published package:
unreal-mcp-ue4-for-ohd· Registry name:io.github.RibatTRW/unreal-mcp-ue4-for-ohd
[!CAUTION] Not an official Epic Games project. Any connected MCP client can inspect and modify your open editor session — use a disposable test project first, especially for asset or world-generation tools.
Contents
- Requirements · Setup · Migrating from unreal-mcp-ue4 · Editor remote execution · Usage · Sidebar tab · Internals · Testing · Publishing · Available Tools · Contributing · Troubleshooting · Notes and Limitations · Roadmap · License
Requirements
Reference: Unreal Engine Python API 4.25. No custom C++ plugin is required — the server uses the editor's built-in Python Remote Execution. UE5-only scripting features are not reintroduced; unreliable graph/binding flows are excluded from the MCP surface or return a clear message instead of failing silently.
Setup
Autonomous agents setting up unattended: follow the ordered guide in docs/agent-setup.md.
Local source checkout:
One install, then one line per client (global vs local-checkout variants). All clients call the same 34 tools over stdio (3 session-info + 3 direct actor CRUD primitives + 28 manage_* namespaces):
Copilot docs: Extending GitHub Copilot Chat with MCP servers · About Model Context Protocol in GitHub Copilot
Migrating from unreal-mcp-ue4
This fork was renamed to its own identity so it can ship independently of upstream. Upstream credit: the UE4 line derives from conaman/unreal-mcp-ue4 (itself forked from runreal/unreal-mcp).
[!WARNING]
npm install -g unreal-mcp-ue4installs upstream's UE4.27 build, not this fork. For the OHD/UE4.25.4 retarget, install the renamed package instead.
Re-add the server in your client (local server labels such as unreal-ue4 are unchanged — only the command changes):
Copilot .vscode/mcp.json: change "command" to "unreal-mcp-ue4-for-ohd", keeping the unreal-ue4 server key.
Editor remote execution
Verified live against the kit. In the OHD editor (LaunchEditor.bat → HarshDoorstop.uproject):
Edit -> Plugins: enablePython Editor Script Plugin(ships disabled).Editor Scripting Utilitiesis already enabled — no action needed. EnableSequencerScripting(ships disabled) only for advancedmanage_sequenceactions: actor binding, track/key edits, camera cuts, playback ranges, speed-track analysis.- Restart if prompted →
Edit -> Project Settings -> Plugins -> Python→ enableEnable Remote Execution(endpoint239.0.0.1:6766, bind0.0.0.0, raise Multicast TTL from kit default0to1). Restart again if needed. - Keep the project open while using the server or tests; restart the editor after any plugin/Python setting change.
- No UMG plugin to install (tooling uses shipped editor modules). Do mod experiments in a throwaway content-only mod (Create Mod in the editor); never edit shipped
Plugins/*,HDAssets, or engine content.
Connection env overrides (UNREAL_MCP_*):
Usage
- Prefer
manage_*namespace tools (action-specific input schemas are exposed over MCP). Namespaces dispatch throughaction+params. Canonical reads:manage_editor.project_info(project),manage_editor.map_info+manage_level.world_outliner(map/level). Discover the surface withmanage_tools(list_namespaces). - Direct tools (
get_unreal_*,editor_create/update/delete_object) are low-level primitives for session path discovery and actor CRUD. manage_editor.run_pythonis the escape hatch for debugging, prototyping, and UE4.25 API gaps — still Python 2.7-compatible.
First run: open the kit project and wait for load → confirm plugins + remote execution → npm install -g unreal-mcp-ue4-for-ohd (or npm run build) → open/start the client session → run something read-only:
unreal-mcp-ue4-for-ohd --version(prints version, no stdio transport)manage_editor+action: "project_info"/"map_info"·manage_level+"world_outliner"·manage_tools+"list_namespaces"- In prose:
Get project info from the unreal-ue4 server.·List the actors in the current level.·Spawn a StaticMeshActor named TestCube at 0,0,100.
What the server can do: read project/map/asset/actor info; spawn, inspect, move, delete level actors; search assets and inspect references/metadata; create DataAsset/StringTable and other common UE4 data assets; create/edit Blueprint assets and Widget Blueprint trees where UE4.25 Python exposes the APIs.
Sidebar tab
One call sets up the EUW (Editor Utility Widget) sidebar tab end to end — an EUW asset plus a WebBrowser child hosting a web page beside the viewport:
manage_widget + action: "setup_sidebar_tab", params widget_blueprint_path (e.g. /Game/DSHSidebar), url (any page URL; the DSH web GUI is the convention), use_template: true (missing target is duplicated from the golden template — full-fill DSHBrowser + verified On Key Down shortcut fix — instead of built from scratch; re-runs are idempotent, reusing existing targets while refreshing URL/layout).
Caveats: non-DSH pages get no editor-driving loop (typing in them does nothing to the viewport); the 4.25 CEF gate applies (a minimal page renders where a full app shows blank); first template use reports template_staged (the 4.25 Asset Registry can't see the staged /Game file until restart — restart, then re-run); a custom browser_widget_name is ignored on the template path with a warning and DSH asset/browser names stay; if the opened tab looks stale, Compile the widget blueprint in the designer, then dock it beside the viewport.
Internals
TypeScript 7 native toolchain (tsc -p tsconfig.json, ES2022, Node 20 proven), stdio transport, Effect-migrated dispatch/connection layers (Zod stays at the MCP SDK call-site — the SDK only accepts Zod). Recent performance work:
Testing
Runner options: --keep-assets (inspect results in the Content Browser), --skip-namespace (skip namespace-dispatch portion), --verbose (MCP server stderr), --help (options without rebuilding). Windows PowerShell:
Success = [PASS] on every step; actor tests visibly create then remove temp actors (both surfaces); asset tests create then remove temp Blueprint/DataAsset/StringTable/Texture/Widget assets. Workflow: test:no-unreal → test:e2e → test:e2e -- --with-assets → try the real client → use a test project before production content.
Publishing
Version format YYYY.M.D-N, unified everywhere (current 2026.9.9-1) — bump it, then:
prepack runs npm run build, so the tarball always uses a fresh dist.
Available Tools
Notes call out important requirements or UE4.25 limitations when they matter. Empty notes mean there are no additional caveats beyond normal editor setup.
The recommended public surface is the manage_* namespace layer. Prefer manage_editor.project_info, manage_editor.map_info, and manage_level.world_outliner as canonical read entry points, and treat the small direct-tool set as low-level primitives for path discovery and actor CRUD.
Editor Session Info
Core Direct Tools
Core Tool Namespaces
World & Environment Tool Namespaces
Content & Authoring Tool Namespaces
Gameplay & Systems Tool Namespaces
Excluded Capability Areas
These capability areas are intentionally not exposed through the MCP surface in this UE4.25 port because they fail reliably in the current Python environment and only add prompt or context overhead until a native bridge exists.
Contributing
main is protected by the protect-main ruleset (PRs only — no direct pushes, force-pushes, or deletions; review threads must resolve). Branch off main, open a PR back, and before pushing run npm run typecheck + npm run check:py27 (plus npm run test:no-unreal when possible). Keep payloads Python 2.7-compatible; the tables above regenerate during build, so run npm run build before committing doc changes.
Troubleshooting
Remote node is not available: open the editor fully first; verifyPython Editor Script Plugin,Editor Scripting Utilities, andEnable Remote Executionare enabled; restart after changing any of them.- Connection/discovery on Windows: allow
UnrealEditor.exeandnode.exethrough Windows Defender Firewall. Discovery is UDP multicast on239.0.0.1:6766, command channel on6776. Override the bind address withUNREAL_MCP_BIND_ADDRESSorUNREAL_MCP_COMMAND_ADDRESSwhen the editor can't discover/connect. In JSON configs, escape backslashes or use forward slashes. - Client can't find
unreal-mcp-ue4-for-ohdornode: put the npm global binary dir on the client'sPATH(or use the absoluteunreal-mcp-ue4-for-ohdpath); for source checkouts use the absolutenode/node.exepath instead of relying onPATH. - Blueprint graph / UMG binding commands unavailable: expected — Widget creation + tree editing work, but delegate bindings and runtime viewport flows don't; Blueprint asset/component/compile + summaries work, but graph inspection, pin wiring, and variable/function metadata are excluded (stock UE4.25 Python doesn't expose them). Full list under
Excluded Capability Areasabove.
Notes and Limitations
- World/structure tools use UE4.25-friendly preset builders on engine basic-shape assets.
- UMG editing works with native
PanelWidgetparents; absolute positioning targetsCanvasPanelslots — runmanage_widget.ensure_canvas_rootfirst when the root isn't a Canvas. Reparenting the root widget and named-slot edits aren't handled; delegate bindings remain unavailable. - Blueprint asset/component editing works; graph inspection, pin wiring, and variable/function metadata inspection are excluded.
- The surface mixes granular tools and action-based namespaces so clients can work at different abstraction levels.
Roadmap
- Improve Code Architecture (Effect-migration phases 0-7 landed)
- Add Dsh Harness Support (
manage_widget.setup_sidebar_tab+ golden template) - Add a agent.md so agents can install it easily (landed as
docs/agent-setup.md) - Add GitHub Actions CI (
.github/workflows/ci.ymlgreen on main + Tests badge live;protect-mainruleset PR-only with required status checks) - Cut a first fork release (tags exist, e.g.
2026.5.12-12; published to npm asunreal-mcp-ue4-for-ohd) - Decide registry identity: renamed to the fork's own
io.github.RibatTRW/unreal-mcp-ue4-for-ohd(seeMigrating from unreal-mcp-ue4above)
License
Licensed under the MIT License.
來源:README.md,提交 cf04a25
工具
0版本歷史
1- v2026.5.12-12最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分