Unity MCP

Your agent can drive Unity itself.

Most Unity AI integrations let an agent write C# and hope. This one hands it the editor: open a scene, press Play, run code against the live session, read the console, add a second player, and take a screenshot of the result.

unity_editor_status unity_open_scene unity_stop_play unity_refresh unity_relaunch unity_shutdown unity_exec_query unity_exec_patch unity_arm_hot_reload unity_screenshot unity_set_stream_fps unity_set_stream_res unity_logs unity_tdd_logs unity_trace_writes unity_trace_report unity_add_player unity_remove_player unity_resolve_dialog unity_worktree_create unity_worktree_list unity_worktree_remove unity_start_editor unity_source_find unity_source_read unity_source_grep unity_docs

An agent that can't press Play

A modern coding agent can write a plausible Unity system in a minute. What it cannot do, in most setups, is find out whether the thing works. It cannot see the running game, read the console or press Play. So it writes, you run, you paste back an error, and it writes again. You are doing the running and the reading on its behalf.

The Unity MCP server closes that loop. It is a Model Context Protocol server that exposes a live Unity editor as callable tools, so the agent can run its own experiment and read its own result.

Registered for you

When Satura Space opens a project it registers the server in the places the agents look (.mcp.json, .claude/settings.local.json, .cursor/mcp.json), so Claude Code, Codex and Cursor come pre-wired. There is no config file for you to write and no API key involved. The server talks to the editor over local loopback and a file-based bridge; nothing leaves the machine.

Anything else still works. Every terminal in Satura Space is a real shell, so agents without MCP support run fine; they just edit files instead of driving the editor.

Why 27 and not 330

Other Unity MCP servers ship 47, 70 or 330 tools, and the number gets used as a scoreboard. It measures the wrong thing. A narrow tool does one operation per round trip, and its schema rides along in every request the agent makes; the largest catalog in this space now hides 254 of its 330 tools behind a discovery proxy because the list itself grew too expensive to send.

The widest tool here is a compiler. unity_exec_patch takes a body of C# and runs it through Roslyn inside the live editor, so one call can place twelve objects, wire their references, check the result and print back only the fields the agent asked about. It reaches every Editor API and every package in your project, including packages written long after this server shipped, which is something no fixed tool list can promise.

The named tools cover what C# inside the editor cannot do for itself: launch and relaunch editors, branch a git worktree, clear a native modal that is blocking the main thread, read Unity's own source, or survive a domain reload. That is the split, and it is why the list below is short.

The 27 tools

Grouped by what they let the agent do.

Run the editor

unity_editor_statusReport the project's editors: RUNNING, BUSY or DOWN, plus pid, play/pause/compile state and the open scene.
unity_open_sceneOpen a scene across the project's players; optionally enter Play Mode and run a TddScenario.
unity_stop_playExit Play Mode on every player; the group stops as a unit. Never launches an editor.
unity_refreshRefresh assets and recompile scripts, waiting until compilation completes.
unity_relaunchKill and restart the editor. This is the first move for a wedged session.
unity_shutdownStop the project's headless editor gracefully, escalating to SIGTERM and SIGKILL if forced.

Change and inspect the running game

unity_exec_queryExecute C# in the editor to read or query data, with Print() for output. Runs in-memory through Roslyn, with no recompile and no domain reload.
unity_exec_patchExecute C# to modify scenes, prefabs and settings against the session that is currently running.
unity_arm_hot_reloadArm live C# hot-reload on the player(s), the same toggle the Player panel shows.
unity_screenshotCapture a PNG of the playing game. Play Mode only, unless a camera position is supplied.
unity_set_stream_fpsSet the streamed player's frame rate.
unity_set_stream_resSet the streamed player's resolution, up to 4K, or hand it back to the pane size with auto.

Read what happened

unity_logsRead a snapshot of Unity logs: the Console plus compile errors. Parallel-safe, so several agents can read at once.
unity_tdd_logsRead the per-tag logs a scenario wrote through LogTdd during Play Mode, stamped with frame and time.
unity_trace_writesA non-blocking data breakpoint: trace who writes a GameObject's component properties at runtime.
unity_trace_reportRead that trace back as an ordered, aggregated, per-frame log.

Multiplayer and modals

unity_add_playerAdd a multiplayer instance, a headless clone editor, through the orchestrator.
unity_remove_playerRemove a clone. Never touches the primary.
unity_resolve_dialogList or clear blocking native modal dialogs (save-scene, Safe Mode, the API updater) from outside the editor process.

Give each agent its own checkout

