Unreal Engine MCP 标志

Unreal Engine MCP

社区
ZiggyMar

MCP server for Unreal Engine 5.6/5.8 :D token-efficient Blueprint reading, editing, and a persistent project index for AI coding agents

发布者ZiggyMar
代码仓库unreal-mcp
语言JavaScript
复刻数
2
星标数
40
可用工具
0
传输类型stdio
分类
许可协议MIT
链接
  • 将工具接入 AI 工作流

    Unreal Engine MCP 提供 MCP 功能,可供兼容的 AI 客户端和智能体使用。

  • 0 个可用工具

    浏览下方可调用的操作;如果服务器提供了名称和描述,也会一并显示。

  • 可直接复制的配置

    使用安装配置片段,在您首选的 MCP 客户端中配置此服务器。

  • 开源社区热度

    关联的代码仓库有 40 个星标和 2 个复刻。

unreal-mcp

Unreal MCP Hero Demo

An MCP server that allows AI agents (Claude, Cursor) to directly control and manipulate Unreal Engine.

This server lets Claude (or any MCP client) read and edit Unreal Engine 5.6/5.8 Blueprints directly, without burning your context window on raw engine JSON, and without needing anything beyond a stock Epic Games Launcher install.

Architecture

The problem this solves

If you've tried pointing an AI assistant at a real Unreal project, you've hit this: Blueprints don't fit in a context window. A single graph dumped as raw engine data is enormous, so either the model never sees enough of the project to have real context, or you spend most of your budget re-explaining what already exists every time you open a new conversation.

This project is built around one idea: the model should never receive a raw engine dump. Every hop between the Unreal Editor and Claude compacts the data: tiered reads, diff-based edits, and a persistent index that's built once and updated incrementally instead of re-scanned on every question.

How it works

Two pieces:

  • UnrealMCPBridge is a C++ editor plugin that runs inside UnrealEditor.exe and exposes a local TCP interface over the engine's own Kismet2/EdGraph/AssetRegistry APIs. Built against a stock launcher install: no engine source required to build or run it.
  • mcp-server is a Node/TypeScript MCP server that translates MCP tool calls into bridge requests, and is responsible for keeping every response cheap: compact field names, capped result sizes, and no re-serializing verbose engine data verbatim.

See ARCHITECTURE.md for the full design.

What it can do

101 tools, grouped by the job rather than by the API they call. Every one is exercised against a real ~1,000-Blueprint project, not a fixture.

Understand a project you did not write get_project_overview, search_project, find_references, map_system, explain_graph, list_blueprints, read_blueprint_summary, read_node_detail, describe_class, find_source, trace_variable, trace_function_calls, list_actors, read_class_defaults, undo_history. Ask for "the countdown" and get the system back - the Blueprints, the functions, what calls what, ordered for reading - rather than a list of string matches.

Find bugs, in plain English audit_project, review_blueprint, project_health, find_orphans, check_data_tables, read_runtime_errors, doctor. The audit prices every finding, so what surfaces first is what actually costs you: a missing Parent: BeginPlay, a replicated variable whose OnRep_ is empty, a Data Table row pointing at a deleted asset, an event graph nothing reaches.

Build features, and prove they work plan_feature, scaffold_blueprint, scaffold_widget, build_graph, add_node, connect_pins, add_event_handler, create_function, add_variable, set_variable_replication, auto_layout_graph, cleanup_blueprint, compile_blueprint, verify_feature. Graphs come out laid out and commented, because output that compiles and output someone is happy to inherit are different things.

Whatever the work happens to be made of Blueprints, C++ (find_source, compile_cpp, hot_reload_cpp), Data Tables, Data Assets, structs, enums, materials and instances, UMG widgets, input mappings, levels and actors, Animation Blueprints, Behavior Trees, Niagara. Read support is deliberately wider than write support, and the README says which is which for each.

