unity-local-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| LM_API_TOKEN | No | LM Studio API token (equivalent to the --api-key option). | |
| UNITY_MCP_PROJECT | No | Choose an editor when several Unity projects are open (equivalent to the --project option). | |
| UNITY_MCP_TOOLSETS | No | Expose only these tool groups, e.g. "inspect,edit" (equivalent to the --toolsets option). | |
| UNITY_MCP_READ_ONLY | No | Expose only tools that change nothing (equivalent to the --read-only option). |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
These tools control the user's open Unity Editor. Look before you edit: use get_hierarchy or find_objects to learn exact object paths. Refer to an object by its path, like 'Parent/Child'. Vectors are text like '0,1,0'. After write_script, call get_console_logs to check for compile errors.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_editor_stateA | Unity version, open scene, play mode, compile status and selected objects. |
| get_hierarchyB | Tree of GameObjects in the open scene. Set parent to see only its children. |
| find_objectsB | Search scene objects by part of a name, component type and/or tag. |
| get_objectB | One object's transform and components. Set component to list its property names and values. |
| create_objectB | Create a GameObject. position, rotation and scale are relative to the parent. |
| update_objectA | Rename, move, rotate, scale, reparent, enable/disable or tag an object. Only set what changes. |
| delete_objectB | Delete an object and its children (undo with Ctrl+Z in Unity). |
| add_componentC | Add a component, e.g. Rigidbody, AudioSource or your own script class name. |
| remove_componentC | Remove a component from an object. |
| set_propertyC | Set one component property, e.g. component=Rigidbody property=mass value=5. |
| set_colorC | Change the color of an object, sprite or light. |
| create_prefabC | Save a scene object as a prefab file and link the object to it. |
| list_assetsC | Search project files by name and type. |
| read_scriptC | Read a text file such as Assets/Scripts/Player.cs. |
| write_scriptA | Create a C# file under Assets/. Send the whole file. Set overwrite=true to replace one. |
| get_console_logsB | Recent Console messages and compile errors. Waits for compiling to finish. |
| set_play_modeC | Start, stop or pause Play mode. |
| save_sceneC | Save the open scene. |
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 18 tools
Most tools target a clearly distinct resource+action: hierarchy inspection (get_hierarchy, find_objects, get_object), mutation (create_object, update_object, delete_object), components (add_component, remove_component, set_property), and editor control (get_editor_state, set_play_mode, save_scene). The only soft overlaps are set_color versus set_property (color is a special case of a property) and update_object versus set_property for transform-like changes, but the descriptions steer an agent reasonably well.
Every tool follows a strict snake_case verb_noun pattern (delete_object, list_assets, get_editor_state, add_component, set_property, write_script, set_play_mode, save_scene). Verb choice is also semantically consistent (get_ for single-item reads, list_/find_ for searches, set_ for single-value mutations).
18 tools is at the upper end but each maps to a real Unity editor capability across scene hierarchy, components, properties, prefabs, scripts, console, and play mode. A few could theoretically be folded together (set_color into set_property), but nothing feels like filler.
Core lifecycle is well covered: inspect state/hierarchy, create/update/delete objects, add/remove components, edit properties, author scripts, read logs, drive play mode, and save the scene. Gaps are the prefab lifecycle (create_prefab exists but no instantiate/apply/revert) and asset management beyond listing (no create folder, delete, move, or import), which agents can partially work around but not fully.