Unity AI Bridge
Remote-control the Unity Editor from any AI IDE — no ports, no dependencies, just works.
接入你的智能体
从发布者处安装。不是 PlugMCP 端点。
远程 URL 还是本机命令? 两种安装方式的区别
Most AI coding assistants can read and write files, but they are blind to the Unity Editor — they can't inspect your scene, tweak materials, run tests, or profile performance. Unity AI Bridge gives AI full editor access.
[BridgeTool] attribute. Auto-discovered, auto-serialized, auto-documented. No registration code needed.Unity 6.2 introduced an official AI Gateway with MCP support. Both projects share the same goal — giving AI agents editor access via MCP — but differ in important ways:
In practice, the ~100ms file-polling latency is imperceptible because AI agent think-time dominates each round trip. File IPC also makes cross-process debugging trivial — just inspect the JSON files on disk.
AI-native project — Copy the prompt below and send it to your AI coding assistant. The setup guide is written for AI to follow — you don't need to run any commands yourself.
Help me install Unity AI Bridge by following this guide: https://github.com/butterlatte-zhang/unity-ai-bridge/blob/main/docs/SETUP.md
If you prefer manual setup:
Unity Package — In Unity: Window > Package Manager > + > Add package from git URL:
https://github.com/butterlatte-zhang/unity-ai-bridge.git?path=Packages/com.aibridge.unity
Or manually copy Packages/com.aibridge.unity from this repo into your project's Packages/ directory.
IDE Integration — Copy .claude/ to your project root, then configure your IDE per docs/SETUP.md.
Supports: Claude Code (Skill mode), Cursor, GitHub Copilot, Windsurf, Claude Desktop (MCP mode).
65 tools organized into 15 categories:
┌──────────────────────────────────────────────────┐
│ AI IDE │
│ (Claude Code / Cursor / Copilot / Windsurf) │
└──────────┬────────────────────┬──────────────────┘
│ │
Skill mode MCP mode
│ │
▼ ▼
┌─────────────┐ ┌──────────────┐
│ bridge.py │ │ mcp_server.py│
│ (Python) │ │ (Python) │
└──────┬──────┘ └──────┬───────┘
│ │
└────────┬─────────┘
│
File-based IPC
(request / response)
│
▼
┌───────────────────────────────┐
│ Unity Editor Plugin │
│ (com.aibridge.unity) │
│ │
│ BridgePlugin ← polls files │
│ BridgeToolRegistry │
│ BridgeToolRunner │
│ [BridgeTool] methods │
└───────────────────────────────┘
Dual-channel design: The same Unity plugin serves both Skill mode (direct CLI) and MCP mode (protocol server). Both channels communicate through the same file-based IPC — a pair of request/response files on disk. No network sockets, no port conflicts, no firewall rules.
Why file IPC? Unity's main thread is single-threaded and blocks during domain reload. File polling is the most reliable way to survive recompilation, play-mode transitions, and Editor restarts without losing messages.
Most Unity AI tools stop at file editing. Unity AI Bridge goes further — it turns Claude Code (or any AI IDE) into a game testing harness.
AI writes code → compiles → enters Play Mode → observes state → judges → fixes → repeats
↑ │
└─────────────────── fully automated loop ────────────────────────────────┘
The pattern: Act → Wait → Observe → Judge → Repeat
runtime-invoke calls static methods to trigger game actionswait_playmode.py / wait_compile.py handle timingruntime-query reads MonoBehaviour fields + screenshot-capture for visualsExpose any static method to AI with a single attribute:
using UnityAiBridge;
[BridgeToolType]
public static partial class CustomTools
{
[BridgeTool("custom-greet")]
[System.ComponentModel.Description("Say hello")]
public static string Greet(string name = "World")
{
return $"Hello, {name}!";
}
}
The bridge discovers tools at Editor startup via reflection. No registration code, no config files. Parameters are automatically mapped to JSON Schema for the AI to call.
Unity AI Bridge runs entirely on your local machine. The file IPC channel is scoped to your user's temp directory, and no network listeners are opened.
See SECURITY.md for details.
Platforms: Windows, macOS
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
main branch[BridgeTool] pattern aboveUnity AI Bridge is derived from Unity-MCP by Ivan Murzak (Apache License 2.0). See THIRD_PARTY_NOTICES.md for details.
Remote-control Unity Editor from any AI IDE via file-based IPC. 62 tools, zero dependencies.
工具
暂无工具列表。远程服务器在首次健康检查后会获得工具列表。
常见问题
在本页复制适用于 Cursor、Claude Desktop、Claude Code 或 VS Code 的 stdio 配置。它使用发布者的安装方式,而不是 PlugMCP 代理。
此记录未列出必需的环境变量。
Unity AI Bridge 通过 stdio 在本地运行。
上次检查时间:2026-11-09。 Remote-control Unity Editor from any AI IDE via file-based IPC. 62 tools, zero dependencies.