Watch it actually run start_pie, watch_runtime, pie_status, screenshot, run_console_command, stop_pie. Every other read here says what a Blueprint claims it does. These say what it did - including the one class of bug a single person cannot reproduce alone:

text
Authority: 0 -> 490  changed=true
Client0:   0 -> 0    changed=false      <- the variable is not replicated

Added in the last day

115 commits. The parts worth knowing about:

  • watch_runtime - observe a running game. Samples variables on live actors during play, in every PIE world, labelled by net role. Proven by planting a replication bug in a real project, watching only the server's copy move, fixing it, and watching both move.
  • hot_reload_cpp - the Ctrl+Alt+F11 a human presses. Until this, a model could find a native bug, write the fix and prove it compiled - and the change sat on disk, because the running editor holds the DLL. Applying it meant you closing the editor. Now it is one call.
  • run_console_command - the tilde key. ce StartWave to fire an event nothing calls yet, Ke * ResetHealth to call a function on every instance, stat unit, slomo, cvars, cheats. One definition instead of forty, and it reports recognised: false for a typo rather than letting a misspelled command look like a working one that did nothing.
  • Reads got cheaper again, measured. Against the same 809-node graph: explain_graph 3,671 -> 2,329, get_project_overview 1,698 -> 829, and find_references and list_blueprints both compacted as well. The whole plant-find-fix-prove loop is 9 calls and ~1,544 tokens, which npm run trial:diagnose runs against a live editor rather than asserting. Two further compactions were measured and reverted - one saved 38 tokens and broke how you naturally identify an actor.
  • Dead-graph detection. A liveness fixpoint over the whole project, biased toward calling things live: 52 of 511 graphs nothing reaches, in the project it was validated against. map_system and plan_feature now say out loud that a system matching your search may be the replaced one, because extending something nothing calls produces a feature that cannot run.
  • New reads: Animation Blueprints, Behavior Trees, Niagara, Data Assets. "The enemies are not following" and "the effect does not play" are real sentences people say, and none of them had anything to land on.
  • A failure class named and hunted down. A check reporting "I found no problems" and "I could not look" with the same word. Four instances fixed - the doctor claiming an all-clear on a plugin that was missing two commands, find_orphans saying "clean" when the class name matched nothing, check_data_tables saying "clean" when a column was empty in every row, and a preset missing the one tool its own job starts from.
  • The tests were mutation-tested. 444 tests, all with assertions - but has assertions is not can fail. Twelve deliberate mutations; eleven caught, one not. That one led to a real defect: a check name that drifts or was never priced silently scores 1 and sinks under every cosmetic finding.
  • A feature built and then deleted. A SpawnActor node the tool's own instructions had claimed for months. It crashed the editor four times; the whole thing was reverted and the README now says plainly that it is not buildable this way. A claim that is not true is worse than a missing feature.

What's different about this one

