Unity Semantic Bridge (USB)

A Unity MCP Bridge built for agents working alongside you in a live Editor session — not just querying a static project. Token-efficient tools give your agent visibility into what changed in the scene while you were both working in it.
Note: Unity Semantic Bridge is optimized for projects that use uGUI and URP (Universal Render Pipeline). If your project uses UI Toolkit, HDRP or BiRP use the official Unity CLI instead
What's New
October 17, 2026: Tool cleanup
- Removed
notify_unity and set_play_mode. Use enter_play/exit_play, which wait for the transition to finish and survive domain reloads.
- Merged
get_gameobject_tree into get_scene_hierarchy. To walk a character's skeleton, pass the character as root_instance_id with prune_skinned=False and a deep depth. Rooted queries also now honour depth below the root; before, they returned only the root node.
- Merged
get_component_inspector_values into inspect_gameobject. Pass component to read one component's Inspector values, or omit it to read every component.
- Removed
get_urp_pipeline_settings. Its data is in get_project_settings(sections=["rendering"]).
- Removed
diagnose_lighting_issue and its LightingAgent subagent, so no tool needs an LLM API key any more. Agents run the diagnosis themselves: get_lights_affecting_object now describes the steps (lights in range, URP rendering path and light limits, renderer settings, screenshot).
- Merged
clear_console_logs into get_console_logs(clear=True), which clears after reading.
- Merged
get_physics_layers into get_project_settings(sections=["physics"]), which returns the collision matrix as JSON: each layer and the layers it collides with.
- Removed
get_component_code and get_project_tree. Agents grep and list files directly. The server instructions now say where Unity package sources live on disk, including Library/PackageCache/ for git and registry packages, which needs rg --no-ignore.
October 15, 2026: Multi-Editor support
- Several Unity Editors at once. Each project now has its own bridge ports (defaults 1073/1074), set in Tools > Unity Semantic Bridge and stored per user in
UserSettings/. Register the same MCP server once per project under different names (for example unity-semantic-bridge and unity-ap), each with matching --unity-port/--event-port, for example a game project on 1073/1074 and an asset-library project on 1075/1076. See several Unity projects at once.
- Several agent sessions on one Editor. Every MCP server attached to an Editor now receives its events, so
get_recent_unity_events works in each agent session, not only the first. See several agent sessions on one Editor.
- The listener's auto-start after domain reloads is now per Editor,
GET /health reports which project answers, and connection errors name the URL and ports to check.
- Background refreshes.
refresh_assets now completes in an Editor that is hidden or behind other windows: refresh, compile and domain reload finished in 11 seconds in a hidden Editor, which previously waited until you clicked back into Unity.
Showcase
Made with USB:
Battle Stations Next - 3D Modernization of a classic Facebook Flash game from 2008. Playable demo on Unity Play here
Nuclear Knights - Turn based tactics in a Wasteland like setting
Features
- Optimized scene heirarchy query and gameobject inspection tools with workflow hints for agents - more token efficient than official Unity CLI tool
- In Editor connection status and auto reconnect through domain reloads.
- Not tied to Unity Licensing - Runs 100% local. No need to reauthenticate when token expires
- Dedicated tools for agent to see human actions and changes
- Dedicated tools for working with Scriptable objects (error prone if agent uses bash to work SOs directly)
- Dedicated tools for uGUI. Makes uGUI accessible for agents to create a hierarchy, set layout properties, assign references, and inspect the result
- Bounded batch inspection and property edits with dry runs, expected-value checks, stale-reference protection, and grouped Undo
- Read-only prefab comparisons with component filtering and structured numeric values that preserve imported precision
- In Editor MCP log so you can see what tools are called
- Dedicated Lighting tools for URP projects
Prerequisites
- Unity 2022.3–6.3.
- Git on
PATH and uv for Python setup.
Installation
Install both the Unity package and the Python MCP server:
-
In Unity, open Window > Package Manager > + > Add package from Git URL
and paste:
https://github.com/Programalyst/unity-semantic-bridge.git?path=/com.gamenami.unity-semantic-bridge
-
Clone the matching Python server and install its dependencies:
git clone https://github.com/Programalyst/unity-semantic-bridge.git
uv --directory unity-semantic-bridge/mcp-editor-bridge sync --locked
-
Register the server with your MCP client. For Codex, replace the path below
with your clone's absolute path:
codex mcp add unity-semantic-bridge -- uv --directory "/absolute/path/to/unity-semantic-bridge/mcp-editor-bridge" run main.py
Other client configurations.
-
In Unity, open Tools > Unity Semantic Bridge > Start HTTP Listener, then
start or reconnect your MCP client. The client launches Python over stdio;
Python connects to Unity on port 1073 by default. To run the bridge in several
Editors at once, give each project its own ports; see
several Unity projects at once.
Commit both Packages/manifest.json and Packages/packages-lock.json to share
the installation. Keep your MCP client's local clone path out of shared settings.
For upgrades, local-to-Git migration, or bridge development using Add package
from disk, see the installation reference. Do not commit
personal absolute package paths.
Available Tools
Human-Agent Cowork
get_recent_unity_events — Returns Unity Editor events (hierarchy/selection/play-mode/console/objectChanged via ObjectChangeEvents.changesPublished) pushed since a time window — use to see human edits, add_component/remove_component/set_field_values etc.
Project & Settings
get_project_settings — Returns Unity Project Settings as JSON. Selectively fetch core (Unity version, build target), rendering (URP asset, color space, MSAA), input (Input Handling, inputactions assets), ui (uGUI vs UI Toolkit counts), scripting (API level, define symbols, backend), tags_layers, physics (layer collision matrix). The editor_prefs section reports the current Interaction Mode, stored idle time, and restore availability; these are user-level Editor preferences.
Scene & GameObject Inspection
get_scene_hierarchy — Returns the scene as a list of GameObjects with paths and instance IDs. Usually the first tool to call. Supports depth limiting, a node cap with truncation reporting (for large scenes), optional filtering to only main-camera-visible objects, and root_instance_id subtree queries. Objects with a SkinnedMeshRenderer are skipped by default; pass root_instance_id with prune_skinned=False and a deep depth to walk a character's rig.
inspect_gameobject — Serialized field values visible in the Inspector for every component on a GameObject, or only the one named by component (live Editor values via ComponentInspector; expands RigBuilder/Rig/*Constraint.m_Data/Transform.m_LocalRotation as structured quat+euler).
Batch Inspection & Property Edits
acquire_editor_references — Converts 1–64 live GameObject/component instance IDs into opaque references for semantic_batch. Verify the returned identities before editing; reacquire references after reloads, scene/Prefab Stage changes, deletion, or cache eviction. Asset IDs are rejected.
semantic_batch — Runs 1–64 ordered operations with unique IDs: either all inspect or all set_fields. Inspections return structured properties or component identities and continue after individual errors. Edits support dry_run, exact expected-value preconditions, whole-request preflight, execution-time revalidation, and one named Undo group within one editable scene/Prefab Stage (Auto Save off). Execution stops on the first failure and reports skipped operations; partial application is possible and Undo grouping is not atomic. Optional limits bound work and response size with explicit truncation. No implicit saves or automatic mutation retries.
- Usage, limits, failure semantics, and measured request savings.