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 |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {} |
| resources | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| unity_list_instancesA | List all running Unity Editor instances that the MCP can connect to. Returns each instance's project name, port, Unity version, and whether it's a ParrelSync clone. Use this to see which Unity projects are currently open before selecting one to work with. IMPORTANT: When multiple instances are detected, always call this first and then use unity_select_instance to choose which project to target. |
| unity_select_instanceA | Select which Unity Editor instance to work with for this session. All subsequent unity_* commands will be routed to the selected instance. You must provide the port number of the instance (get it from unity_list_instances). IMPORTANT: Call unity_list_instances first to see available instances and their ports. PARALLEL SAFETY: After selecting, include 'port: ' as a parameter in ALL subsequent unity_* tool calls to guarantee routing to this instance even when multiple agents share the same 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_editorA | Install a specific Unity Editor version. Optionally include platform modules (android, ios, webgl, linux, macos, windows-il2cpp). |
| unity_hub_install_modulesB | Install additional platform modules to an already-installed Unity Editor version. |
| unity_hub_get_install_pathB | Get the current default installation path for Unity Editors. |
| unity_hub_set_install_pathA | 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_stateA | 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/). |
| unity_scene_saveB | Save the current scene. |
| unity_scene_newB | Create a new empty scene. |
| unity_scene_hierarchyA | Get the full hierarchy tree of all GameObjects in the active scene, including their components and children. |
| unity_gameobject_createA | Create a new GameObject in the scene. Can specify primitive type (Cube, Sphere, Capsule, Cylinder, Plane, Quad), parent, and initial transform. |
| unity_gameobject_deleteC | Delete a GameObject from the scene by path or name. |
| unity_gameobject_infoA | Get detailed info about a specific GameObject: transform, components, children, active state, tags, layer. |
| unity_gameobject_set_transformB | 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_removeA | Remove a component from a GameObject. |
| unity_component_get_propertiesB | Get all serialized properties of a component on a GameObject. |
| unity_component_set_propertyA | Set a property value on a component. Supports floats, ints, strings, bools, vectors, colors, and object references. For ObjectReference properties, pass value as: an asset path string, a scene object name string, null to clear, or an object with {assetPath}, {instanceId}, or {gameObject, componentType}. |
| unity_component_set_referenceA | Set an object reference on a component property. Dedicated tool for wiring references between GameObjects, components, and assets. More powerful than set_property for ObjectReference fields — supports resolution by asset path, scene GameObject name, component type, or instance ID. |
| unity_component_batch_wireA | Wire multiple object references in a single call. Efficient for setting up many references at once (e.g. wiring a UI manager to all its panels, connecting enemy AI to patrol waypoints). Each entry specifies a target GameObject, property, and 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_listA | List assets in the project. Can filter by path, type, and search term. |
| unity_asset_importC | Import an external file into the Unity project as an asset. |
| unity_asset_deleteA | Delete an asset from the project. |
| unity_asset_create_prefabA | Create a prefab from an existing GameObject in the scene. |
| unity_asset_instantiate_prefabB | Instantiate a prefab into the current scene. |
| unity_script_createA | Create a new C# script file in the project with the given content. |
| unity_script_readC | Read the contents of a C# script file from the project. |
| unity_script_updateA | Update the contents of an existing C# script file. |
| unity_execute_codeA | Execute arbitrary C# code inside the Unity Editor. The code runs in the editor context with access to all Unity APIs. Useful for one-off operations, queries, and automation. Return values are serialized to JSON. |
| unity_material_createB | Create a new material asset with a specified shader and properties. |
| unity_renderer_set_materialA | Assign a material to a GameObject's renderer. |
| unity_buildA | Start a build of the Unity project for a target platform. |
| unity_console_logA | Get recent Unity console log messages (errors, warnings, info). Useful for debugging. |
| unity_console_clearA | Clear the Unity console log. |
| unity_get_compilation_errorsA | Get C# compilation errors and warnings from the Unity Editor. Uses CompilationPipeline directly — independent of the console log buffer. Not affected by console clear or Play Mode log flooding. Returns errors from the last compilation cycle. Use this instead of unity_console_log when diagnosing script compilation issues. |
| unity_play_modeA | 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 — prefer unity_component_set_reference] Set an object reference property on a component via the prefab system. Use unity_component_set_reference instead for richer resolution options. |
| unity_gameobject_duplicateA | Duplicate a GameObject with all its children and components. |
| unity_gameobject_set_activeC | Set a GameObject active or inactive. |
| unity_gameobject_reparentB | Move a GameObject under a new parent in the hierarchy. |
| unity_selection_getB | Get the currently selected GameObjects in the Unity Editor. |
| unity_selection_setB | Set the editor selection to specific GameObjects. |
| unity_selection_focus_scene_viewB | Control the Scene View camera: frame a GameObject, set pivot/rotation/zoom, toggle orthographic. |
| unity_selection_find_by_typeA | Find all GameObjects in the scene that have a specific component type (e.g. 'Rigidbody', 'Camera', 'Light', 'AudioSource', or custom scripts). |
| unity_search_by_componentA | Find all GameObjects in the scene that have a specific component type. Returns their paths and instance IDs. |
| unity_search_by_tagA | Find all GameObjects with a specific tag. |
| unity_search_by_layerB | Find all GameObjects on a specific layer. |
| unity_search_by_nameA | Find all GameObjects whose name contains a pattern. Supports substring matching or regex. |
| unity_search_assetsB | Search for assets in the project by name, type, and folder. Uses Unity's AssetDatabase search. |
| unity_search_missing_referencesA | 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_undoB | Undo the last operation in Unity Editor. |
| unity_redoA | Redo the last undone operation in Unity Editor. |
| unity_undo_historyC | Get information about the current undo group. |
| unity_screenshot_gameA | Capture a screenshot of the Game View. The screenshot is saved on the next frame render. |
| unity_screenshot_sceneA | Capture a screenshot of the Scene View camera. Returns immediately with the saved file path. |
| unity_graphics_scene_captureA | Capture the current Scene View as an inline image. Returns base64 PNG that Claude can see directly. Use to visually inspect the scene layout. |
| unity_graphics_game_captureA | Capture the Game View camera as an inline image. Returns base64 PNG that Claude can see directly. Use to see what the player sees. |
| unity_packages_listB | 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_removeA | Remove/uninstall a Unity package by name. |
| unity_packages_searchB | Search for Unity packages in the registry. |
| unity_packages_infoB | Get detailed info about an installed package including versions and dependencies. |
| unity_queue_infoA | Get the current state of the multi-agent request queue: total queued requests, active agents, per-agent queue depths, and completed cache size. Useful for monitoring when multiple agents are working on the same Unity project. |
| 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 | List all available advanced/specialized Unity tools organized by category. These tools are not directly exposed but can be called via unity_advanced_tool. Categories include: uma, animation, prefab, physics, lighting, audio, shadergraph, amplify, terrain, particle, navmesh, ui, texture, profiler, memory, settings, input, asmdef, scriptableobject, constraint, lod, editorprefs, playerprefs, vfx, graphics, sceneview, and more. |
| unity_advanced_toolA | Execute an advanced/specialized Unity tool by name. Use unity_list_advanced_tools to discover available tools and their parameters. This provides access to 200+ specialized tools for animation, prefabs, physics, shaders, terrain, particles, UI, profiling, and more. |
| unity_get_project_contextA | Get project-specific context and documentation that the team has prepared for AI agents. This includes project guidelines, architecture docs, game design documents, networking rules, and any other project knowledge stored in Assets/MCP/Context/. Call this without arguments to get ALL context, or specify a category for a specific document. IMPORTANT: Call this early in your session to understand the project's conventions and architecture. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/AnkleBreaker-Studio/unity-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server