MCP Unity MCP Server

The purpose of this package is to provide a MCP Unity Server for executing Unity operations and request Editor information from AI MCP enabled hosts

Local serverstdioTypeScript

What is the MCP Unity MCP server?

The purpose of this package is to provide a MCP Unity Server for executing Unity operations and request Editor information from AI MCP enabled hosts. The mcp unity mcp server wraps that behind the Model Context Protocol, so an assistant can use it through 14 defined tools rather than through you.

What it actually does

MCP Unity is an implementation of the Model Context Protocol for Unity Editor, allowing AI assistants to interact with your Unity projects. This package provides a bridge between Unity and a Node.js server that implements the MCP protocol, enabling AI agents like Cursor, Windsurf, Claude Code, Codex CLI, GitHub Copilot, Google Antigravity, and OpenCode to execute operations within the Unity Editor.

Its toolset

Everything the assistant can do here goes through one of these:

  • execute_menu_item — Executes Unity menu items (functions tagged with the MenuItem attribute)
  • select_gameobject — Selects game objects in the Unity hierarchy by path or instance ID
  • update_gameobject — Updates a GameObject's core properties (name, tag, layer, active/static state), or creates the GameObject if it does not exist
  • update_component — Updates component fields on a GameObject or adds it to the GameObject if it does not contain the component
  • add_package — Installs new packages in the Unity Package Manager
  • run_tests — Runs tests using the Unity Test Runner
  • send_console_log — Send a console log to Unity
  • add_asset_to_scene — Adds an asset from the AssetDatabase to the Unity scene
  • create_prefab — Creates a prefab with optional MonoBehaviour script and serialized field values
  • create_scene — Creates a new scene and saves it to the specified path
  • load_scene — Loads a scene by path or name, with optional additive loading
  • delete_scene — Deletes a scene by path or name and removes it from Build Settings

Adding it to your client

@modelcontextprotocol/inspector on npm is all you need. Most clients run it directly, so configuration is a few lines and a restart.

Configuration

You will need one environment variable: UNITY_HOST. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

  • Unity 6 or later - to install the server - Node.js 18 or later - to start the server - npm 9 or later - to debug the server > [!NOTE] > Project Paths with Spaces > > MCP Unity supports project paths containing spaces. However, if you experience connection issues, try moving your project to a path without spaces as a troubleshooting step.

When to reach for it

This sits in the monitoring and observability group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. MCP Unity's toolset — execute_menu_item, select_gameobject, update_gameobject and 11 more — is a fair guide to whether it matches your workflow. It is maintained by CoderGamester; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

Caveats

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 14 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch MCP Unity.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the mcp unity mcp server does with a few real requests.

Available tools

ToolWhat it does
execute_menu_itemExecutes Unity menu items (functions tagged with the MenuItem attribute)
select_gameobjectSelects game objects in the Unity hierarchy by path or instance ID
update_gameobjectUpdates a GameObject's core properties (name, tag, layer, active/static state), or creates the GameObject if it does not exist
update_componentUpdates component fields on a GameObject or adds it to the GameObject if it does not contain the component
add_packageInstalls new packages in the Unity Package Manager
run_testsRuns tests using the Unity Test Runner
send_console_logSend a console log to Unity
add_asset_to_sceneAdds an asset from the AssetDatabase to the Unity scene
create_prefabCreates a prefab with optional MonoBehaviour script and serialized field values
create_sceneCreates a new scene and saves it to the specified path
load_sceneLoads a scene by path or name, with optional additive loading
delete_sceneDeletes a scene by path or name and removes it from Build Settings
get_gameobjectGets detailed information about a specific GameObject including all components
get_console_logsRetrieves logs from the Unity console with pagination support

How to install the MCP Unity MCP server

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

Configuration as documented by the project. Restart the client after saving.

Configuration

  • Unity 6 or later - to install the server - Node.js 18 or later - to start the server - npm 9 or later - to debug the server > [!NOTE] > Project Paths with Spaces > > MCP Unity supports project paths containing spaces. However, if you experience connection issues, try moving your project to a path without spaces as a troubleshooting step.
VariableDescriptionRequired
UNITY_HOSTEndpoint or connection string the server talks to.Optional

Example prompts to try

  • Use MCP Unity to execute menu item.
  • Use MCP Unity to select gameobject.
  • Use MCP Unity to update gameobject.

Frequently asked questions

It connects MCP Unity to MCP-compatible AI assistants such as Claude and Cursor, exposing 14 tools (execute_menu_item, select_gameobject, update_gameobject, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with MCP Unity directly.