Unity Open MCP

Connect AI agents to Unity projects with a bridge + gate workflow: make changes, run validation, inspect results, and iterate safely.

A Model Context Protocol server and Unity bridge expose ~160 tools so an assistant can edit, validate, and inspect a Unity project from Cursor, Claude Desktop, OpenCode, ZCode, and other MCP clients.

GitHub

Features

Safe mutation workflow

Every mutating tool runs validation, checkpoints, deltas, reference scans, and regression checks before applying — with targeted fixes and impact previews.

Asset intelligence

Reserialize assets, read and search the structured asset tree, and analyze references across prefabs, scenes, and ScriptableObjects.

Live + batch + offline routing

Calls prefer the live Unity bridge, fall back to headless batch mode for supported tools, or use disk readers for offline operations.

Typed editor surface

~100 typed tools for scenes, GameObjects, components, materials, prefabs, packages, build settings, profiler, and project settings.

Compile-gated domain packs

Navigation, Input System, ProBuilder, Particle System, Animation, and Splines tools compile in only when their Unity package is present.

Session tool-group visibility

Activate only the tool groups you need per session to keep the prompt surface small; the server emits tools/list_changed when the set changes.

Always-on meta-tools

Session-level tools available in every session, independent of tool-group activation. They enumerate capabilities, rules, and live editor state.

unity_open_mcp_capabilities

List the available surfaces: tools, rules, and fixes. Filter by kind (tools/rules/fixes) and optionally include planned-but-unbuilt capabilities.

kind
"tools" | "rules" | "fixes"
Filter to a single surface. Omit to return all three together.
include_planned
boolean
Include planned (unimplemented) items. Default true.

unity_open_mcp_list_rules

Enumerate validation rules, optionally filtered by asset kind or file extension, omitting planned rules when requested.

asset_kind
string
Filter to rules that declare this asset kind (e.g. prefab, scene, material).
extension
string
Filter by file extension (e.g. .prefab). Case-insensitive.

unity_open_mcp_manage_tools

Activate or deactivate a tool group for this session (list_groups / activate / deactivate / reset). State is ephemeral and in-memory; resets to core-only on restart.

action
string
list_groups | activate | deactivate | reset.
group
string
Group id (required for activate/deactivate).
{ "action": "activate", "group": "navigation" }

unity_open_mcp_generate_skill

Generate a SKILL.md playbook for the connected client (cursor/claude/opencode/agents), previewing or writing it to disk.

unity_open_mcp_read_compile_errors

Read the tail of the Unity Editor.log to surface compiler errors and assembly-resolution failures as structured diagnostics.

unity_open_mcp_pull_events

Drain buffered console and editor-state events (SSE/poll feed) for live UIs and validation suites.

max_events
integer
Max events to return per call (1–1000).

Core, Gate & Verify

The engine room: reflection and live execution, plus the gate workflow that validates every mutation. Gate tools return issues and offer dry-runnable fixes.

unity_open_mcp_ping

Health-check the live Unity bridge; returns editor and bridge status.

unity_open_mcp_execute_csharp

Run an arbitrary C# snippet in the editor with injected Refs[] and return the serialized result graph.

code
string
C# source. Use return x; to produce output.

unity_open_mcp_invoke_method

Invoke a static or instance method by type and name, with JSON arguments and optional generic type parameters.

type_name
string
Fully qualified type name.
method_name
string
Method name.

unity_open_mcp_find_members

Search loaded assemblies for types/members/properties/methods by substring, with optional signature metadata.

query
string
Substring filter on type or member name.
kind
string
type | method | property | all.

unity_open_mcp_compile_check

Wait for compilation to settle and report whether it succeeded. Route-pinned to batch mode.

timeout_ms
integer
Max wait for compilation to settle.

unity_open_mcp_validate_edit

Run verify rules against the given asset paths (auto-selecting categories) and return issues with severities.

paths
string[]
Asset paths to validate.
detail
string
summary | normal | verbose.

unity_open_mcp_checkpoint_create

Snapshot a scope of paths (or whole project) for a later delta comparison.

