Back to MCP Directory
Unity
Model Context Protocol moderate risk

Unity

MCP Unity Editor enables AI assistants to interact with Unity projects, offering tools for scene manipulation, package management, and more, via a Node.js server.

Connections & Capabilities

Connects To

GitHubDiscord

Capabilities

readwriteexec

Quickstart

Install

brew install node@18

Config

{
   "mcpServers": {
       "mcp-unity": {
          "command": "node",
          "args": [
             "ABSOLUTE/PATH/TO/mcp-unity/Server~/build/index.js"
          ]
       }
   }
}

Exposed MCP Tools (30)

moderate
execute_menu_item

Executes a specified menu item within the Unity Editor.

Could trigger unexpected or unwanted actions depending on the menu item.

safe
select_gameobject

Selects a GameObject in the Unity hierarchy.

Read-only operation that does not modify the project.

moderate
update_gameobject

Updates core properties of a GameObject or creates it if it doesn't exist.

Modifies GameObject properties, potentially altering scene behavior.

moderate
update_component

Updates component fields on a GameObject or adds a component if it doesn't exist.

Modifies GameObject components, potentially altering scene behavior.

high
add_package

Installs a new package in the Unity Package Manager.

Could introduce malicious or unstable dependencies.

safe
run_tests

Runs tests using the Unity Test Runner.

Executes tests, but does not modify project files.

safe
send_console_log

Sends a log message to the Unity console.

Non-destructive operation that only outputs to the console.

moderate
add_asset_to_scene

Adds an asset from the AssetDatabase to the Unity scene.

Modifies the scene by adding an asset.

moderate
create_prefab

Creates a prefab with an optional MonoBehaviour script.

Creates new assets in the project.

moderate
create_scene

Creates a new scene and saves it to the specified path.

Creates new assets in the project.

safe
load_scene

Loads a scene by path or name.

Loads a scene, but does not modify project files.

critical
delete_scene

Deletes a scene by path or name and removes it from Build Settings.

Deletes a scene file from the project.

safe
get_gameobject

Gets detailed information about a specific GameObject.

Read-only operation that does not modify the project.

safe
get_console_logs

Retrieves logs from the Unity console.

Read-only operation that does not modify the project.

moderate
recompile_scripts

Recompiles all scripts in the Unity project.

Can cause temporary instability or errors during recompilation.

moderate
save_scene

Saves the current active scene.

Modifies the current scene file.

safe
get_scene_info

Gets information about the active scene.

Read-only operation that does not modify the project.

safe
unload_scene

Unloads a scene from the hierarchy.

Unloads a scene, but does not modify project files.

moderate
duplicate_gameobject

Duplicates a GameObject in the scene.

Modifies the scene by adding a new GameObject.

high
delete_gameobject

Deletes a GameObject from the scene.

Deletes a GameObject from the scene.

moderate
reparent_gameobject

Changes the parent of a GameObject in the hierarchy.

Modifies the scene hierarchy.

moderate
move_gameobject

Moves a GameObject to a new position.

Modifies the scene by changing GameObject positions.

moderate
rotate_gameobject

Rotates a GameObject to a new rotation.

Modifies the scene by changing GameObject rotations.

moderate
scale_gameobject

Scales a GameObject to a new local scale.

Modifies the scene by changing GameObject scales.

moderate
set_transform

Sets position, rotation, and scale of a GameObject in a single operation.

Modifies the scene by changing GameObject transforms.

moderate
create_material

Creates a new material with specified shader.

Creates new assets in the project.

moderate
assign_material

Assigns a material to a GameObject's Renderer component.

Modifies the appearance of a GameObject.

moderate
modify_material

Modifies properties of an existing material.

Modifies the properties of a material.

safe
get_material_info

Gets detailed information about a material.

Read-only operation that does not modify the project.

high
batch_execute

Executes multiple tool operations in a single batch request.

Combines multiple operations, increasing the potential for unintended consequences.

Safety Assessment

MCP Unity provides useful tools for automating Unity tasks, but the ability to modify scenes, install packages, and execute menu items introduces moderate risk. It is safest when used with careful prompt engineering and a clear understanding of the potential side effects of each tool. Risky scenarios involve complex batch operations or poorly validated prompts that could lead to unintended modifications or instability.

  • Requires local Node.js server, limiting direct external exposure.
  • Provides a defined set of tools with specific functionalities.
  • Includes tools for recompiling scripts, potentially catching errors before runtime.
  • Offers a batch execution tool with optional rollback, improving reliability.
  • Allows write operations within the Unity project, including scene modification and package installation.
  • No explicit sandboxing mechanism is mentioned, potentially allowing unintended side effects.
  • Reliance on user-provided prompts introduces risk of prompt injection.
  • Potential for resource exhaustion if operations are not carefully managed.