home / mcp / unity mcp server

Unity MCP Server

Provides a Unity MCP server enabling runtime AI, code generation, and debugging by connecting MCP clients to Unity via streamableHttp or stdio 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": "streamableHttp"
      }
    }
  }
}

Unity MCP is an AI-powered bridge that lets you connect large language models directly to your Unity project, enabling runtime AI for NPCs, debugging, and automated workflows inside your game or editor. It supports multiple MCP clients and deployment options, so you can run locally or remotely and iterate quickly using AI-assisted development.

How to use

Connect Unity MCP to an MCP Client (such as Claude, Cursor, or Windsurf) through the built-in AI Connector window. You can run the MCP Server locally or host it remotely, and you can expose new features by adding MCP Tools, MCP Resources, or MCP Prompts in your project. When you talk to the AI, describe your task clearly to get better results, and use the Agent mode in your MCP client to enable smart interactions.

How to install

Prerequisites: ensure you have a Unity project and Docker installed if you plan to run the MCP Server in a container. A compatible Unity version is recommended for best stability.

Step 1: Install Unity MCP Plugin

Option 1 - Installer

⬇️ Download Installer - Import the package into your Unity project by double-clicking the file or using Unity: Assets/Import Package/Custom Package and selecting the file.

Option 2 - OpenUPM-CLI

⬇️ Install OpenUPM-CLI - Open the command line in your Unity project folder - Run: openupm add com.ivanmurzak.unity.mcp

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. Options include Claude Code, Claude Desktop, GitHub Copilot in VS Code, Cursor, Windsurf, or any other supported client.

> The MCP protocol is universal, so you can use any MCP client that supports dynamic MCP Tool updates.

Step 3: Configure MCP Client

Automatic configuration:

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

If automatic configuration doesn’t work, use the JSON shown in the Unity-MCP window to configure any MCP Client manually.

Manual configuration must provide the same server connection details your client uses.

Command line configuration

Create <code>command</code> for your environment using the table below. Replace <code>&lt;unityProjectPath&gt;</code> with your Unity project path and <code>&lt;port&gt;</code> with your configured 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

Gemini CLI

gemini mcp add ai-game-developer <command>

Claude Code CLI

claude mcp add ai-game-developer <command>

GitHub Copilot CLI

copilot
```
```bash
/mcp add

Available tools

copy

Copy the asset at a path to a new location within the Unity project.

create-folder

Create a new folder inside a specified parent folder.

delete

Delete assets at given paths from the project.

find

Search the asset database using a filter string.

get-data

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

modify

Modify asset files within the project.

move

Move or rename assets within the project.

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.

instantiate

Instantiate a prefab in the current active scene.

open

Open a prefab for editing.

close

Close the currently opened prefab editing session.

save

Save changes to a prefab.

create

Create a new GameObject in a scene or opened prefab.

destroy

Destroy GameObject and all nested children.

duplicate

Duplicate selected GameObjects.

find

Find a GameObject by specified criteria.

set-parent

Set the parent of a GameObject in the hierarchy.

add

Add a Component to a GameObject.

toString

Get or describe a Component on a GameObject.

read

Read the content of a script file.

execute

Compile and run C# code dynamically via Roslyn.

update-or-create

Update or create a script with provided C# code.

get-logs

Retrieve Unity Editor logs with filters.