paths
string[]
Scope; empty = whole-project summary.
label
string
Optional label.

unity_open_mcp_delta

Re-validate the scope of a checkpoint and report what changed since it was created.

checkpoint_id
string
Checkpoint id from checkpoint_create.

unity_open_mcp_find_references

Find assets referencing a target by asset path or GUID, grouped by kind/folder, with verbose field locations.

asset_path
string
Asset path (or use guid).

unity_open_mcp_scan_paths

Scan specific asset paths with selected verify rules; auto-selects categories from paths when omitted.

paths
string[]
Asset paths to scan.

unity_open_mcp_apply_fix

Apply (or dry-run) a fix action for an issue id — e.g. remove_missing_script or relink_broken_guid.

issue_id
string
Issue key from validate_edit or scan_paths.
dry_run
boolean
Preview without applying. Default true.

unity_open_mcp_scan_all

Run every verify rule across the whole project and return a JSON report (optionally written to disk).

fail_on_severity
string
error | warn | info | verbose | never.

unity_open_mcp_regression_check

Compare current scan results against a saved baseline and fail when issue counts exceed thresholds.

baseline_path
string
Path to a baseline JSON file.

Asset Intelligence

Structured reads and mutations on the asset database — no Unity play mode or scene edits required.

unity_open_mcp_reserialize

Round-trip reserialize explicit asset paths (.prefab/.unity/.asset/.mat/.controller/.anim); optionally include companion .meta files.

paths
string[]
Asset paths to reserialize.

unity_open_mcp_read_asset

Read a text-serialized YAML asset as a folded tree, with summary/normal/verbose detail and component/path drill-downs.

asset_path
string
Asset path (.prefab/.unity/.asset/.mat/.controller/.anim).

unity_open_mcp_search_assets

Search YAML assets by name, component, type, or GUID across a folder, returning matched files with optional per-file object listings.

name
string
Substring filter on file or GameObject name.
component
string
Substring filter on component/script name.

unity_open_mcp_list_assets

List assets under a folder, optionally filtered by asset kind, with per-folder sampling to control verbosity.

folder
string
Folder to list under (default Assets).
type
string
Comma-separated asset kinds (e.g. prefab,scene).

Typed editor surface

A representative slice of the ~100 typed tools across the editor — assets, materials, prefabs, GameObjects, components, scenes, packages, scripts, build, and project settings.

unity_open_mcp_assets_create_folder

Create one or more folders under an existing Assets/-rooted parent, with name validation.

parent_folder_path
string
Existing parent starting with Assets/.
new_folder_name
string
New folder name.

unity_open_mcp_material_set_property

Set a shader property (color/float/int/vector/texture) on a material asset or a renderer's shared material.

property
string
Shader property name.
type
string
color | float | int | vector | texture.
value
any
New value; shape depends on type.

unity_open_mcp_prefab_open

Open a prefab asset in the edit stage for isolated editing.

prefab_asset_path
string
Prefab asset path to open.

unity_open_mcp_gameobject_create

Create a GameObject (optionally a primitive) at a path with transform and parent options.

name
string
Name for the new GameObject.
primitive_type
string
Cube/Sphere/Capsule/Cylinder/Plane/Quad, or omit for empty.

unity_open_mcp_component_modify

Patch serialized fields on a component (resolved by host path/name/instance_id), including object references and enum-by-name.

type_name
string
Component type to modify.
fields
array
Serialized-property patches [{ path, value }].

unity_open_mcp_scene_open

Open a scene single or additive, with a scene-dirty guard to avoid losing unsaved changes.

path
string
Asset path of the scene (.unity).
mode
string
single | additive.

unity_open_mcp_package_add

Add a UPM package by id, version, Git URL, or local path/tarball; gate-validates against Packages/manifest.json.

package_id
string
Package specifier (id, id@ver, git URL, file: path).

unity_open_mcp_script_write

Write a .cs file with Roslyn pre-write validation; parse errors return validation_failed and the file is not written.

file_path
string
Project-relative .cs path.
content
string
Full C# source.

