1.3 KiB
1.3 KiB
Unity MCP Bridge
The project now has a local Unity Editor bridge plus a Node MCP server.
Flow
Codex MCP tool
-> tools/unity-mcp-server/index.mjs
-> http://127.0.0.1:19744
-> Assets/Editor/UnityCodexBridgeServer.cs
-> Unity Editor scene, logs, and camera capture
The Unity bridge binds only to 127.0.0.1.
Unity menu
Tools > Codex Bridge > Start Server
Tools > Codex Bridge > Stop Server
Tools > Codex Bridge > Auto Start
Tools > Codex Bridge > Capture Game View
Auto Start is enabled by default.
MCP setup
Install Node dependencies:
cd tools\unity-mcp-server
npm install
Add this to Codex MCP config and restart Codex/VS Code:
[mcp_servers.vrbeats_unity]
command = "node"
args = ["C:\\Users\\User-40\\Desktop\\unity\\work\\BeatSabar\\VRBeatSaber\\tools\\unity-mcp-server\\index.mjs"]
startup_timeout_sec = 30
[mcp_servers.vrbeats_unity.env]
UNITY_BRIDGE_URL = "http://127.0.0.1:19744"
Useful bridge URLs
These can be tested in a browser or with PowerShell while Unity is open:
http://127.0.0.1:19744/health
http://127.0.0.1:19744/logs?count=50
http://127.0.0.1:19744/scene/roots
http://127.0.0.1:19744/scene/objects?query=Canvas&limit=50
http://127.0.0.1:19744/capture?width=1280&height=720
Screenshots are saved to:
Captures/latest.png