website/docs/guides/multi-instance.md
You can have several Unity Editors open at once and aim a single MCP session at any of them.
Each connected Unity Editor advertises a stable ID of the form Name@hash, where:
Name is the project's productName from Player Settingshash is a stable 8-character hash derived from the project pathExample: MyGame@a1b2c3d4.
You can also reference an instance by:
a1b if it's unambiguous)Read the resource:
mcpforunity://instances
It returns the list of currently connected Editors with their Name@hash, project path, transport, and port. Most MCP clients expose this as the unity_instances resource.
set_active_instance(instance="MyGame@a1b2c3d4")
Once set, every subsequent tool call in the session routes to that instance until you change it. This is the most common pattern: choose once, then prompt normally.
You can also use:
set_active_instance(instance="a1b") # hash prefix
set_active_instance(instance="6401") # port number (stdio only)
Pass unity_instance on the individual tool call:
manage_scene(action="get_hierarchy", unity_instance="MyGame@a1b2c3d4")
This is useful for comparing two projects in the same prompt — e.g., "Read the same script from both projects and tell me what differs."
The server accepts the same value formats as set_active_instance: Name@hash, hash prefix, or (stdio) port number.
set_active_instance and retry.client_id, so two MCP clients can target different Editors at the same time on the same Python server.Name@hash exclusively.set_active_instance — full tool referenceunity_instances resource — discovery surface