Unity MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| UNITY_HUB_PATH | No | Unity Hub executable path | C:\Program Files\Unity Hub\Unity Hub.exe |
| UNITY_MCP_DEBUG | No | Enable debug logging for troubleshooting | false |
| UNITY_BRIDGE_HOST | No | Editor bridge host | 127.0.0.1 |
| UNITY_BRIDGE_PORT | No | Editor bridge port (auto-discovered when using multi-instance) | 7890 |
| UNITY_BRIDGE_TIMEOUT | No | Request timeout in ms | 30000 |
| UNITY_PORT_RANGE_END | No | End of port scan range | 7899 |
| UNITY_PORT_RANGE_START | No | Start of port scan range for multi-instance discovery | 7890 |
| UNITY_RESPONSE_HARD_LIMIT | No | Response size hard limit in bytes (truncation) | 4194304 |
| UNITY_RESPONSE_SOFT_LIMIT | No | Response size soft limit in bytes (warning) | 2097152 |
| UNITY_REGISTRY_STALENESS_TIMEOUT | No | Registry entry staleness timeout in ms (crash detection) | 300000 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {} |
| resources | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| unity_list_instancesA | List running Unity Editor instances (name, port, version, clone flag, pluginVersion). With multiple instances, select one with unity_select_instance next. |
| unity_select_instanceA | Select the Unity Editor instance this session targets; subsequent unity_* calls route there. Identify it by projectName (stable) or port (dynamic — can change across editor restarts). PARALLEL SAFETY: after selecting, include port on every unity_* call when multiple agents share this MCP process. |
| unity_hub_list_editorsA | List all Unity Editor versions currently installed via Unity Hub, including their installation paths. |
| unity_hub_available_releasesA | List Unity Editor versions available for download from Unity Hub. |
| unity_hub_install_editorB | Install a specific Unity Editor version. Optionally include platform modules (android, ios, webgl, linux, macos, windows-il2cpp). |
| unity_hub_install_modulesA | Install additional platform modules to an already-installed Unity Editor version. |
| unity_hub_get_install_pathA | Get the current default installation path for Unity Editors. |
| unity_hub_set_install_pathB | Set the default installation directory for Unity Editors. |
| unity_editor_pingA | Check if the Unity Editor bridge is running and responsive. Returns editor version, project name, and connection status. |
| unity_editor_stateB | Get the current Unity Editor state: play mode, compilation status, active scene, project path. |
| unity_scene_infoB | Get information about the currently open scene(s), including name, path, dirty state, and root game objects. |
| unity_scene_openA | Open a scene by its asset path (relative to Assets/). Refuses if any loaded scene has unsaved changes — pass saveFirst or discardUnsavedChanges. |
| unity_scene_saveA | Save the current scene. A never-saved scene requires |
| unity_scene_newA | Create a new empty scene (REPLACES the current one). Refuses if any loaded scene has unsaved changes — pass saveFirst or discardUnsavedChanges. |
| unity_scene_hierarchyA | Get the hierarchy tree of all GameObjects in the active scene, including their components and children. Dense by default: per-node fields at their default value (active=true, tag=Untagged, layer=Default, origin position, Transform) are omitted — an absent field means the default. |
| unity_gameobject_createB | Create a new GameObject in the scene. Can specify primitive type (Cube, Sphere, Capsule, Cylinder, Plane, Quad), parent, and initial transform. |
| unity_gameobject_deleteA | Delete a GameObject by path or name. Refuses if its runtime mesh is shared by other objects (ProBuilder clones) — reports sharedWith; pass force:true to override. |
| unity_gameobject_infoA | Get detailed info about a specific GameObject: transform, components, children, active state, tags, layer. |
| unity_gameobject_set_transformC | Set the transform (position, rotation, scale) of a GameObject. |
| unity_component_addA | Add a component to a GameObject. Supports built-in types (Rigidbody, BoxCollider, AudioSource, Light, Camera, etc.) and custom scripts. |
| unity_component_removeB | Remove a component from a GameObject. |
| unity_component_get_propertiesB | Get all serialized properties of a component on a GameObject. |
| unity_component_set_propertyC | Set a serialized component property: numbers, strings, bools, vectors, colors, enums or object references. |
| unity_component_set_referenceA | Wire an object reference on a component property. Resolves by asset path, scene GameObject name, component type, or instance ID (richer than set_property for ObjectReference fields). |
| unity_component_batch_wireA | Wire multiple object references in one call (e.g. a manager to all its panels). Each entry: target GameObject, property, reference to assign. |
| unity_component_get_referenceableA | Discover what objects can be assigned to an ObjectReference property. Returns matching scene objects and project assets filtered by the expected type. Useful before wiring references to know what's available. |
| unity_asset_listC | List assets in the project. Can filter by path, type, and search term. |
| unity_asset_importB | Import an external file into the Unity project as an asset. |
| unity_asset_deleteA | Delete an asset — to the OS trash by default (NOT undoable via unity_undo_last). Deleting a FOLDER is recursive and refuses without recursive:true. |
| unity_asset_create_prefabB | Create a prefab from an existing GameObject in the scene. |
| unity_asset_instantiate_prefabC | Instantiate a prefab into the current scene. |
| unity_script_createB | Create a new C# script file in the project with the given content. |
| unity_script_readB | Read the contents of a C# script file from the project. |
| unity_script_updateB | Update the contents of an existing C# script file. |
| unity_execute_codeA | Run C# in the Unity Editor with Unity API access. Return a small JSON result. If an error has executionCompleted=true, the code already ran; inspect its effects before retrying. |
| unity_material_createC | Create a new material asset with a specified shader and properties. |
| unity_renderer_set_materialC | Assign a material to a GameObject's renderer. |
| unity_buildC | Build the project for a target platform. |
| unity_console_logB | Get recent Unity console log messages (errors, warnings, info). |
| unity_console_clearA | Clear the Unity console log. |
| unity_get_compilation_errorsA | Get C# compilation errors/warnings via CompilationPipeline — independent of the console buffer (survives console clear and log flooding). Prefer this over unity_console_log for compile issues. |
| unity_play_modeB | Control Unity Editor play mode: enter play, pause, or stop. |
| unity_execute_menu_itemA | Execute a Unity Editor menu command by its path (e.g. 'File/Save', 'GameObject/3D Object/Cube', 'Window/General/Console'). |
| unity_project_infoA | Get project information: name, path, Unity version, render pipeline, packages, build settings. |
| unity_prefab_infoA | Get detailed prefab information: overrides, variant status, added/removed components. Works on both prefab assets and scene instances. |
| unity_set_object_referenceA | [LEGACY] Set an object reference on a component. Prefer unity_component_set_reference (richer resolution). |
| unity_gameobject_duplicateB | Duplicate a GameObject with all its children and components. |
| unity_gameobject_set_activeB | Set a GameObject active or inactive. |
| unity_gameobject_reparentB | Move a GameObject under a new parent in the hierarchy. |
| unity_selection_getA | Get the currently selected GameObjects in the Unity Editor. |
| unity_selection_setC | Set the editor selection to specific GameObjects. |
| unity_selection_focus_scene_viewA | Control the Scene View camera: frame a GameObject, set pivot/rotation/zoom, toggle orthographic. |
| unity_selection_find_by_typeC | Find all GameObjects in the scene that have a specific component type. |
| unity_search_by_componentB | Find all GameObjects in the scene that have a specific component type. Returns their paths and instance IDs. |
| unity_search_by_tagB | Find all GameObjects with a specific tag. |
| unity_search_by_layerB | Find all GameObjects on a specific layer. |
| unity_search_by_nameB | Find all GameObjects whose name contains a pattern. Supports substring matching or regex. |
| unity_search_assetsA | Search for assets in the project by name, type, and folder. Uses Unity's AssetDatabase search. |
| unity_search_missing_referencesB | Find all missing/broken object references and missing scripts in the scene. Essential for cleanup and debugging. |
| unity_scene_statsA | Get comprehensive scene statistics: total objects, vertices, triangles, lights, cameras, colliders, and top component types. |
| unity_undoA | Undo the single most recent step on Unity's global undo stack (Ctrl+Z). To revert a specific MCP action, prefer unity_undo_last. |
| unity_undo_lastA | Revert the latest verified MCP Undo group, optionally by agentId. Newer MCP/native groups require force:true. Only Unity-registered changes are covered; this revert creates no Redo step. Use unity_undo for normal Undo/Redo. Reads and execute-code are not targets. |
| unity_redoA | Redo the last undone operation in Unity Editor. |
| unity_undo_historyB | Show which recorded MCP actions can still be reverted, with agent, target and current Unity Undo state. |
| unity_screenshot_gameA | Capture a screenshot of the Game View. The screenshot is saved on the next frame render. |
| unity_screenshot_sceneB | Capture a screenshot of the Scene View camera. Returns immediately with the saved file path. |
| unity_screenshot_editor_windowA | Capture an existing EditorWindow to PNG (Windows PrintWindow) without requesting keyboard focus. Hidden tabs require activateTab:true; ambiguous names return id: candidates. GPU/minimized windows can refuse capture. USE ONLY ON EXPLICIT USER REQUEST; never proactively or for your own inspection. On macOS/Linux report unsupported, do not retry; use Game/Scene captures there. |
| unity_graphics_scene_captureB | Render the Scene View camera to inline PNG. Whole-pixel sizes within device limits, at most 33554432 pixels. |
| unity_graphics_game_captureB | Render one camera to inline PNG, without Game View composition or overlay UI. Whole-pixel sizes within device limits, at most 33554432 pixels. |
| unity_packages_listA | List all installed Unity packages with their name, version, source, and status. |
| unity_packages_addA | Add/install a Unity package by identifier (e.g. 'com.unity.cinemachine' or 'com.unity.cinemachine@3.0.0'). |
| unity_packages_removeC | Remove/uninstall a Unity package by name. |
| unity_packages_searchB | Search for Unity packages in the registry. |
| unity_packages_infoA | Get detailed info about an installed package including versions and dependencies. |
| unity_queue_infoB | Queue depths, agents and results. Plugin metrics: http, httpCommands (admission), completedResults (cost/evictions), historyNotifications (backlog), historyPersistence (file limits/failures). Reset on reload. serverAgentState: Node agent/identity limits, leases, evictions. Accounted bytes are not heap usage. |
| unity_agents_listA | List all active agent sessions connected to the AB Unity MCP bridge. Shows each agent's ID, connection time, last activity, current action, total actions count, queued/completed request counts, and average response time. |
| unity_agent_logA | Get the action log for a specific agent, showing the last 100 actions with timestamps. |
| unity_list_advanced_toolsA | Discover advanced Unity tools (execute them via unity_advanced_tool) without loading full schemas: search=keywords → matching tools; category=name → its tools with parameter names; tool=name → that tool's full parameter schema; no args → all category names with counts (e.g. animation, terrain, shadergraph, probuilder, uma, physics, lighting, ui, …). |
| unity_advanced_toolA | Execute an advanced Unity tool by name (269 cached + plugin lazy-loaded; discover names via unity_list_advanced_tools search=/category=, parameters via tool=). |
| unity_get_project_contextA | Get the project docs/guidelines the team prepared for AI agents (from Assets/MCP/Context/). No args = all context; pass a category for one document. Call early in a session. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 80 tools
Several tools target the same resource/action: unity_search_by_component and unity_selection_find_by_type are effectively duplicates, and unity_screenshot_scene/unity_graphics_scene_capture plus their game-view variants overlap. Legacy unity_set_object_reference also overlaps with unity_component_set_reference, creating real misselection risk despite descriptive text.
All names use snake_case with a unity_ prefix, but verb/noun order is inconsistent: domain_action (unity_scene_save, unity_asset_delete) mixes with action_domain (unity_list_instances, unity_get_project_context) and bare verbs (unity_build, unity_redo). Readable overall, but the pattern is not predictable.
80 direct tools is far beyond the 25+ threshold; additionally unity_advanced_tool fronts 269+ lazy-loaded tools. This is an extreme over-scoping that burdens discovery and selection.
Core Unity editor automation is broadly covered: GameObjects, components, scenes, assets, prefabs, scripts, packages, Hub, play mode, build, and advanced tools. Minor gaps remain (e.g., direct asset move/rename, material property edit, script delete), but most can be handled via execute_code/menu/advanced tools.