unity_worktree_createBranch the project into an isolated git worktree under .sspace/agent-worktrees/ on branch agent/<name>, and optionally boot a headless editor in it in the same call.
unity_worktree_listList this project's worktrees with each one's branch, kind and editor health.
unity_worktree_removeDelete a worktree, unregister it from git and drop its branch unless it is checked out elsewhere. Refuses while its editor is live.
unity_start_editorLaunch or reuse a headless editor at any project root, in headless-graphics or headless-nographics mode.

Ground the agent in real Unity

unity_source_findLocate an engine type or member in Unity's real C# source (UnityCsReference), pinned to your editor version.
unity_source_readRead that engine source at controlled granularity, so a lookup costs a few hundred tokens instead of a file.
unity_source_grepRegex-search the engine's C# source, the free-text way in when you don't know the type name.
unity_docsFetch the official Unity ScriptReference page for an API, version-matched to the project.

Two agents, one project

Two agents editing the same checkout will step on each other. unity_worktree_create gives each one its own: an isolated git worktree at .sspace/agent-worktrees/<name> on branch agent/<name>, with its own headless Unity editor booted in the same call. Every other tool targets it by passing that path as project_root, and you merge the result back from the parent checkout with git merge agent/<name>.

There are two kinds, depending on what the agent needs to see:

  • full carries your uncommitted changes across and seeds the Library copy-on-write, so the editor boots with everything already present.
  • settings is a sparse checkout of ProjectSettings/ and Packages/ with an empty Assets/: a clean sandbox at the project's exact Unity version, where the first boot imports only the package set.

unity_start_editor boots the editor in either headless-graphics, where unity_screenshot and camera captures work, or headless-nographics, which is cheaper and refuses those two. It never kills a running editor: ask for a mode that doesn't match the one already running and you get an error telling you to shut it down first. Editors started this way quit themselves after about ten idle minutes, and calling the tool again revives one.

Out of your way: agent worktrees live inside .sspace/, so the file tree and search in Satura Space skip them and they stay out of the parent checkout's git status. Budget minutes for a worktree's first boot; it imports every asset once.

Why the source tools matter

An agent that half-remembers an API states the wrong thing with confidence, and you pay for it in time. Because unity_source_grep and unity_docs are pinned to your editor version, the agent can check what the engine actually does in the version you are running instead of recalling it.

Why unity_resolve_dialog exists

A native modal, such as an unsaved-scene prompt, Safe Mode or the API updater, blocks Unity's main thread. C# running inside the editor cannot dismiss it, because that C# is on the thread the modal froze. Without a way out, one stray dialog wedges an agent's entire session. This tool detects and clears the dialog from outside the process, and the bridge fast-fails commands rather than hanging behind one.

The specifics.

Protocol

MCPModel Context Protocol, over stdio. 27 tools against a live editor.

Auto-registered

Claude · Codex · CursorWritten into .mcp.json and the per-agent config for you.

Network

Local onlyLoopback and a file bridge. No cloud, no API key, no prompt proxying.

Source grounding

Version-pinnedUnityCsReference and ScriptReference matched to your editor version.

Straight answers

MCP questions.

Does it change my Unity project?

A little, nothing hidden: one line in Packages/manifest.json, the engine package in Packages/, a .sspace/ working folder, and MCP registration for the agents you use. Everything but the manifest line is gitignored for you.

Which agents get it automatically?

Claude Code, Codex and Cursor. Any other MCP-capable client can be pointed at it, and non-MCP agents still work in a normal shell. See coding agents.

Can two agents work on the project at once?

Yes. unity_worktree_create branches the project into an isolated git worktree at .sspace/agent-worktrees/<name> on branch agent/<name> and boots a headless editor there, so no two agents share a checkout. Merge the work back with git merge agent/<name>.

Do I need an API key?

No. Satura Space never proxies prompts, resells tokens or asks for a key; you bring the agent subscription you already pay for.

Does my code leave my machine?

No. The server runs locally, frames move over a shared GPU texture, and everything else rides local loopback. Crash reports are anonymous and scrubbed of project detail.

Can the agent read Unity's own source?

Yes. unity_source_find, unity_source_read and unity_source_grep search UnityCsReference pinned to your editor version, and unity_docs fetches the matching ScriptReference page.

What if a modal dialog freezes the editor?

unity_resolve_dialog lists and clears blocking native modals from outside the editor process, and the bridge fast-fails rather than hanging behind one.

Related

Give your agent the editor.

Twenty-six tools, registered for you, pointed at a Unity session that is already running.

7-day free trial (no card required)macOS & Windows