home / mcp / unity mcp server

Unity MCP Server

Provides runtime AI capabilities inside Unity via MCP with multiple providers and configurable transports.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "ivanmurzak-unity-mcp": {
      "url": "http://localhost:8080",
      "headers": {
        "MCP_PLUGIN_PORT": "8080",
        "MCP_PLUGIN_CLIENT_TIMEOUT": "10000",
        "MCP_PLUGIN_CLIENT_TRANSPORT": "stdio"
      }
    }
  }
}

Unity MCP is an AI-powered game development assistant that connects to Unity to automate workflows, generate code, and enable AI within your games. It runs inside your compiled game for real-time AI debugging and player-AI interaction, and supports multiple LLM providers and flexible deployment options to fit your workflow.

How to use

Connect Unity MCP to your MCP Client (such as Claude, Cursor, Gemini, or other supported clients) and start chatting with the integrated AI. Use Tools, Resources, or Prompts to request actions like creating or editing Unity objects, inspecting assets, or running code. Ensure your MCP Client supports dynamic MCP Tool updates so the AI can discover and invoke available MCP Tools.

How to install

Prerequisites: you need a Unity project and the Unity MCP Plugin, plus an MCP Client of your choice. You may also run the server in Docker or as a local binary.

Step 1: Install Unity MCP Plugin

Option 1 - Installer

⬇️ Download Installer

📂 Import installer into Unity project

Option 2 - OpenUPM-CLI

⬇️ Install OpenUPM-CLI

📟 Open the command line in your Unity project folder

openupm add com.ivanmurzak.unity.mcp

Step 2: Install MCP Client

Choose a single MCP Client you prefer. This will be your main chat window to communicate with the LLM.

- Claude Code (highly recommended) - Claude Desktop - GitHub Copilot in VS Code - Antigravity - Cursor - Windsurf - Any other supported client

Step 3: Configure MCP Client

Automatic configuration

Open Unity project and go to Window/AI Game Developer (Unity-MCP). Click Configure at your MCP client.

If your MCP client is not in the list, inject the raw JSON shown in the configuration window into your MCP client. Follow your client’s instructions to apply JSON.

Manual configuration

If automatic configuration doesn’t work, use the JSON from the AI Game Developer (Unity-MCP) window to configure any MCP Client manually.

Command line configuration

Create the command for your environment using the table below. Replace placeholders with your actual paths and port.

Windows x64: "<unityProjectPath>/Library/mcp-server/win-x64/unity-mcp-server.exe" port=<port> client-transport=stdio
Windows x86: "<unityProjectPath>/Library/mcp-server/win-x86/unity-mcp-server.exe" port=<port> client-transport=stdio
Windows arm64: "<unityProjectPath>/Library/mcp-server/win-arm64/unity-mcp-server.exe" port=<port> client-transport=stdio
MacOS Apple-Silicon: "<unityProjectPath>/Library/mcp-server/osx-arm64/unity-mcp-server" port=<port> client-transport=stdio
MacOS Apple-Intel: "<unityProjectPath>/Library/mcp-server/osx-x64/unity-mcp-server" port=<port> client-transport=stdio
Linux x64: "<unityProjectPath>/Library/mcp-server/linux-x64/unity-mcp-server" port=<port> client-transport=stdio
Linux arm64: "<unityProjectPath>/Library/mcp-server/linux-arm64/unity-mcp-server" port=<port> client-transport=stdio

Details for specific MCP clients

Gemini CLI: gemini mcp add ai-game-developer <command> Replace <command> with the value from the table.

Claude Code CLI: claude mcp add ai-game-developer <command> Replace <command> with the value from the table.

GitHub Copilot CLI: copilot then /mcp add and provide the server name ai-game-developer, server type local, and the command corresponding to your environment.

Available tools

copy

Copy the asset at a path and store it at a newPath in the Unity project.

create-folder

Create a new folder under a specified parent folder in the project.

delete

Delete assets at specified paths from the project.

find

Search the AssetDatabase using a filter string.

get-data

Retrieve data from an asset file including serializable fields and properties.

modify

Modify an asset file in the project.

move

Move assets to a new location in the project, also used for renaming.

refresh

Refresh the AssetDatabase to reflect changes.

create

Create a new Material asset with default parameters.

list-all

List all available shaders in project assets and packages.

create

Create a prefab from a GameObject in the current scene.

instantiate

Instantiate a prefab in the current active scene.

open

Open prefab edit mode for a specific GameObject.

close

Close the currently opened prefab in edit mode.

save

Save a prefab in prefab editing mode.

create

Create a new GameObject in the opened prefab or in a Scene.

destroy

Destroy GameObject and all nested children recursively.

duplicate

Duplicate GameObjects in the opened prefab or in a Scene.

find

Find a specific GameObject by provided information.

modify

Modify GameObjects and attached component fields and properties.

set-parent

Set a parent for a list of GameObjects.

add

Add a Component to a GameObject.

destroy

Destroy one or more Components from a GameObject.

get

Get detailed information about a specific Component on a GameObject.

modify

Modify a specific Component on a GameObject.

list

List C# class names that extend UnityEngine.Component.

create

Create a new Scene in the project assets.

get-data

Retrieve the list of root GameObjects in the specified Scene.

list-opened

Return the list of currently opened Scenes in Unity Editor.

open

Open a Scene from the project assets.

save

Save the opened Scene to the asset file.

set-active

Set the specified opened Scene as the active Scene.

unload

Unload a Scene from the opened Scenes in Unity Editor.

delete

Delete the script file(s) from the project.

execute

Compile and execute C# code dynamically using Roslyn.

read

Read the content of a script file.

update-or-create

Update or create a script file with the provided C# code.

get-logs

Retrieve Unity Editor logs with filtering options.

get-state

Return information about the Unity Editor application state.

set-state

Control the Unity Editor application state (play, pause, stop).