unity_open_mcp_profiler_start

Start the Unity Profiler and optionally open the Profiler window for live capture.

open_window
boolean
Also open the Profiler window. Default true.

unity_open_mcp_build_start

Start a player build. BuildPipeline.BuildPlayer is on the default deny list, so this requires gate: off + confirm_bypass.

scenes
string[]
Scene paths to include.
location_path_name
string
Output path.

unity_open_mcp_settings_set_player

Mutate Player settings; uses the restart_then_settle gate strategy because it may domain-reload.

fields
array
Player-settings field patches.

unity_open_mcp_selection_set

Set the editor selection from scene objects or disk assets, or clear it entirely.

targets
array
Multi-selection list of { instance_id | asset_path | path | name }.

Domain extension packs

Optional tool groups that compile in only when their Unity package is present. Gated by versionDefines on the asmdef plus per-domain defineConstraints (UNITY_OPEN_MCP_EXT_<DOMAIN>). Default OFF; activate per session via manage_tools.

group: navigation

Gated on com.unity.ai.navigation. Add/bake NavMesh surfaces, modifiers, modifier volumes, links, and agents; list and modify nav data.

tools
string
navigation_surface_bake, navigation_agent_set_destination, navigation_modify, … (11 tools).

group: input-system

Gated on com.unity.inputsystem. Build InputActionAssets, action maps, actions, bindings, composites, and control schemes.

tools
string
inputsystem_asset_create, inputsystem_action_add, inputsystem_binding_composite_add, … (7 tools).

group: probuilder

Gated on com.unity.probuilder. Create shapes, inspect mesh info, extrude, set face materials; probuilder_delete_faces is the lone destructive tool.

tools
string
probuilder_create_shape, probuilder_extrude, probuilder_set_face_material, … (5 tools).

group: particle-system

Gated on UnityEngine.ParticleSystemModule. Read and modify particle system modules.

tools
string
particle_system_get, particle_system_modify (2 tools).

group: animation

Gated on com.unity.modules.animation. Create and edit AnimationClips and AnimatorControllers, including keyframes, layers, states, and transitions.

tools
string
animation_create/modify, animator_create/modify, … (6 tools).

group: splines

Gated on com.unity.splines. Create spline containers, add/modify knots, set tangent modes, and evaluate splines.

tools
string
splines_container_create, splines_add_knot, splines_evaluate, … (7 tools).

Architecture

Four runtime parts cooperate: the Unity project with the bridge and verify packages installed, the HTTP bridge running inside the editor, the MCP server exposing tools/resources over stdio to AI clients, and Unity Hub Pro for setup and maintainer workflows.

Each tool call is routed — live bridge first, then headless batch Unity for a supported subset, then offline disk readers, or a local catalog operation that needs no Unity at all.

AI Client → stdio JSON-RPC → MCP Server → route policy (live | batch | offline | local) → Unity Bridge / AssetDatabase / local catalog

Bridge HTTP API & resources

The in-editor bridge serves a local HTTP API on a deterministic per-project port (loopback by default; remote bind pairs with auth + TLS). MCP resources expose cached health and the tool-group catalog.

GET /ping

Bridge and editor health snapshot

Lightweight health check returning editor and bridge status; used by wait-for-ready and the bridge_status tool.

GET /tools

Compiled-state tool inventory + group→tools map

Lists the bridge tools compiled into the current editor state, including which domain packs compiled in, and maps tool groups to their tools.

POST /tools/{toolName}

Execute one bridge tool

Runs a single bridge tool with a JSON envelope; returns ok/result/error plus optional lifecycle/settle metadata for mutating tools.

GET /events

SSE event stream

Server-Sent Events stream of console and editor-state events; /events/poll provides a pull-style drain for environments without SSE.

GET /resources, GET /resources/{route}

List and read bridge resources

Enumerate and read bridge-side resource payloads.

unity-open-mcp://health/summary

MCP resource: cached verify health summary from the last scan or gate validation.

unity-open-mcp://tool-groups

MCP resource: static tool-group catalog (ids, descriptions, default-enabled flags).