PluginBench
MCP Server
Maintained
Apache-2.0

Unity AI Bridge MCP Server

io.github.butterlatte-zhang/unity-ai-bridge

Remote-control Unity Editor from any AI IDE via file-based IPC with 65 tools, zero dependencies.

What is the Unity AI Bridge MCP server?

Unity AI Bridge is an MCP server that gives AI coding assistants full remote access to the Unity Editor through file-based inter-process communication. It exposes 65 tools across 15 categories—Scene, GameObject, Assets, Prefab, Script, Profiler, and more—enabling AI agents to inspect scenes, modify objects, run tests, and profile performance without network ports or external dependencies.

Unity AI Bridge bridges the gap between AI coding assistants and the Unity Editor. While most AI tools can only read and write files, this server lets Claude, Cursor, Copilot, and other IDEs directly control the editor, inspect game state at runtime, take screenshots, run playtests, and execute custom tools. It uses file-based IPC instead of network sockets, making it reliable across recompilation and editor restarts.

How to install Unity AI Bridge

Copy-paste configuration for popular MCP clients.

No machine-readable install method is published for this server in the registry. Check the repository or website for setup instructions.

Tools & capabilities

Tools this server exposes to the agent.

  • scene-open — Open a scene by path
  • scene-save — Save the current scene
  • scene-create — Create a new scene
  • scene-list-opened — List all opened scenes
  • scene-get-data — Get scene data
  • scene-set-active — Set active scene
  • scene-unload — Unload a scene
  • gameobject-find — Find GameObjects by name or tag
  • gameobject-create — Create a new GameObject
  • gameobject-destroy — Destroy a GameObject
  • gameobject-modify — Modify GameObject properties
  • gameobject-duplicate — Duplicate a GameObject
  • gameobject-set-parent — Set parent of a GameObject
  • gameobject-component-add — Add a component to a GameObject
  • gameobject-component-destroy — Remove a component from a GameObject
  • gameobject-component-get — Get component data
  • gameobject-component-list-all — List all components on a GameObject
  • gameobject-component-modify — Modify component properties
  • assets-find — Find assets by name or type
  • assets-find-built-in — Find built-in assets

Use cases

  • Automate game testing: write AI-driven playtests that enter Play Mode, trigger actions, observe state, and verify behavior in closed loops
  • Inspect and modify scenes programmatically: find GameObjects, adjust components, materials, and prefabs without manual editor interaction
  • Profile and optimize performance: capture profiler snapshots, analyze hotpaths, and track garbage collection from your AI assistant
  • Generate and manage assets: create materials, shaders, prefabs, and folders; search and organize your asset database
  • Debug compilation and runtime errors: read console logs, execute scripts, and query runtime state to validate changes before committing

Unity AI Bridge MCP server FAQ

What is Unity AI Bridge?

Unity AI Bridge is an MCP server that lets AI coding assistants (Claude, Cursor, Copilot, etc.) remotely control the Unity Editor. It exposes 65 tools for scene management, GameObject manipulation, asset handling, profiling, testing, and more—all via file-based IPC with zero external dependencies.

Is it free?

Yes. Unity AI Bridge is open-source under the Apache License 2.0.

How do I install it in Cursor or Claude?