There are several Unreal MCP projects on GitHub already, and as of UE 5.8 Epic ships its own experimental first-party MCP plugin (5.8 only, opt-in). Worth being direct about where this project actually differs, rather than just claiming "better":

  • Built around reading, not just writing. Most existing projects are strong at creating and manipulating Blueprints from a prompt, but don't address what happens when the model needs to understand a large, already-built project first. Reading is the first-class citizen here: tiered summaries before full detail, node IDs you can reference without re-fetching.

  • A persistent, incrementally-updated project index. The bridge indexes Blueprints, functions, variables, and cross-asset references once, caches it to disk, and updates it from AssetRegistry delegates as you edit, instead of rescanning the project on every query. find_references answers "what actually uses this Blueprint" without the model having to enumerate the project itself.

  • Reads that fit in a context window. Reading one real Blueprint graph — 807 nodes — used to return 126,477 tokens, 63% of a 200k window in a single call, from a project whose whole premise is that the model never sees a raw engine dump. It is 3,110 now, with the full graph one parameter away and a match filter that answers a specific question for a fraction of that. Every read is measured against a real project by npm run measure:reads, which finds the worst graph itself and fails the build if any read grows past its ceiling.

  • A tool surface that costs 2.4k tokens instead of 34.8k. Tool definitions are paid for on every request, before your message is read. The search profile stands up four tools and switches the other 97 off — and because they are switched off rather than hidden behind a generic dispatcher, unreal_enable_tools hands back their real, fully typed schemas. One extra call at the start of a session, nothing given up, and 32k tokens a turn saved for the rest of it. The numbers are measured by npm run check:profiles, which fails the build if a profile grows past its budget.

  • Graphs read and write as code. explain_graph with format: "dsl" returns a graph as S-expressions — real if/else, the literal arguments to each call, named continuations for casts and latent nodes — and build_graph takes the same text back through its dsl parameter. Changing a Blueprint becomes "read it, edit two lines, send it back" rather than working out which node ids to rewire. A five-node branching graph is 2,045 characters as node-and-pin structure and 302 as DSL:

    lisp
    (event EventBeginPlay
      (bind v1 (cast BP_Door :Object (GetOwner))
        (:then
          (if bIsLocked
            (call PrintString :InString "locked" :Duration 2.0)
            (else
              (set bIsLocked true))))
        (:CastFailed
          (call PrintString :InString "not a door"))))

    The shape is taken from Epic's own blueprint_dsl.py in the 5.8 first-party plugin — see docs/EPIC_58_TEARDOWN.md — but the vocabulary is this server's, so the text round-trips through our own writer rather than their toolset registry.

  • The server tells the model how to work before it starts. MCP's instructions field carries the call order and the exact strings no model can recall reliably — the target pin is self, Sequence's outputs are then_0/then_1 — so the model arrives knowing them instead of spending failed calls discovering them. unreal_guide then lets it look anything else up mid-task, a section at a time.

  • It can see the game run, not just read the files. watch_runtime samples variables on live actors during play, in every PIE world, labelled by net role. Replication bugs are the one class of defect a single person cannot reproduce alone — Authority: 0 -> 490, Client0: 0 -> 0 is that bug observed rather than argued. No other project in the survey reads runtime state at all.

  • It can finish a C++ change, not just check one. compile_cpp proves an edit builds; hot_reload_cpp patches it into the editor that is already open, which is the Ctrl+Alt+F11 a human presses. Without it, every native fix ends with a human closing the editor.

  • Findings are priced, so the important one is first. The audit scores every finding by what it actually costs you, and every check name is guarded by a test — an unpriced name silently scored 1 and sank below every cosmetic result, which was found by mutation-testing the suite rather than by reading it.

  • Verdicts distinguish "nothing is wrong" from "I could not look". They used to share a word, in four places. A tool that says clean when it could not check is worse than one that says nothing.

  • Targets both 5.6 and 5.8 from one codebase, where several existing projects are pinned to a single engine version.

Small local models are still supported and still measured — the minimal profile exists because a 14B on a 12 GB card loads at 8k context and fails at 16k — but they are now an explicit opt-in rather than what the install path quietly hands everyone. There is also an optional local-model hook for indexing (UNREAL_MCP_LOCAL_LLM_URL), which generates search summaries off your context budget. Fully optional; the index works without it.

Full survey of the existing ecosystem (licenses, architectures, what each one does well) is in docs/COMPETITIVE_LANDSCAPE.md.

There is also a companion document that starts from the other end: docs/COMPLAINTS_SOLVED.md collects the complaints people actually file about Unreal MCP servers, each with its source link, and states plainly whether this project solves it, partly solves it, or does not. The open rows are left open on purpose.

Status

This is being built and verified in public, milestone by milestone. Each milestone's status doc is written honestly, including what's compiled/tested versus what's still unverified:

