DX12 Engine MCP Server
This MCP server lets AI agents query, edit, test, and build games in a running Uno Engine editor over a local TCP bridge.
Diagnose connection and discover tools (
dx12_ping,dx12_doctor,dx12_tool_search,dx12_tool_describe,dx12_call,dx12_guide).Inspect scenes/assets: list/find entities, scenes, assets, components, Lua API, mode, log, physics/animation/network state.
Edit entities/components: create/spawn/duplicate/delete, transform, parent, rename, select, focus camera, set PBR/color/textures.
Create and manage Lua components, set Lua properties, eval Lua, create/read shaders, assign mesh/sprite shaders.
Configure visuals: post-process, SSAO, scene settings, skybox/IBL.
Test gameplay: play/stop, simulate keys, step frames, raycast, overlap queries, animations, multiplayer host/client.
Capture screenshots and game-view renders for visual verification.
Validate scenes, build games, run batch operations, save/open/new scenes, undo/redo, manage prefabs.
From README: launch per-agent fleet engines, run long jobs (build/ctest/screenshots/bench), and declaratively generate scenes via SceneSpec.
Safety features: guarded operations, dry-run, idempotency keys, structured errors with auto-fix suggestions.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@DX12 Engine MCP Server create a new cube entity"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Uno Engine MCP server
起動中の Uno Engine エディタを Claude Code / Codex から
叩いてゲームを作るための MCP サーバ。エディタ(C++)が 127.0.0.1:8787 で待ち受ける TCP ブリッジに
改行区切り JSON で繋ぐ。ゲーム(封印ランタイム)ではブリッジは起動しない=外から触れない。
配布リポジトリ: https://github.com/ryuto-alt/dx12-mcp (エンジン本体には同梱されない)
ソース・オブ・トゥルース: エンジンリポジトリの
tools/mcp-server(publish.ps1で dx12-mcp へ同期)必要環境: Node.js v24+(
.tsを型ストリップで直接実行。tsc ビルド不要)、起動中の Uno Engine エディタ
インストール
git clone https://github.com/ryuto-alt/dx12-mcp "$env:USERPROFILE\dx12-mcp"
cd "$env:USERPROFILE\dx12-mcp"
./install.ps1 # Linux/macOS: ./install.shこれだけで Claude Code と Codex の両方に登録される(手で貼るコマンドは無い)。install スクリプトは
Node v24+ を確認 → npm install + 自己テスト(エンジン不要) → claude mcp add --scope user と
codex mcp add を実行する。CLI が入っていないクライアントの分だけ手順を表示する。
再実行しても壊れない(remove → add で冪等)。あとは Claude Code / Codex を再起動するだけ。
%USERPROFILE%\dx12-mcp に置くと、エディタの「MCP / AI Bridge」窓が自動検出して
セットアップコマンドをワンクリックでコピーできる。
--scope userで登録する。既定のlocalスコープはそのディレクトリでしか使えず、 エンジンは 1 台に 1 つなので project スコープも不適切。
Related MCP server: Unreal Engine MCP Server
接続(自動登録が使えないとき)
Claude Code
claude mcp add dx12-engine --scope user -- node "$env:USERPROFILE\dx12-mcp\index.ts"または .mcp.json(テンプレ: .mcp.json.example):
{
"mcpServers": {
"dx12-engine": {
"command": "node",
"args": ["C:\\Users\\<you>\\dx12-mcp\\index.ts"]
}
}
}注意: 既定では
envにDX12_MCP_PORTを書かないこと。書くとポート自動探索 (%TEMP%/dx12_mcp.port)が無効化される。ポートを固定したい時だけ書く。
Codex (~/.codex/config.toml)
[mcp_servers.dx12-engine]
command = "node"
args = ["C:\\Users\\<you>\\dx12-mcp\\index.ts"]まず使う: shell 5 本(常時ロード)
ツールは 220 本を超えるので、名前を推測せず shell 5 本で探して撃つ。旧 220 ツールは名前・引数・成功時の返り値とも従来のまま残っている。
ツール | 使いどころ |
| 最初に撃つ。接続・ポート・プロセス・版(マニフェストのハッシュ)・直近エラーを診断し、原因と直し方(起動は |
| 日本語/英語の自然文・旧ツール名で全ツール + エンジンの全 method を検索(決定論) |
| 引数(型・必須・enum・範囲)・副作用・例・次の一手・ |
| 任意のツール/method を送信前にスキーマ検証して実行。エンジンに後から足した method も再起動なしで呼べる |
| 目的別の最短手順・危険操作の注意・仮想入力の運用ルール( |
エラーは {error_code, error, cause, fix:[{tool,args}], didYouMean, validValues, retryable} の JSON で返り、fix[0] をそのまま dx12_call に渡して撃ち直せる。
詳細は docs/MCP.md §0。DX12_MCP_SURFACE=full|core|shell|legacy で見せ方を切り替える(既定 full = shell 5 + 旧 220。DX12_MCP_TOOLSET は旧名の互換)。
ツール面(surface): full / core / shell
面 |
| サイズ(実測) |
| shell 5 + 旧 220(共通の | 247 本 |
| shell 5 + フリート 2 + ジョブ 3 + Core 28(エディタ操作 2 を含む)+ | 40 本(上限) |
| shell 5 | 5 本 / 約 6.7 KB |
core を試す: MCP の登録に DX12_MCP_SURFACE=core を足す(登録し直す: claude mcp remove dx12-engine -s user → claude mcp add dx12-engine -s user -e DX12_MCP_SURFACE=core -- node <index.ts のパス>。または .mcp.json の "env": {"DX12_MCP_SURFACE": "core"})→ Claude Code を再起動。
戻すときは full(または env を消す)。core でも旧 220 名は dx12_call {name:"dx12_set_ssao", …} のように旧名・旧引数のまま呼べる。
Core = 一覧・取得・生成・変形・コンポーネント・削除・シーン開閉/保存・ルック/マテリアル/VFX・地形・Lua・UI・Play/Stop・品質ゲート・ログ・性能・撮影・描画設定(統合)・エディタ操作(dx12_editor_command / dx12_editor_state)・エディタ UI(仮想入力)。M7 で dx12_play_script と dx12_engine_list は長尾(dx12_call)へ移した。一覧と alias 表は docs/MCP.md §0-5。
guarded(git push・eval_lua・delete_asset・build_game 等)は core 面では dx12_call に confirm:true を付けても通らず、dx12_call_guarded(毎回ユーザー承認)から実行する。
動的登録: エンジンの method に McpMeta.expose="core" を付けると、MCP サーバが再起動なしで tools/list に足して notifications/tools/list_changed を送る(Claude Code が反映するかは未確認。dx12_tool_describe / dx12_call では常に使える。DX12_MCP_LIST_CHANGED=0 で止める)。
エンジンに method を足したら(最短手順)
src/core/mcp/ApplicationMcp*.cppにMcpDefine(...)を 1 本足す(推奨はMcpMeta付き。docs/MCP.md§12-1〜12-2)エンジンを再ビルド・再起動する(
tools/build.ps1)MCP サーバの再起動は不要。
dx12_tool_search→dx12_tool_describe→dx12_callで使える 3b. Core にも載せたければMcpMetaの.expose = "core"(1 行。tools/listに動的に足される)専用ツール名が要るときだけ
toolset/*.tsにreg(...)を足す(この場合は MCP サーバの再起動が要る)。searchHints.tsとeval/discovery_tasks.jsonも更新するnode scripts/gen_manifest_snapshot.mjs(エンジンを--backgroundで起動した状態で)でmanifest.snapshot.jsonを更新し、docs/MCP.mdを直し、publish.ps1で配布リポジトリへ(push は人が確認する)
TODO(設計書 M4): docs / README / guides / スナップショット更新 / publish 差分確認を 1 コマンドにする npm run finalize は未実装(現状は上の手順を手で行う)。
専用エンジン(フリート): エージェントごとに自分のエンジンを持つ
エンジンの TCP ブリッジは単一クライアントなので、複数のエージェント(Claude Code・Codex CLI の各セッション)が同じエンジンに繋ぐと奪い合いになる。最初に dx12_engine_launch で自分専用のエンジンを背景起動する(設計: docs/MCP_FLEET_DESIGN.md)。
ツール | 使いどころ |
| 専用エンジンを起動して既定に束縛する。ポート(8860〜8899 を自動割当)・exe コピー・データ領域・使い捨てプロジェクトが全部別。ビルドと衝突しない( |
| 一覧(全セッション分・台数・上限・空き VRAM/RAM。M7 で長尾へ。 |
| 手動起動/他人のエンジンを読み取り専用で見る(接続は 1.5 秒で閉じ、持ち主の枠を塞がない) |
| ビルド後に exe コピーを最新へ入れ替えて再起動( |
| 既定エンジンの切替(core 面では |
全体で最大 3 台・10 分操作が無ければ自動終了・空き VRAM 2 GB / RAM 3 GB 未満は起動を断る(理由と止める候補を構造化エラーで返す)。MCP サーバが終了しても(強制終了でも)エンジンは残らない。
窓を画面に出す mode:"visible" は既定で拒否(DX12_MCP_ALLOW_VISIBLE=1 と confirm:true の両方が要る)。人のカーソル・フォーカスは奪わない。
環境変数と仕組みは docs/MCP.md §0-7、使い方は dx12_guide {topic:"fleet"}。
長い処理のジョブ API(ビルド・テスト・撮影バッチ・cook)と副作用の安全性
2 分を超えうる処理は dx12_job_start {kind, args} で裏で走らせ、dx12_job_status {id, waitSec:30} で進捗を待つ(Claude Code の自動背景化はサブエージェントや claude -p に効かないため自前の非同期 API)。
kind = build(tools\build.ps1。全セッションで直列)/ ctest / ui_tests(既定で build_game を除外。背景起動)/ screenshot_batch(カメラ × DPI 倍率 × バリアント)/ bench / playtest / vg_cook / ue_import / external(承認が要る)。
状態は %LOCALAPPDATA%\UnoEngine\jobs\ に永続化され、MCP サーバを再起動しても process 型は走り続けて dx12_job_status で引ける。キャンセルはプロセスツリーごと(dx12_job_cancel)。長尾の dx12_job_list / dx12_job_result / dx12_job_logs は dx12_call で使う。
進捗は progressToken 付きで待つ間 notifications/progress も送る(Claude Code / Codex が受け取るかは未確認。主経路はポーリング)。仕様は docs/MCP.md §0-8、手順は dx12_guide {topic:"jobs"}。
副作用の安全性(M5): guarded な method(git_push / eval_lua / delete_asset / build_game など)はエンジン側にも最終ゲートがあり、1 回限りの確認トークン(guard_token → confirm_token)が無いと拒否される(TS は承認済みの経路の中でだけ自動で取って付ける。dx12_batch の op は承認済みにならず、全ての面で guarded を拒否)。
dx12_call {idempotency_key} は write 系全般で再送を安全にする(同じキーは前回の結果を返して再実行しない。省略しても 1:1 の write 系は自動採番し、タイムアウト時に同じキーで自動再送する)。dryRun:true はエンジンが対応する 18 method で「実際に何が起こるか」を返す。dx12_batch(atomic)は主トランザクションで、失敗するとシーンとファイル(.dx12/journal/)も戻る。後からは journal_list / journal_restore。エンジン側の仕様は docs/MCP.md §13。
Codex CLI(~/.codex/config.toml)/ Claude Code(ツール検索が無い/弱いクライアントには core 面を勧める。tools/list 40 本):
[mcp_servers.dx12-engine]
command = "node"
args = ["<REPO>/tools/mcp-server/index.ts"]
env = { DX12_MCP_SURFACE = "core" }claude mcp add dx12-engine -s user -e DX12_MCP_SURFACE=core -- node <REPO>/tools/mcp-server/index.ts宣言的シーン生成: 仕様 JSON で部屋・ステージ・街を作る(dx12_apply_scene_spec)
1 体ずつ create_entity を並べず、何を置きたいかを SceneSpec(JSON)で 1 回渡す。差分だけを 1 トランザクションで作り、自動検証し、失敗は**そのまま撃ち直せる差分(specPatch)**で返る。
dx12_apply_scene_spec {spec, mode:"plan"} # 何を作る/更新/削除するか(書き込みなし)
dx12_apply_scene_spec {spec} # 適用(1 トランザクション・Undo 1 回)→ 自動検証(配置・命名・到達性)
dx12_apply_scene_spec {specRef, patch} # 失敗の fix[0] をそのまま(specPatch = RFC 6902。仕様の全文は再送しない)
dx12_scene_spec_export {owned:true} # 現在のシーン → 仕様(往復で同じシーン)。長尾(dx12_call)単位はメートル。
place(右 2m・上に載せる・地面に足元を合わせる)は AABB の実測で決定論に解く。pattern(grid / ring / line / 壁に沿って / seed 付き散布)。collider:"static"で当たり判定。verifyで埋まり・重なり・命名・到達性を検査(落ちたら全体をロールバック)。同じ仕様を 2 回撃っても何も変わらない(冪等)。
name(またはid)をキーに差分適用。prune:true(この仕様が作った物のうち仕様から消えたものを削除)は guarded。書き方・例 5 本(FPS のアリーナ・部屋・散歩できる庭・ショーケース・ホラー廊下)・よくある失敗は
dx12_guide {topic:"scene_spec"}。詳細は docs/MCP.md §0-10。実装は
sceneSpec/(純ロジック:schema.ts検証・expand.ts相対配置・plan.ts差分計画・apply.ts適用・verify.ts検証と specPatch・export.ts書き出し・index.ts全体)。テストは偽エンジンsceneSim.tsでnpm test、実エンジンはnode scripts/sceneSpecReal.ts --port <専用インスタンス>(使い捨てプロジェクトで)。
構成
index.ts… MCP サーバの入口(stdio)。toolset/all.tsを読み込んで接続するだけ(220 ツールの定義は下記へ機械分割済み)toolset/… ツール定義。core.ts(サーバ・登録ラッパreg/regRaw・登録表)/shell.ts(shell 5 本の登録)/ カテゴリ別 30 モジュール(readeditspawnrenderterrainvfx…)。並び(=tools/listの順)はtoolset/all.tsの import 順shellRuntime.ts… shell 5 本の中身(検索・describe・call・dryRun・doctor・guide)。catalog.ts(ツール一覧の統合)/search.ts+searchHints.ts(検索と同義語辞書)/manifest.ts(エンジンのマニフェスト取得・スナップショット)/validate.ts(事前検証)/errors.ts+structure.ts(構造化エラー)/doctor.ts(自己診断)engineClient.ts… TCP フレーミング + id 相関の薄いクライアント(ポートは envDX12_MCP_PORT→%TEMP%/dx12_mcp.port→ 8787 の順で自動解決。別マシンはDX12_MCP_HOST)。接続失敗は 0.3/0.6/1.2 秒で再試行、タイムアウト後の応答は遅延結果として保持guides/*.md…dx12_guideの本文。eval/… 発見性の評価タスクとエラー再現ケース。manifest.snapshot.json… エンジン未接続時の代役。legacy-tools.snapshot.json… 旧 220 ツールの表面の固定mockEngine.ts… テスト用の偽エンジン(実エンジン不要)sceneTools.ts… 地形/スカルプト/診断の引数正規化と共通 zod 部品(純ロジック・エンジン非依存)materialApply.ts…dx12_material_applyの純ロジック(ファイル名からのテクスチャ用途推定、hasOverrideの罠の回避)paramGuard.ts… 未知の引数を黙って捨てず「近い正解」を返す共通部品 + 適用後の読み返し照合schemaDrift.ts…Application.cppと TS スキーマの食い違いを検出するパーサ(schemaDrift.test.tsが使う。ツール定義はtoolSource.ts経由で全モジュールを読む)lookCompare.ts… 3D の絵の測光(対数輝度ヒストグラム/CCT/彩度/黒潰れ)と参照画像との差分・示唆生成contactSheet.ts… カメラ経路の生成とコンタクトシート合成(連続フレーム差分つき)sceneWrite.ts… シーン JSON の検証・要約・書き出し先の解決(SceneSerializer.cppのスキーマと 1:1)test.ts… mock エンジンで framing/相関/エラーを検証(node test.ts)*.test.ts… 各純ロジックの回帰テスト。npm testで全部、npm run test:offlineでネット不要分のみ。shell/エラー系はshell.test.tsdiscovery.test.ts(recall@3)errors.test.ts(エラー再現 47 件・自己修復率)manifestRefresh.test.ts(再起動なしの追加)coreSurface.test.ts(core 面の stdio 一巡・動的登録・guarded)toolSurface.test.ts(legacy 面は M0 とバイト同一 / full 面は意味的に同一 / core・shell のサイズと lint / alias 網羅)coreSpec.ts… Core 面の仕様(Core の一覧と並び・説明テンプレ・統合ツールの振り分け表・alias 表・命名規約の動詞表。純データ)。toolset/coreTools.ts… 統合ツール 6 本の登録とマニフェストのexpose:"core"による動的昇格stdioClient.ts… テスト用の最小 MCP stdio クライアント(coreSurface.test.tsが使う)AGENTS.md… AI エージェント向け運用ガイド(典型ワークフロー・禁止パターン)
ツール(抜粋)
カテゴリ | 主なツール |
エンティティ |
|
コンポーネント |
|
見た目 |
|
Lua |
|
アニメーション |
|
マルチプレイヤー |
|
再生/検証 |
|
シーン編集強化 |
|
アセット操作 |
|
精密ピック |
|
地形 |
|
スカルプト |
|
ライティング |
|
描画の切り分け |
|
影 |
|
レイトレーシング |
|
診断 |
|
品質判断 |
|
(以下は旧ツールの抜粋。全量と検索は shell 5 本 / docs/MCP.md)
生成/削除/シーン読込/Play/Stop は遅延同期: エンジンはフレーム境界で実処理し、完了後に
本物の結果(entityId 等)を同期で返す。「name で list して探す」旧パターンは不要。
使い方
エディタ(
DX12Engine.exe)を起動してシーンを開く(ブリッジが 8787〜8797 で待ち受け)AI から
dx12_doctor(またはdx12_ping)→ 疎通確認dx12_create_entity/dx12_set_component/dx12_attach_lua_componentでシーンを組むdx12_play→dx12_screenshot_final/dx12_get_logで結果を確認
Available Tools
73 toolsdx12_attach_lua_componentLuaコンポーネントアタッチA
Lua コンポーネントをエンティティにアタッチする。エディタ上では貼るだけで、実際の初期化/実行は Play 時(OnStart/OnUpdate)。script は assets 相対(assets 配下限定)。即時反映で ok を返す。
Inputs: script (required), name, entity. Returns: result
dx12_batch一括実行A
複数のエンジン操作を順番に実行して往復を減らす。各 op は engine の method 名(dx12_ 接頭辞なし。例 create_entity)と params。結果は {results:[{index, ok, result?|error?, error_code?, skipped?}]}。stopOnError=true なら最初の失敗で打ち切り、残りは skipped 記録。各 op は同期結果なので確実(ただし1フレーム原子性は無い)。
Inputs: ops (required), stopOnError. Returns: result
dx12_build_gameゲームビルドADestructive
現在のプロジェクトをヘッドレスでビルドする(ツールバーの「ビルド」ボタンと同じ処理: exe+DLL+assets+shaders を出力フォルダへコピー)。{success, outputDir, error?}。出力先はビルド設定(エンジン設定窓)で指定した場所、未設定なら build/game。数十秒〜かかることがある(同期呼び出し)。
Inputs: no named parameters. Returns: result
dx12_create_entityエンティティ生成A
エンティティを生成する(エディタ専用)。フレーム境界で実処理されるが、Node が完了を待って【本物の {entityId, name, sceneGeneration} を同期で返す】({queued} は返らへん)。idempotency_key を付けると、再試行で同じキーが来ても二重生成されず同じ結果が返る。light_*/camera/particle_emitter/trigger は既定パラメータで生成される空エンティティ+コンポーネント(中身は dx12_describe_components 参照)。細かい値は生成後 dx12_set_component / dx12_set_transform で調整する。
Inputs: type (required), name, position, idempotency_key. Returns: result
dx12_create_lua_componentLuaコンポーネント作成A
Lua コンポーネント(.lua)を assets/components/ に作成する。書き込み前に構文検証され、エラーなら書かず error を返す。返り値 {path} を dx12_attach_lua_component の script に渡す。
Inputs: code (required), name (required). Returns: result
dx12_create_prefabプレハブ化A
エンティティ(+子孫)を .prefab として保存する(Hierarchy 右クリック「プレハブにする」と同じ処理)。path 省略時は assets/prefabs/<エンティティ名>.prefab に保存(重複時は連番)。{path, entityId}。entity(id) か name 指定。
Inputs: name, path, entity. Returns: result
dx12_create_shaderカスタムシェーダー作成A
カスタムシェーダー(.hlsl)を assets/shaders/ に作成/上書きする(MeshRenderer::shaderPath 割当用)。★Lua と違い書く前の静的検証はできない(DXC はファイルからしかコンパイルできない)ので、まず書き込んでから即コンパイルを試し、成否をそのまま返す(失敗しても書いたファイルは残る=直して dx12_create_shader を撃ち直す反復修正が前提)。エントリポイントは VSMain(vs_6_0)/PSMain(ps_6_0)固定、静的メッシュ用の共有 RootSignature(b0=PerObject mvp+model, b1=PerFrameの先頭部分, t0+s0=アルベド)に合わせて書く。返り値 {path, compiled, error?}。compiled=false なら error を読んで直し、再度このツールで書き戻す。エンティティへの割当は dx12_set_mesh_shader。
Inputs: code (required), name (required). Returns: result
dx12_delete_entity削除ADestructive
エンティティを子ごと削除する(Undo 可)。entity(id) か name 指定。フレーム境界で実処理され、Node が完了を待って【本物の {deletedEntityId, deletedCount, sceneGeneration} を同期で返す】。
Inputs: name, entity. Returns: result
dx12_describe_componentsコンポーネント辞書ARead-only
set_component する前にフィールドを知るための辞書。component 省略で全コンポーネント、指定でそれだけ。返り値 components:[{jsonKey, settable, removable, fields:[{name,type,default}], note?}]。dx12_set_component の data を組み立てる前に必ず参照すると確実。
Inputs: component. Returns: result
dx12_describe_lua_apiLua API 辞書ARead-only
Lua コンポーネントスクリプトから使えるバインディング一覧を binding ごと(entity/transform/Vec3/self/scene/input/camera/physics/audio/ui/fx/events/globals/prelude)に返す静的辞書。★重要: MCP で見えるコンポーネントと Lua から読める API は違う。entity から直接読めるデータは transform だけで、entity.boxCollider 等は nil(collider/rigidBody の値は physics:getVelocity(e) 等の別 API 経由)。Lua を書く前にこれで実際に読める API を確認すると取り違えを防げる。
Inputs: no named parameters. Returns: result
dx12_duplicate_entity複製A
エンティティを子ごとディープ複製する。entity(id) か name 指定。フレーム境界で実処理され、Node が完了を待って【本物の {entityId, name, sceneGeneration} を同期で返す】。
Inputs: name, entity. Returns: result
dx12_eval_luaLua即時実行A
任意の Lua コードをエンジンの Lua state でその場実行する(強力なデバッグ機能)。globals フォールバック環境なので scene/physics/camera/audio/events 等の既存グローバルバインディング(dx12_describe_lua_api 参照)がそのまま使える。例: local e = scene:findEntity("Player"); e.transform.position.y = e.transform.position.y + 1; return e.transform.position.y。code が値を return していれば result にその tostring() 文字列が入る(無ければ空文字)。★print() は捕捉されない — デバッグ出力は log(msg) を使うと dx12_get_log に出る。副作用のある操作(位置変更・物理力印加等)は Editor/Playing 両方で実行できるが、bodies は Play 中のみ登録されているため物理系は Playing 中でないと効果が無い。localhost 限定・認証なしという既存のセキュリティモデルと同水準。
Inputs: code (required). Returns: result
dx12_find_entity名前でエンティティ検索ARead-only
名前の完全一致でエンティティを1件探す。見つかれば {entityId, name}、無ければ null。
Inputs: name (required). Returns: result
dx12_focus_and_screenshot寄せて撮影AIdempotent
カメラを対象エンティティに寄せてから(1フレーム描画を挟んで)スクショを撮り、PNG 画像で返す。entity(id) か name 指定。配置や見た目を自分の目で確認するのに使う(エディタカメラ。Playing 中のゲーム画面は dx12_screenshot がアクティブなゲームカメラの絵を返す)。image ブロック + text(path/サイズ)を返す。
Inputs: name, entity.
dx12_focus_cameraカメラフォーカスAIdempotent
エディタのフライカメラを対象エンティティに寄せる。entity(id) か name 指定。{cameraPos, target, distance} を返す。撮影前に画角を合わせるのに使う(dx12_focus_and_screenshot もある)。
Inputs: name, entity. Returns: result
dx12_get_anim_stateアニメーション状態取得ARead-only
エンティティのスケルタルアニメーション情報を返す。{hasSkeletalAnimation, clips:[名前...]}。dx12_play_anim の clipName/clip を選ぶのに使う。entity(id) か name 指定。
Inputs: name, entity. Returns: result
dx12_get_entityエンティティ詳細ARead-only
エンティティの全コンポーネントと値を JSON で読む(編集前の状態確認に使う)。entity(id) か name(完全一致)で指定。返り値は entityId, componentTypes, luaReadable(Lua から entity. で直接読めるコンポーネント=現状 transform のみ), sceneGeneration と、各コンポーネントの jsonKey をキーにした値。
Inputs: name, entity. Returns: result
dx12_get_logログ取得ARead-only
エンジンログの末尾 N 行を配列で返す。エラーや print() の確認に使う。
Inputs: lines. Returns: result
dx12_get_lua_component_stateLuaプロパティ状態取得ARead-only
エンティティの LuaScript の現在のプロパティ値を全部返す(スキーマ基準なので未上書きの既定値も含む。get_entity は保存済みの上書きしか出さない)。{scriptPath, enabled, started, loadError, properties:[{name,type,value,isOverride}]}。dx12_set_lua_property で変える前の確認に。entity(id) か name 指定。
Inputs: name, entity. Returns: result
dx12_get_modeモード取得ARead-only
現在のエンジンモード(Editor / Playing)を返す。
Inputs: no named parameters. Returns: result
dx12_get_physics_state物理ランタイム状態取得ARead-only
エンティティの物理ランタイム状態(速度・接地判定)を読む。{entityId, hasRigidBody, velocity:[x,y,z], hasCharacterController, isGrounded}。★Playing 中のみ意味のある結果(Editor 中は velocity=[0,0,0]/isGrounded=false)。RigidBody が無ければ velocity は常に [0,0,0]。entity(id) か name 指定。
Inputs: name, entity. Returns: result
dx12_get_post_processポストプロセス設定取得ARead-only
現在のシーンのポストプロセス設定(約25エフェクトの on/off とパラメータ)を全て返す。フィールド名は dx12_set_post_process と同じ(例 exposureOn/exposure, bloomOn/bloom/bloomThreshold, tintOn/tint, outlineOn/outline/outlineColor 等)。変更前の確認に。
Inputs: no named parameters. Returns: result
dx12_get_scene_settingsシーン設定取得ARead-only
シーンのスカイボックス/IBL 設定を返す。{skybox:{envMapPath,iblIntensity,skyboxIntensity,drawSkybox}, note}。dx12_set_scene_settings で変える前の確認に使う。
Inputs: no named parameters. Returns: result
dx12_get_ssaoSSAO設定取得ARead-only
現在のシーンの SSAO(スクリーンスペース環境遮蔽)設定を返す。{enabled, radius, bias, intensity, power, sampleCount, blur}。★正射カメラ(俯瞰パズル等)では SSAO は自動無効化される(エンジン側の既知の制約)。
Inputs: no named parameters. Returns: result
dx12_key_downキー押下(保持)A
キーを押した状態にする(key_up を呼ぶまで保持)。次フレーム以降の Lua input:isKeyDown / keyDown() が true になる。横移動など「押しっぱなし」の挙動確認に。key は VK 整数 or 名前("W","D","SPACE","UP" 等)。Playing 中に使う(isAsyncKeyDown 系には効かない)。
Inputs: key (required). Returns: result
dx12_key_pressキータップ(1フレーム)A
キーを1フレームだけ押して離す(isKeyPressed / keyPressed() が1回立つ)。ジャンプ(SPACE)などのタップ操作の確認に。key は VK 整数 or 名前。押しっぱなしにはならない。
Inputs: key (required). Returns: result
dx12_key_upキー離すA
dx12_key_down で押したキーを離す。key は VK 整数 or 名前。
Inputs: key (required). Returns: result
dx12_list_assetsアセット一覧ARead-only
assets 配下のアセット一覧 [{path, type, name}] を返す。type で種別フィルタ(省略で全種別)。spawn_model / spawn_prefab / attach の path 探索に使う。
Inputs: type. Returns: result
dx12_list_entitiesエンティティ一覧ARead-only
今開いてるシーンのエンティティ一覧(entityId, name)を返す。verbose で componentTypes も付く。name_prefix / component_type で絞り込み可。{entities, count, sceneGeneration} が返る。
Inputs: verbose, name_prefix, component_type. Returns: result
dx12_list_scenesシーン一覧ARead-only
assets/scenes 配下のシーン(.json)一覧 [{path, name}] を返す。dx12_open_scene の path を選ぶのに使う。
Inputs: no named parameters. Returns: result
dx12_net_launch_test_clientテストクライアント起動A
ホスト中に、同じエンジンをもう1プロセス起動して 127.0.0.1 へ自動接続させる(ツールバーの「テストクライアント起動」ボタンと同じ)。マルチプレイの複製・補間・RPC を1台で動作確認するのに使う。★ホストとして Playing 中でないとエラー(net_setup role=host → play が先)。フレーム境界で起動されるので、直後に dx12_step_frames(60) を挟んでから dx12_net_status で players を確認するとよい。
Inputs: no named parameters. Returns: result
dx12_net_setupネットワークテストロール設定AIdempotent
次の dx12_play で自動 Host/Join するロールを設定する(ツールバーの Play ロールドロップダウンと同じ)。典型フロー: ①複製したいエンティティに set_component で networkIdentity + networkTransform を付ける → ②net_setup(role='host') → ③dx12_play → ④dx12_net_launch_test_client → ⑤dx12_net_status で players/RTT を確認。role='offline' で解除。
Inputs: role (required), port, address. Returns: result
dx12_net_statusネットワーク状態取得ARead-only
マルチプレイヤーの現在状態を返す。{available, role(Offline/Host/Client), isConnected, localClientId, tick, syncedEntityCount, players:[{id, rttMs, bytesSent, bytesReceived}], config:{tickRate, snapshotRate, maxPlayers, defaultPort}, testRole, testJoinAddress}。接続確認・RTT/帯域の観測・複製エンティティ数の検証に。
Inputs: no named parameters. Returns: result
dx12_new_scene新規シーンADestructive
新規シーンを作る(現在のシーンを破棄)。savePath を渡すとそのパスに紐づけて作る。フレーム境界で実処理され {applied} を同期で返す。現在の編集内容は失われるので注意。
Inputs: savePath. Returns: result
dx12_open_sceneシーンを開くA
シーンを開く(現在のシーンを置換)。path は assets 相対。重い遷移をフレーム境界で実処理し、Node が完了を待って【本物の {sceneName, path, entityCount, sceneGeneration} を同期で返す】。開いた後は古い entityId は無効になる(sceneGeneration が変わる)ので list し直すこと。
Inputs: path (required). Returns: result
dx12_overlap_boxボックス範囲の物理クエリARead-only
center を中心とする AABB(半幅 halfExtents)と重なっている物理ボディのエンティティを列挙する。★Playing 中のみ意味のある結果。{entities:[{entityId,name}], count}。dx12_query_entities の box(Transform.position ベースの単純判定)とは違い、実際のコライダー形状で判定する。
Inputs: center (required), halfExtents (required), maxResults. Returns: result
dx12_overlap_sphere球範囲の物理クエリARead-only
center を中心とする半径 radius の球と重なっている物理ボディのエンティティを列挙する。★Playing 中のみ意味のある結果。{entities:[{entityId,name}], count}。爆発範囲・索敵範囲・トリガー代替の確認に。
Inputs: center (required), radius (required), maxResults. Returns: result
dx12_ping疎通確認ARead-only
エディタとの疎通確認。mode(Editor/Playing)・entityCount・sceneGeneration・currentScene・protocolVersion を返す。まず最初に叩いて生きてるか確認するのに使う。
Inputs: no named parameters. Returns: result
dx12_play再生開始A
Editor → Playing へ切り替える。フレーム境界で実処理され {mode:'Playing', sceneGeneration} を同期で返す。カメラ無し等で再生不可なら error(code=3 MODE_CONFLICT)。
Inputs: no named parameters. Returns: result
dx12_play_animアニメーション再生A
スケルタルアニメーションのクリップをクロスフェード再生する(Lua の playAnim/playAnimByName と同じ経路)。clipName(名前) か clip(index) で指定、blend はフェード秒(既定 0.3)。loop を渡すとループ設定も変更。クリップ一覧は dx12_get_anim_state で確認。★アニメーションの更新は Play 中に進む。entity(id) か name 指定。
Inputs: clip, loop, name, blend, +2 more. Returns: result
dx12_project_world_to_screenワールド→画面投影ARead-only
エンティティのワールド座標を、今シーンビューを描いているカメラで画面ピクセルへ投影する。{x, y, visible, depth, w, width, height, mode}。★Playing 中は m_camera=アクティブなゲームカメラなので「ゲーム画面で player が中央(x≈width/2, y≈height/2)か」「画面内(visible)か」を数値で検証できる(dx12_screenshot と同じカメラ)。w<=0 はカメラ背面。entity(id) か name 指定。
Inputs: name, entity. Returns: result
dx12_query_entitiesタグ/領域でエンティティ検索ARead-only
tag か box のどちらかで複数エンティティを探す(どちらか必須)。box は XZ 平面の矩形 [minX,minZ,maxX,maxZ]。{entities:[{entityId,name}], count} を返す。
Inputs: box, tag. Returns: result
dx12_raycastレイキャストARead-only
origin から direction 方向へ物理レイを飛ばし、最初にヒットしたボディを調べる。★Playing 中のみ意味のある結果(Editor 中は body 未登録なので hit=false)。{hit, distance?, point?, normal?, entityId?, name?}。normal は現状 常に up 方向の近似値(エンジンの既知の制約)。当たり判定確認・地面/壁の検出・ラインオブサイトの確認に。
Inputs: origin (required), direction (required), maxDistance. Returns: result
dx12_read_lua_componentLuaコンポーネント読み取りARead-only
既存の .lua コンポーネントのソースをそのまま読む。dx12_create_lua_component は新規/上書き書き込み専用で読み取りが無かったため追加。既存スクリプトを確認してから修正版を dx12_create_lua_component で書き戻す、という編集ループに使う。{path, code}。
Inputs: path (required). Returns: result
dx12_read_shaderカスタムシェーダー読み取りARead-only
既存のカスタムシェーダー(.hlsl)のソースをそのまま読む。dx12_create_shader は新規/上書き書き込み専用で読み取りが無いため、既存シェーダーを確認してから修正版を書き戻す編集ループに使う。{path, code, compiled}(compiled は直近の既知のコンパイル成否)。
Inputs: path (required). Returns: result
dx12_redoRedoA
取り消した操作をやり直す。フレーム境界で適用され {queuedRedo} を返す。
Inputs: no named parameters. Returns: result
dx12_remove_componentコンポーネント除去AIdempotent
エンティティからコンポーネントを除去する。component は jsonKey。transform/name などコア不変のものは除去不可。即時反映で {entityId, removed} を返す。
Inputs: component (required), name, entity. Returns: result
dx12_rename_entityリネームAIdempotent
エンティティ名を変更する。重複名は連番(name_2 など)が付与され、確定した {name} を返す。
Inputs: name (required), entity (required). Returns: result
dx12_save_sceneシーン保存AIdempotent
現在のシーンを保存する。path は assets 相対(例 scenes/title.json)。省略時は現在開いてるシーンへ上書き。{path} を返す。
Inputs: path. Returns: result
dx12_screenshotスクリーンショットARead-only
今シーンビューに映ってる絵を PNG に書き出して画像で返す(+text に path/width/height)。AI が自分の操作結果(配置・見た目)を目で確認して直すのに使う。引数なし。★Playing 中はアクティブなゲームカメラの絵になる(=実際のゲーム画面)。Editor 中はエディタのフライカメラ。dx12_project_world_to_screen と同じカメラなので「player が画面中央/画面内か」を数値+絵の両方で確認できる。
Inputs: no named parameters.
dx12_screenshot_game_viewゲーム画面スクショARead-only
アクティブな CameraComponent(ゲームカメラ)視点でシーンを1フレーム描画して PNG で返す。★Editor 中でも Play せずにゲームカメラの見え方(画角・構図)を確認できる。アクティブなカメラが無いとエラー(camera.isActive=true にする)。image ブロック + text(path/サイズ/mode)を返す。
Inputs: no named parameters.
dx12_select_entity選択AIdempotent
エディタ上で対象エンティティを選択状態にする(Inspector 表示が切り替わる)。entity(id) か name 指定。{selected} を返す。
Inputs: name, entity. Returns: result
dx12_set_color基本色設定AIdempotent
メッシュの基本色(頂点色の乗算)を設定する。足場やコインの色付けに。color は r,g,b。entity(id) か name 指定。金属感は dx12_set_pbr の metallic/roughness と併用。
Inputs: color (required), name, entity. Returns: result
dx12_set_componentコンポーネント設定AIdempotent
コンポーネントを設定(無ければ追加・あれば置換)。component は jsonKey、data は dx12_describe_components の形。tags は data=文字列配列、DataComponent(data) は {key:{t,v}} オブジェクト。即時反映で {entityId, component} を返す。形が不安なら先に dx12_describe_components を見るとええ。
Inputs: data (required), component (required), name, entity. Returns: result
dx12_set_lua_propertyLuaプロパティ設定AIdempotent
LuaScript のプロパティを1つ書き換える(スクリプトの properties 宣言にあるものだけ)。type に応じて value は number/bool/string/[x,y,z]。Playing 中なら即再注入(スクリプト再ロード=OnStart 再実行)、Editor 中は保存だけで次 Play から反映。entity(id) か name 指定。型が不安なら先に dx12_get_lua_component_state で確認。
Inputs: key (required), name, value, entity. Returns: result
dx12_set_mesh_shaderカスタムシェーダー割当AIdempotent
エンティティの MeshRenderer::shaderPath を設定/解除する(Inspector の「Shader」欄と同じ操作)。dx12_create_shader で作った .hlsl の assets/shaders 相対パスを渡す。shaderPath 省略/空文字で既定 Forward に戻す。modelPath と違いメッシュ再ロードを伴わないため即時反映。★スキンドメッシュ(SkeletalAnimation 持ち)は既定 Forward へ自動フォールバックする(返り値 skinnedFallbackWarning で判定可)。★シェーダーのピクセルシェーダーで alpha を出しても、既定では不透明固定(BlendEnable=FALSE)でブレンドに使われない。半透明にしたい場合は alphaBlend:true も渡すこと(Inspector の「アルファブレンド有効」チェックボックスと同じ)。entity(id) か name 指定。
Inputs: name, entity, alphaBlend, shaderPath. Returns: result
dx12_set_parent親子設定AIdempotent
エンティティの親を設定する。parent 省略で親を解除。サイクルになる指定は拒否。即時反映で ok を返す。
Inputs: name, entity, parent. Returns: result
dx12_set_pbrPBR マテリアル設定AIdempotent
エンティティの PBR パラメータ(metallic/roughness/UV スケール)を設定する。指定分のみ更新。即時反映で {entityId, metallic, roughness, uvScaleU, uvScaleV} を返す。
Inputs: name, entity, metallic, uvScaleU, +2 more. Returns: result
dx12_set_post_processポストプロセス設定変更AIdempotent
ポストプロセスのフィールドを指定分だけ更新する(未指定フィールドは現状維持)。カラーグレーディング(exposure/contrast/brightness/saturation/warmth/hueShift/tint) / ブルーム・ビネット(bloom/bloomThreshold/vignette) / スタイライズ(chromatic/pixelSize/posterize/ditherLevels/scanline/sharpen/grain) / 色操作(invert/sepia/grayscale) / 歪み(lens/waveAmp・Freq・Speed/radial/glitch) / 輪郭(outline/outlineColor) / fxaaOn。各エフェクトは On(bool) で有効化しないと数値を変えても見た目に効かない。先に dx12_get_post_process で現状値を確認するとよい。
Inputs: lens, tint, bloom, grain, +50 more. Returns: result
dx12_set_scene_settingsシーン設定変更AIdempotent
シーンのスカイボックス/IBL を設定する。skybox 内の指定フィールドだけ適用。envMapPath を変えると {applied, envMapRebake} を返し再ベイクが走ることがある。
Inputs: skybox (required). Returns: result
dx12_set_sprite_shaderSprite2Dカスタムシェーダー割当AIdempotent
エンティティの Sprite2D::shaderPath を設定/解除する(Inspector の Sprite2D「Shader」欄と同じ操作)。world-space スプライトのみ対応(HUD不可)。dx12_create_shader で作った .hlsl の assets/shaders 相対パスを渡す。shaderPath 省略/空文字で既定 Sprite シェーダーに戻す。★MeshRendererのカスタムシェーダーとはルートシグネチャ/頂点フォーマットの契約が異なる(cbuffer b0 = float4x4 transform + float time、頂点は POSITION/TEXCOORD0/COLOR0/TEXCOORD1(effect)、詳細はdocs/AUTHORING.md)ため同じ.hlslは使い回せない。alphaBlend は Inspector の「アルファブレンド有効」と同じ。entity(id) か name 指定。
Inputs: name, entity, alphaBlend, shaderPath. Returns: result
dx12_set_ssaoSSAO設定変更AIdempotent
SSAO のフィールドを指定分だけ更新する(未指定は現状維持)。radius=ワールド空間半径, bias=自己遮蔽バイアス, intensity=遮蔽の強さ, power=コントラスト(pow指数), sampleCount=8か16, blur=4x4ボックスブラーの有無。
Inputs: bias, blur, power, radius, +3 more. Returns: result
dx12_set_textureテクスチャ上書き割当AIdempotent
エンティティの MeshRenderer にテクスチャを割り当てる(Inspector のアセットブラウザ D&D と同じ操作)。Material はモデル共有なので直接触らず、インスタンス単位の override に書く=他のインスタンスに波及しない。slot は albedo(既定)/normal/metalRoughness、submesh はサブメッシュ index(既定 0)。path 空文字で解除(Material 既定に戻る)。即時反映。entity(id) か name 指定。スプライトのテクスチャは set_component(sprite2d, {texturePath}) の方。
Inputs: path (required), name, slot, entity, +1 more. Returns: result
dx12_set_transformTransform 設定AIdempotent
エンティティの Transform を設定する。指定したフィールドだけ更新。回転は rotation(Euler 度) か quaternion([x,y,z,w]) のどちらか。即時反映で ok を返す。
Inputs: name, scale, entity, position, +2 more. Returns: result
dx12_spawn_boxボックス生成(整形込み)A
ボックス(立方体)を1コールで生成。足場/壁/床に最適。position/scale/rotation/color/metallic/roughness をまとめて指定でき、内部で create_entity→set_transform→set_pbr→set_color を順に実行する。{entityId, name, sceneGeneration} を返す。
Inputs: name, color, scale, metallic, +3 more. Returns: result
dx12_spawn_coinコイン生成A
コイン風の収集アイテムを1コールで生成(金色の薄い円盤状スフィア + tag 'coin' + 金属光沢)。足場ゲームの収集物置きに。position/name 指定可。回転やスコア加算は別途 Lua/trigger で付ける。{entityId, name, sceneGeneration} を返す。
Inputs: name, position. Returns: result
dx12_spawn_modelモデル生成A
モデル(.gltf/.glb/.fbx/.obj)を assets 相対パスから生成する。GPU ロードを伴いフレーム境界で実処理されるが、Node が完了を待って【本物の {entityId, name, sceneGeneration} を同期で返す】。idempotency_key で再試行の二重生成を防げる。
Inputs: path (required), name, position, idempotency_key. Returns: result
dx12_spawn_prefabプレハブ生成A
プレハブ(.prefab)を assets 相対パスから生成する。フレーム境界で実処理され、Node が完了を待って【本物の {entityId, rootEntityId, entityIds:[...], name, sceneGeneration} を同期で返す】。
Inputs: path (required), name, position. Returns: result
dx12_spawn_sphereスフィア生成(整形込み)A
スフィア(球)を1コールで生成。position/scale/rotation/color/metallic/roughness をまとめて指定可。{entityId, name, sceneGeneration} を返す。
Inputs: name, color, scale, metallic, +3 more. Returns: result
dx12_step_framesNフレーム進めるA
N フレーム経過してから応答する同期バリア。key_down/key_press の後に呼ぶと、入力がシミュレーションに効いてから dx12_get_entity / dx12_project_world_to_screen / dx12_screenshot で結果を観測できる。例: key_down('D') → step_frames(30) → get_entity(name:'Player') で右に動いたか確認 → key_up('D')。frames は 1..600(~10s)。※決定論ステッパではない(各フレーム dt は実時間)。
Inputs: frames. Returns: result
dx12_stop再生停止A
Playing → Editor へ切り替える(再生前のスナップショットに復元)。フレーム境界で実処理され {mode:'Editor', sceneGeneration} を同期で返す。★Stop ではシーンを丸ごと作り直すため全 entity id が変わる(sceneGeneration も +1)。Stop 後は古い id を使わず、返ってきた sceneGeneration の変化を見て dx12_list_entities で取り直すか、各ツールに name 指定で操作する。
Inputs: no named parameters. Returns: result
dx12_undoUndoA
直前の編集操作を取り消す。フレーム境界で適用され {queuedUndo} を返す(取り消し自体は次フレームで反映)。
Inputs: no named parameters. Returns: result
dx12_validate_sceneシーン検証ARead-only
シーン JSON の参照グラフをヘッドレスで検証する(CLI --validate と同じロジックをエンジン自身の子プロセスとして実行)。スクリプトパス存在・entity参照プロパティ解決・Trigger の filter/action target 解決・LoadScene 等のシーンパス存在をチェック。path 省略時は現在開いているシーン。{pass, exitCode, report, scenePath}。report はテキストレポート全文(PASS/FAIL・[info]/[warn]/[ERROR] 行)。編集→検証→修正のループに使う。子プロセスとして起動する(GPU初期化前に終了するので実行中のエディタと並行しても安全)。
Inputs: path. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 73 tools
Each tool has a clearly distinct purpose, even within high-level categories like spawning or screenshots. The descriptions and naming make it easy to tell tools apart.
All 73 tools follow a consistent `dx12_verb_noun` snake_case pattern, with no deviations or mixed conventions.
73 tools is far beyond the typical 3-15 well-scoped range. While individually justified, this extreme count overwhelms the tool surface and makes selection difficult for agents.
The toolset covers the full lifecycle of engine operations: CRUD for entities/components, scenes, assets, physics, networking, Lua scripting, shaders, simulation control, and debugging. No obvious gaps in domain coverage.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to control Unreal E…
Control Unreal Engine to browse assets, import content, and manage levels and sequences. Automate…
Make games with AI: one MCP server that connects your agent to Unity, Unreal and Godot editors.
AI video editor your agent can drive: plan scenes, edit a multi-track timeline, and render MP4s.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables real-time control of Unity Editor through natural language commands, allowing AI to manipulate game objects, run automated tests, manage scenes, and perform batch operations with undo support.22 npm4MIT
- AlicenseDqualityBmaintenanceEnables AI assistants to control Unreal Engine via Remote Control API for game development automation, including asset management, actor control, level editing, animation, physics, visual effects, and cinematics creation through natural language.11,217 npm1,026MIT

Funplay MCP for Unrealofficial
AlicenseNot gradedqualityCmaintenanceEnables AI assistants to directly control and interact with the Unreal Editor through natural language, allowing tasks such as spawning actors, building levels, creating materials, and running Python scripts.8MIT- AlicenseBqualityCmaintenanceEnables AI agents to control Unreal Engine 5 through natural language commands, using the Model Context Protocol and Remote Control API to build levels, change assets, and trigger blueprints.72MIT