Install the Unity package via Package Manager (git URL: https://github.com/butterlatte-zhang/unity-ai-bridge.git?path=Packages/com.aibridge.unity), copy the `.claude/` folder to your project root, then configure your IDE per the setup guide at https://github.com/butterlatte-zhang/unity-ai-bridge/blob/main/docs/SETUP.md. The project includes AI-native setup instructions you can send directly to your assistant.

Does it require authentication or network setup?

No. Unity AI Bridge uses file-based IPC (polling) on your local machine, scoped to your user's temp directory. No ports, no firewalls, no network listeners—it just works.

What Unity versions does it support?

Unity 2022.3 LTS and later, including Unity 6. Supports Built-in, URP, and HDRP render pipelines on Windows and macOS.

Can I add custom tools?

Yes. Expose any static method with the `[BridgeTool]` attribute—no registration code needed. The bridge auto-discovers and auto-documents tools at Editor startup.

README (reference)

Source of truth, from the repository.

English | 中文

Unity AI Bridge

Remote-control the Unity Editor from any AI IDE — no ports, no dependencies, just works.

Unity 2022.3+ License: Apache 2.0 GitHub stars Release Glama

https://github.com/user-attachments/assets/4e8b3f85-b209-406f-a96e-f8b8eddc9160


Why Unity AI Bridge?

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.

Key Advantages

  • 65 tools, 15 categories — Scene, GameObject, Assets, Prefab, Script, Profiler, LightProbe, Screenshot, Runtime, Tests, and more. Covers the full editor workflow, not just file I/O.
  • File-based IPC, not WebSocket — No open ports, no firewall issues, no connection drops. Survives recompilation, play-mode transitions, and editor restarts gracefully.
  • Zero external dependencies — Pure Python stdlib CLI/MCP server, self-contained C# Unity package. No pip install, no npm, no Node.js runtime.
  • Every major AI IDE — Claude Code (Skill mode), Cursor, GitHub Copilot, Windsurf, Claude Desktop (MCP mode). One Unity plugin, all IDEs.
  • 5-line extensibility — Add custom tools with [BridgeTool] attribute. Auto-discovered, auto-serialized, auto-documented. No registration code needed.
  • Production-tested — Built for and battle-tested in a large-scale open-world Unity game (50+ developers, 2M+ lines of C#).

vs Unity 6 AI Gateway

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:

Unity AI BridgeUnity 6 AI Gateway
Unity version2022.3 LTS+6.2+ only
Tool coverage65 tools across 15 categoriesGeneral-purpose (Scene, Assets, Script, Console)
Deep toolingProfiler (snapshot, hotpath, stream), LightProbe, Reflection, Package ManagerNot yet available
IPC mechanismFile polling (~100ms)Unix Socket / Named Pipe
Extensibility[BridgeTool] attribute — 5 linesTBD

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.


Quick Start

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:

  1. 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.

  2. 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).


Tool Categories

65 tools organized into 15 categories:

CategoryCountTools
Scene7scene-open, scene-save, scene-create, scene-list-opened, scene-get-data, scene-set-active, scene-unload
GameObject11gameobject-find, gameobject-create, gameobject-destroy, gameobject-modify, gameobject-duplicate, gameobject-set-parent, gameobject-component-add, gameobject-component-destroy, gameobject-component-get, gameobject-component-list-all, gameobject-component-modify
Assets11assets-find, assets-find-built-in, assets-get-data, assets-modify, assets-move, assets-copy, assets-delete, assets-create-folder, assets-refresh, assets-material-create, assets-shader-list-all
Prefab5assets-prefab-create, assets-prefab-open, assets-prefab-save, assets-prefab-close, assets-prefab-instantiate
Script4script-read, script-update-or-create, script-delete, script-execute
Object2object-get-data, object-modify
Editor4editor-application-get-state, editor-application-set-state, editor-selection-get, editor-selection-set
Reflection2reflection-method-find, reflection-method-call
Screenshot1screenshot-capture
Runtime2runtime-query, runtime-invoke
Console1console-get-logs
Profiler5profiler-snapshot, profiler-stream, profiler-frame-hierarchy, profiler-hotpath, profiler-gc-alloc
Package4package-list, package-search, package-add, package-remove
Light Probe5lightprobe-generate-grid, lightprobe-analyze, lightprobe-bake, lightprobe-clear, lightprobe-configure-lights
Tests1tests-run

Architecture

┌──────────────────────────────────────────────────┐
│                   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.


Beyond Editing — AI as Game Tester

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.

CapabilityTraditional AIWith Unity AI Bridge
Write C# code:white_check_mark::white_check_mark:
Check compilation errors:x::white_check_mark: console-get-logs
Enter / exit Play Mode:x::white_check_mark: editor-application-set-state
Trigger game actions:x::white_check_mark: runtime-invoke
Read runtime game state:x::white_check_mark: runtime-query
Take screenshots:x::white_check_mark: screenshot-capture
Full closed loop: Write → Test → Fix → Repeat:x::white_check_mark:

AI Playtest Loop

AI writes code → compiles → enters Play Mode → observes state → judges → fixes → repeats
     ↑                                                                         │
     └─────────────────── fully automated loop ────────────────────────────────┘

The pattern: Act → Wait → Observe → Judge → Repeat

  • Act: runtime-invoke calls static methods to trigger game actions
  • Wait: wait_playmode.py / wait_compile.py handle timing
  • Observe: runtime-query reads MonoBehaviour fields + screenshot-capture for visuals
  • Judge: AI analyzes state/screenshots to decide PASS/FAIL

Auto-Playtest Example | AI Closed-Loop Guide | Playtest Tool Reference


Add Your Own Tools

Expose 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.


Security

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.


Compatibility

Unity VersionRender PipelineStatus
2022.3 LTS+Built-inSupported
2022.3 LTS+URPSupported
2022.3 LTS+HDRPSupported
6000.x (Unity 6)AllSupported

Platforms: Windows, macOS


Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

  • Report bugs and request features via GitHub Issues
  • Submit pull requests against the main branch
  • Add new tools by following the [BridgeTool] pattern above

Acknowledgments

Unity AI Bridge is derived from Unity-MCP by Ivan Murzak (Apache License 2.0). See THIRD_PARTY_NOTICES.md for details.

License

Apache License 2.0

Related MCP servers

Stdio MCP proxy: intercepts oversized tool results into a queryable embedded DuckDB.

1
TypeScript
MIT
View repository →
LElegacy2mcp logo

Turn a legacy SOAP/WSDL service into a safe, typed, schema-validated, audit-logged MCP server

3
Python
Apache-2.0
View repository →

Protocol- & auth-agnostic API connector: SOAP/REST behind any auth, config-driven. Lib/API/MCP.

0
Python
Apache-2.0
View repository →

SSH server management for AI agents with per-server read-only and allowlist security modes.

495
JavaScript
MIT
View repository →
IVivygrep logo

ivygrep

Active

Local code search and task context packs for coding agents

6
Rust
MIT
View repository →

AI-powered packet analysis with tshark—security audits, threat detection, and network deep-dives in plain English.

158
Python
MIT
View repository →