All four milestones are build-verified, protocol-verified, and live-verified on both engine versions. See docs/LIVE_VERIFICATION.md for the 5.8 session against a real ~20-Blueprint project and docs/UE56_STATUS.md for the 5.6 one: reads returning correct real data, a full create/wire/compile/save write round-trip, and confirmation that the incremental project index actually stays fresh without restarting the editor (M3's core claim).

Both live sessions earned their keep by catching a real bug that no amount of compiling or protocol testing would have surfaced. On 5.8 it was add_node duplicating an already-present override-event node. On 5.6 it was the .uplugin hard-pinning EngineVersion to 5.8.0: every build check passed because UnrealBuildTool ignores that field, but the runtime plugin loader honors it, so the editor stopped on a modal incompatibility dialog and the bridge never started.

Since then, all of that has been exercised live too: remove_node and VariableGet are covered by the node-id and control-flow suites, and add_node now places Branch, Sequence, Cast, and standard-library macros (ForEachLoop, WhileLoop, ...) directly, verified by building and compiling a real conditional graph through the bridge alone. Node ids are persistent GUIDs, and every write is undoable with Ctrl+Z under a named "MCP:" transaction. Still outstanding: CustomEvent/VariableSet node types have not had a dedicated live check, and the M5 catalog covers UFunction-backed nodes; native UK2Node types are placed via the dedicated nodeType values rather than discovered through unreal_find_node.

Quickstart (4-Step Installation)

Ensure you have Node.js 18+ and a UE 5.6 / 5.8 project.

1. Install the Unreal Plugin

Copy the UnrealMCPBridge plugin folder into your Unreal project's Plugins/ directory:

bash
# macOS / Linux
mkdir -p "/path/to/YourProject/Plugins" && cp -r UnrealMCPBridge "/path/to/YourProject/Plugins/"

# Windows (PowerShell)
New-Item -ItemType Directory -Force -Path "C:\path\to\YourProject\Plugins"; Copy-Item -Recurse UnrealMCPBridge "C:\path\to\YourProject\Plugins\"

Note: Rebuild/open your Unreal project to compile the plugin, and ensure it is enabled in the editor.

There are prebuilt plugin releases on the releases page, and they are older than this server. The bridge has gained more than twenty commands since the last one, and the protocol number did not change, so an old plugin looks healthy and then fails on the first tool that needs a command it does not have. --doctor now probes for those commands specifically and says so. Building from this checkout is the reliable path.

2. Build the MCP Server

Install the node dependencies and compile the typescript codebase:

bash
cd mcp-server && npm install && npm run build

3. Check it works before wiring anything up

With the editor open, run:

bash
node mcp-server/dist/index.js --doctor

It reports whether the plugin is reachable, whether its protocol matches the server, whether the project index is built or still scanning, whether the engine's node catalog is readable, and whether a PIE session is in the way. Every failed check comes with the remedy, so you never have to guess which of six things is wrong. Exit code 1 means the editor could not be reached.

4. Register the Server

Do not hand-write the config. Run this from your project directory and it writes the files:

bash
node mcp-server/dist/index.js --install-config

That writes every project-scoped client at once — .mcp.json (Claude Code), .cursor/mcp.json, .vscode/mcp.json, .gemini/settings.json, .codex/config.toml — creating directories as needed. If a file already exists, only the unreal entry is touched; MCP servers you already had are preserved, and a file that is not valid JSON is refused rather than overwritten.

bash
node mcp-server/dist/index.js --install-config --client cursor          # just one client
node mcp-server/dist/index.js --install-config --client claude-desktop  # global, per-user config
node mcp-server/dist/index.js --install-config --dir /path/to/project   # somewhere other than cwd

Claude Desktop is not part of the sweep and has to be named, because its config is global and shared with every other project on the machine. The file locations and root keys follow Epic's own ModelContextProtocol.GenerateClientConfig in UE 5.8, so they are the ones every Unreal developer will be told to expect.

--print-config still emits the JSON without writing anything, if you would rather paste it:

bash
node mcp-server/dist/index.js --print-config                      # Claude Desktop
node mcp-server/dist/index.js --print-config --client cursor      # Cursor
node mcp-server/dist/index.js --print-config --client claude-code # Claude Code

It emits the exact JSON for this machine, with absolute paths already resolved, and tells you which file it goes in.

That exists because client setup is its own category of failure and all of it is self-inflicted: a missing comma breaks the whole file, a relative path silently does not resolve, and on Windows a bare node may not be on the PATH the client uses. Every one of those produces the same symptom — the server never starts, with no explanation. The printed config uses the absolute path of the Node that ran the command, so it cannot be the wrong one.

Then fully quit and reopen the client. Closing the window is not enough, and it is the most common reason a correct config appears not to work.

Point your client at the absolute path of mcp-server/dist/index.js:

Claude Code:

bash
claude mcp add unreal -- node "/path/to/unreal-mcp/mcp-server/dist/index.js"

Claude Desktop (claude_desktop_config.json):

json
{
  "mcpServers": {
    "unreal": {
      "command": "node",
      "args": ["/path/to/unreal-mcp/mcp-server/dist/index.js"]
    }
  }
}

Note that "command": "node" depends on node being on the PATH your client uses, which on Windows it often is not. That is the single most common reason a correct-looking config never starts, and the reason --print-config exists.

Once registered, open your project in the Unreal Editor and verify the connection via unreal_ping.

For more configuration options and details, see mcp-server/README.md.

What CI covers, and what it does not

Status: the workflow is committed but has never run. GitHub refused to start it - "the job was not started because your account is locked due to a billing issue" - so no badge is shown here. A badge reading "failing" for a billing reason would say something false about the code. The workflow is structurally valid and the whole suite is verified to pass locally with no editor running, which is the same thing it does on a runner; that is a claim about local runs, not a CI result.

The badge above covers the parts that need no Unreal install, run on a clean Linux machine with nothing preinstalled: build, typecheck, tool/bridge parity, documentation guards, profile token budgets, strict-client protocol conformance, and the unit tests - on the oldest Node the README promises and on the current one. It also checks that --doctor and --print-config behave correctly with no editor running, since that is exactly when someone reaches for them.

It does not run live verification or the local-model benchmark. Those need a running editor, and one needs a GPU. Their results live in docs/LIVE_VERIFICATION.md and docs/LOCAL_MODEL_BENCHMARK.md, and they are run by hand against both engine versions. Claiming them in CI would make the badge mean less than it does.

The C++ plugin is not compiled in CI either, because Epic does not ship an engine that can be fetched there. npm run build:engines builds it against every configured engine locally and reports success only if every one of them actually built.

Contributing

Issues and PRs welcome. This project is young and moving fast, so check the status docs above before assuming something works end-to-end.

License

MIT. See LICENSE.

将 Unreal Engine MCP MCP 与多个 AI 模型配合使用

TypingMind 在工作区级别连接 MCP 工具,因此连接 Unreal Engine MCP 后,您就可以在 TypingMind 中搭配不同的 AI 模型使用,无需为每个模型单独设置。 此 MCP 通过您设备上的 TypingMind MCP 连接器在本地运行。

本地连接器设置指南

如果 MCP 服务器需要访问您电脑上的本地文件、应用或私有资源,请选择此方式。

1

打开 MCP 设置

在 TypingMind 中,依次前往“设置”、“高级设置”和“模型上下文协议”,然后选择“设置连接器”。

  1. 在您的浏览器中打开 TypingMind。
  2. 点击“设置”图标。
  3. 进入“高级设置”。
  4. 打开“模型上下文协议”部分。
  5. 点击“设置连接器”,然后选择“此设备”。
TypingMind MCP 连接器设置界面,已选择“此设备”
2

运行连接器命令

选择“此设备”,从 TypingMind 复制命令并在终端中运行。使用 MCP 时,请保持该进程运行。

  1. 复制 TypingMind 显示的设置命令。
  2. 在 macOS 上打开“终端”,或在 Windows 上打开 Windows Terminal。
  3. 粘贴并运行命令。
  4. 如果终端询问您是否继续,请确认安装软件包。
  5. 使用 MCP 工具时,请勿关闭终端窗口或停止其中的连接器进程。
3

将 Unreal Engine MCP 添加为服务器

当连接器状态为“就绪”时,点击“编辑服务器”,然后粘贴 MCP 服务器配置。

  1. 等待连接器状态显示为“就绪”。
  2. 点击“编辑服务器”。
  3. 粘贴 Unreal Engine MCP MCP 服务器配置。
  4. 保存服务器列表。
  5. 如需确认连接器是否仍处于就绪状态,请刷新。
TypingMind MCP 设置界面,显示正在运行的服务器和“编辑服务器”按钮
{
  "mcpServers": {
    "ziggymar-unreal-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

在不同模型中使用同一连接

保存服务器列表,打开“插件”,启用 Unreal Engine MCP MCP 工具,然后在 TypingMind 中选择任意受支持的 AI 模型,即可在聊天中使用这些工具,或将其分配给智能体。

  1. 在 TypingMind 中打开“插件”页面。
  2. 启用 Unreal Engine MCP MCP 工具。
  3. 开始聊天并选择您想使用的 AI 模型。
  4. 在聊天中使用 MCP 工具,或将其分配给 AI 智能体。
  5. 根据需要随时切换到其他 AI 模型,无需重新连接 MCP。
在 TypingMind 聊天中使用已启用的 MCP 工具和选定的 AI 模型
您能使用 Unreal Engine MCP 帮我完成这项任务吗?
Unreal Engine MCP
当然,我看过了。
以下是我使用 Unreal Engine MCP 得到的结果。

常见问题

Unreal Engine MCP MCP 服务器有什么用途?

Unreal Engine MCP 是一个 MCP 服务器,可让兼容的 AI 客户端连接外部工具并获取上下文。在 TypingMind 中,只需添加一次此 MCP 服务器,即可在您的 AI 工作区中使用其工具。

可以在 TypingMind 中让多个 AI 模型使用 Unreal Engine MCP MCP 吗?

可以。TypingMind 在工作区层面连接 MCP 工具,因此您无需为每个模型单独配置 MCP 服务器,就能在 Claude、ChatGPT、Gemini 或您在 TypingMind 中配置的其他 AI 模型中使用 Unreal Engine MCP。

为什么在 TypingMind 中使用 Unreal Engine MCP MCP?

TypingMind 将多个 AI 模型、提示词、插件、AI 智能体、API 密钥和 MCP 工具整合到同一个工作区中,是最出色的大语言模型聊天前端之一。连接 Unreal Engine MCP 后,您可以在偏好的不同模型中使用其 MCP 工具,同时在 TypingMind 中井然有序地管理聊天工作流程。

如何将 Unreal Engine MCP MCP 连接到 TypingMind?

Unreal Engine MCP 通过 TypingMind 本地 MCP 连接器运行。当 MCP 服务器需要访问您计算机上的本地文件、桌面应用、命令行工具或私有资源时,这种方式最合适。

Unreal Engine MCP MCP 在 TypingMind 中提供哪些工具?

Unreal Engine MCP 提供 MCP 功能,您可以在 TypingMind 的插件页面启用这些功能,然后在聊天中使用,或将其分配给 AI 智能体。

使用 Unreal Engine MCP MCP 需要向 TypingMind 提供我的 API 密钥吗?

不需要。TypingMind 采用本地优先的设计,让您自行选择模型提供商,并自行管理 API 密钥、提示词和 MCP 配置。如果 Unreal Engine MCP 需要身份验证,请在创建连接时,为该 MCP 服务器添加所需的请求头、OAuth 设置或本地配置。

相关 MCP 服务器

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