# Unity MCP

> AI Skills, MCP Tools, and CLI for Unity Engine. Full AI develop and test loop. Use cli for quick setup. Efficient token usage, advanced tools. Any C# method may be turned into a tool by a single line. Works with Claude Code, Gemini, Copilot, Cursor and any other absolutely for free.

- **Type:** MCP server
- **Install:** `agentstack add mcp-ivanmurzak-unity-mcp`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [IvanMurzak](https://agentstack.voostack.com/s/ivanmurzak)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.17.0
- **License:** Apache-2.0
- **Upstream author:** [IvanMurzak](https://github.com/IvanMurzak)
- **Source:** https://github.com/IvanMurzak/Unity-MCP
- **Website:** https://ai-game.dev

## Install

```sh
agentstack add mcp-ivanmurzak-unity-mcp
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

✨ AI Game Developer — Unity SKILLS, MCP

[](https://modelcontextprotocol.io/introduction)
[](https://openupm.com/packages/com.ivanmurzak.unity.mcp/)
[](https://hub.docker.com/r/aigamedeveloper/mcp-server)
[](https://unity.com/releases/editor/archive)
[](https://unity.com/releases/editor/archive)
[](https://github.com/IvanMurzak/Unity-MCP/actions/workflows/release.yml)
[](https://discord.gg/cfbdMZX99G)
[](https://openupm.com/packages/com.ivanmurzak.unity.mcp/)
[](https://github.com/IvanMurzak/Unity-MCP/stargazers)
[](https://github.com/IvanMurzak/Unity-MCP/blob/main/LICENSE)
[](https://stand-with-ukraine.pp.ua)

  

  
    &nbsp;&nbsp;
    &nbsp;&nbsp;
    &nbsp;&nbsp;
    &nbsp;&nbsp;
    &nbsp;&nbsp;
    &nbsp;&nbsp;
    &nbsp;&nbsp;
    &nbsp;&nbsp;
    &nbsp;&nbsp;
    &nbsp;&nbsp;
    &nbsp;&nbsp;
    
  

  [中文](https://github.com/IvanMurzak/Unity-MCP/blob/main/docs/README.zh-CN.md) | [日本語](https://github.com/IvanMurzak/Unity-MCP/blob/main/docs/README.ja.md) | [Español](https://github.com/IvanMurzak/Unity-MCP/blob/main/docs/README.es.md)

`Unity MCP` is an AI-powered game development assistant **for Editor & Runtime**. Connect **Claude**, **Cursor**, & **Windsurf** to Unity via MCP. Automate workflows, generate code, and **enable AI within your games**.

Unlike other tools, this plugin works **inside your compiled game**, allowing for real-time AI debugging and player-AI interaction.

> **[💬 Join our Discord Server](https://discord.gg/cfbdMZX99G)** - Ask questions, showcase your work, and connect with other developers!

## 

- ✔️ **AI agents** - Use the best agents from **Anthropic**, **OpenAI**, **Microsoft**, or any other provider with no vendor lock-in
- ✔️ **Tools** - A wide range of default [MCP Tools](https://github.com/IvanMurzak/Unity-MCP/blob/main/docs/default-mcp-tools.md) for operating in Unity Editor
- ✔️ **Skills** - Generate skills for AI based on operating system, Unity version, plugins in the project
- ✔️ **Code and Tests** - Develop game mechanics and test them with AI agents
- ✔️ **Runtime (in-game)** - Use LLMs directly inside your compiled game for dynamic NPC behavior or debugging
- ✔️ **Debug support** - Let AI debug and fix the problems in a project
- ✔️ **Natural conversation** - Chat with AI like you would with a human
- ✔️ **Flexible deployment** - Works locally (stdio) and remotely (http) via configuration
- ✔️ **Extensible** - [Create custom Tools in your project code](#add-custom-tool)

[](https://github.com/IvanMurzak/Unity-MCP/releases/latest/download/AI-Game-Dev-Installer.unitypackage)

https://github.com/user-attachments/assets/228baf4d-4f00-4dce-939d-fb985ebdd8dd

### OR use cli

```bash
# 1. Install unity-mcp-cli
npm install -g unity-mcp-cli

# 2. Install "AI Game Developer" in Unity project
unity-mcp-cli install-plugin ./MyUnityProject

# 3. Login to cloud server
unity-mcp-cli login ./MyUnityProject

# 4. Open Unity project (auto-connects and generates skills)
unity-mcp-cli open ./MyUnityProject
```

# Quick Start

Get up and running in three steps:

1. **[Install plugin](#step-1-install-unity-mcp-plugin)** — download the `.unitypackage` installer or run `openupm add com.ivanmurzak.unity.mcp`
   > **Alternative:** `npx unity-mcp-cli install-plugin ./MyUnityProject` — see [CLI documentation](https://github.com/IvanMurzak/Unity-MCP/blob/main/cli/README.md)
2. **[Pick an AI agent](#step-2-install-ai-agent)** — Claude Code, Claude Desktop, GitHub Copilot, Cursor, or any other
3. **[Setup AI agent](#step-3-configure-ai-agent)** — open `Window/AI Game Developer` in Unity and click **Auto-generate skills** (recommended) or **Configure MCP**
  
   > **Alternative:** `npx unity-mcp-cli setup-skills claude-code ./MyUnityProject` — see [CLI documentation](https://github.com/IvanMurzak/Unity-MCP/blob/main/cli/README.md)

That's it. Ask your AI *"Create 3 cubes in a circle with radius 2"* and watch it happen. ✨

---

# Skills and Tools Reference

The plugin ships with 70+ built-in tools across four categories. Each tool brings AI skill. All tools are available immediately after installation — no extra configuration required. See [docs/default-mcp-tools.md](docs/default-mcp-tools.md) for the full reference with detailed descriptions.

> 🧰 Browse the full MCP tools registry online: [ai-game.dev/docs/tools](https://ai-game.dev/docs/tools)

  Project & Assets

- `assets-copy` - Copy the asset at path and stores it at newPath
- `assets-create-folder` - Creates a new folder in the specified parent folder
- `assets-delete` - Delete the assets at paths from the project
- `assets-find` - Search the asset database using the search filter string
- `assets-find-built-in` - Search the built-in assets of the Unity Editor
- `assets-get-data` - Get asset data from the asset file including all serializable fields and properties
- `assets-material-create` - Create new material asset with default parameters
- `assets-modify` - Modify asset file in the project
- `assets-move` - Move the assets at paths in the project (also used for rename)
- `assets-prefab-close` - Close currently opened prefab
- `assets-prefab-create` - Create a prefab from a GameObject in the current active scene
- `assets-prefab-instantiate` - Instantiates prefab in the current active scene
- `assets-prefab-open` - Open prefab edit mode for a specific GameObject
- `assets-prefab-save` - Save a prefab in prefab editing mode
- `assets-refresh` - Refreshes the AssetDatabase
- `assets-shader-get-data` - Get detailed data about a shader asset (properties, subshaders, passes)
- `assets-shader-list-all` - List all available shaders in the project assets and packages
- `package-add` - Install a package from the Unity Package Manager registry, Git URL, or local path
- `package-list` - List all packages installed in the Unity project (UPM packages)
- `package-remove` - Remove (uninstall) a package from the Unity project
- `package-search` - Search for packages in both Unity Package Manager registry and installed packages

  Scene & Hierarchy

- `gameobject-component-add` - Add Component to GameObject
- `gameobject-component-destroy` - Destroy one or many components from target GameObject
- `gameobject-component-get` - Get detailed information about a specific Component on a GameObject
- `gameobject-component-list-all` - List C# class names extended from UnityEngine.Component
- `gameobject-component-modify` - Modify a specific Component on a GameObject
- `gameobject-create` - Create a new GameObject in opened Prefab or in a Scene
- `gameobject-destroy` - Destroy GameObject and all nested GameObjects recursively
- `gameobject-duplicate` - Duplicate GameObjects in opened Prefab or in a Scene
- `gameobject-find` - Finds specific GameObject by provided information
- `gameobject-modify` - Modify GameObjects and/or attached component's fields and properties
- `gameobject-set-parent` - Set parent GameObject to list of GameObjects
- `object-get-data` - Get data of the specified Unity Object
- `object-modify` - Modify the specified Unity Object
- `scene-create` - Create new scene in the project assets
- `scene-get-data` - Retrieves the list of root GameObjects in the specified scene
- `scene-list-opened` - Returns the list of currently opened scenes in Unity Editor
- `scene-open` - Open scene from the project asset file
- `scene-save` - Save opened scene to the asset file
- `scene-set-active` - Set the specified opened scene as the active scene
- `scene-unload` - Unload scene from the opened scenes in Unity Editor
- `screenshot-camera` - Captures a screenshot from a camera and returns it as an image
- `screenshot-game-view` - Captures a screenshot from the Unity Editor Game View
- `screenshot-isolated` - Render a GameObject in isolation from a chosen angle (optional composite 2x2 view)
- `screenshot-scene-view` - Captures a screenshot from the Unity Editor Scene View

  Scripting & Editor

- `console-clear-logs` - Clears the MCP log cache and the Unity Editor Console window
- `console-get-logs` - Retrieves Unity Editor logs with filtering options
- `editor-application-get-state` - Returns information about the Unity Editor application state (playmode, paused, compilation)
- `editor-application-set-state` - Control the Unity Editor application state (start/stop/pause playmode)
- `editor-selection-get` - Get information about the current Selection in the Unity Editor
- `editor-selection-set` - Set the current Selection in the Unity Editor
- `reflection-method-call` - Call any C# method with input parameters and return results
- `reflection-method-find` - Find method in the project using C# Reflection (even private methods)
- `script-delete` - Delete the script file(s)
- `script-execute` - Compiles and executes C# code dynamically using Roslyn
- `script-read` - Reads the content of a script file
- `script-update-or-create` - Updates or creates script file with the provided C# code
- `tests-run` - Execute Unity tests (EditMode/PlayMode) with filtering and detailed results
- `type-get-json-schema` - Generate a JSON Schema for a C# type via reflection

  Profiling & Diagnostics

- `profiler-capture-frame` - Capture the current frame's timing info (delta time, FPS, frame counts)
- `profiler-clear-data` - Discard all frames currently held by the Editor Profiler
- `profiler-enable-module` - Toggle the local enabled flag for a named profiler module
- `profiler-get-memory-stats` - Return a memory statistics snapshot (reserved, allocated, mono heap, graphics)
- `profiler-get-rendering-stats` - Return frame timing, FPS, vsync, target frame rate, graphics device type
- `profiler-get-script-stats` - Return script execution timing plus Mono / GC memory usage
- `profiler-get-status` - Return the profiler's enabled state, active modules, and platform support
- `profiler-list-modules` - List all known profiler module names with their enabled flag
- `profiler-load-data` - Read back a previously-saved profiler JSON snapshot
- `profiler-save-data` - Save a snapshot of profiler-derived stats to a JSON file
- `profiler-start` - Enable Unity's runtime profiler and open the Profiler window
- `profiler-stop` - Disable Unity's runtime profiler

## Install Additional Skills and Tools

Install extensions when need more tools or [create your own tools](#add-custom-tool).

| Extension | Description |
| --- | --- |
| **[AI Animation](https://github.com/IvanMurzak/Unity-AI-Animation/)** | Set of additional tools for Unity Animations |
| **[AI Cinemachine](https://github.com/IvanMurzak/Unity-AI-Cinemachine/)** | MCP Tools for Cinemachine |
| **[AI InputSystem](https://github.com/IvanMurzak/Unity-AI-InputSystem/)** | MCP Tools for the Unity Input System |
| **[AI Navigation](https://github.com/IvanMurzak/Unity-AI-Navigation/)** | MCP Tools for AI Navigation (NavMesh surfaces, baking, agents, links) |
| **[AI ParticleSystem](https://github.com/IvanMurzak/Unity-AI-ParticleSystem/)** | Set of additional tools for Unity Particle System |
| **[AI ProBuilder](https://github.com/IvanMurzak/Unity-AI-ProBuilder/)** | Set of additional tools for Unity ProBuilder |
| **[AI Splines](https://github.com/IvanMurzak/Unity-AI-Splines/)** | MCP Tools for Unity Splines |
| **[AI Terrain](https://github.com/IvanMurzak/Unity-AI-Terrain/)** | Set of additional tools for Unity Terrain |
| **[AI Tilemap](https://github.com/IvanMurzak/Unity-AI-Tilemap/)** | MCP Tools for Unity 2D Tilemaps |
| **[AI Timeline](https://github.com/IvanMurzak/Unity-AI-Timeline/)** | MCP Tools for Unity Timeline cutscenes and sequences |

# Contents

- [Quick Start](#quick-start)
- [Skills and Tools Reference](#skills-and-tools-reference)
  - [Install Additional Skills and Tools](#install-additional-skills-and-tools)
- [Contents](#contents)
  - [More Documentation](#more-documentation)
- [Installation](#installation)
  - [Step 1: Install `Unity MCP Plugin`](#step-1-install-unity-mcp-plugin)
    - [Option 1 - Installer](#option-1---installer)
    - [Option 2 - CLI (recommended)](#option-2---cli-recommended)
  - [Step 2: Install `AI agent`](#step-2-install-ai-agent)
  - [Step 3: Configure `AI agent`](#step-3-configure-ai-agent)
    - [Automatic configuration](#automatic-configuration)
    - [Manual configuration](#manual-configuration)
      - [Command line configuration](#command-line-configuration)
- [AI Workflow Examples](#ai-workflow-examples)
  - [Advanced Features for LLM](#advanced-features-for-llm)
    - [Core Capabilities](#core-capabilities)
    - [Reflection-Powered Features](#reflection-powered-features)
- [Customize Tools](#customize-tools)
  - [Add custom `Tool`](#add-custom-tool)
  - [Add custom `MCP Prompt`](#add-custom-mcp-prompt)
- [Runtime usage (in-game)](#runtime-usage-in-game)
  - [Sample: AI powered Chess game bot](#sample-ai-powered-chess-game-bot)
  - [Why runtime usage is needed?](#why-runtime-usage-is-needed)
- [Unity `MCP Server` setup](#unity-mcp-server-setup)
  - [Variables](#variables)
  - [Plugin Variables](#plugin-variables)
  - [Docker 📦](#docker-)
    - [`streamableHttp` Transport](#streamablehttp-transport)
    - [`stdio` Transport](#stdio-transport)
    - [Custom `port`](#custom-port)
  - [Binary executable](#binary-executable)
- [How Unity MCP Architecture Works](#how-unity-mcp-architecture-works)
  - [What is `MCP`](#what-is-mcp)
  - [What is `AI agent`](#what-is-ai-agent)
  - [What is `MCP Server`](#what-is-mcp-server)
  - [What is `MCP Tool`](#what-is-mcp-tool)
    - [When to use `Tool`](#when-to-use-tool)
  - [What is `MCP Resource`](#what-is-mcp-resource)
    - [When to use `MCP Resource`](#when-to-use-mcp-resource)
  - [What is `MCP Prompt`](#what-is-mcp-prompt)
    - [When to use `MCP Prompt`](#when-to-use-mcp-prompt)
- [Contribution 💙💛](#contribution-)

## More Documentation

| Document | Description |
| -------- | ----------- |
| [Default MCP Tools](docs/default-mcp-tools.md) | Full reference of all built-in tools with descriptions |
| [MCP Server Setup](docs/mcp-server.md) | Server configuration, environment variables, remote hosting |
| [Docker Deployment](docs/DOCKER_DEPLOYMENT.md) | Step-by-step Docker deployment guide |
| [Development Guide](docs/dev/Development.md) | Architecture, code style, CI/CD — for contributors |
| [Wiki](https://github.com/IvanMurzak/Unity-MCP/wiki) | Getting started, tutorials, API reference, FAQ |
| [CLI Tool](https://github.com/IvanMurzak/Unity-MCP/blob/main/cli/README.md) | Install plugins, configure, and connect via command line |

# Installation

## Step 1: Install `Unity MCP Plugin`

  ⚠️ Requirements (click)

> [!IMPORTANT]
> **Project path cannot contain spaces**
>
> - ✅ `C:/MyProjects/MyProject`
> - ❌ `C:/My Projects/MyProject`
> - ❌ `C:/My Projects/My Project`
> - ❌ `C:/MyProjects/My Project`

### Option 1 - Installer

- **[⬇️ Download Installer](https://github.com/IvanMurzak/Unity-MCP/releases/latest/download/AI-Game-Dev-Installer.unitypackage)**
- **📂 Import installer into Unity project**
  > - You can double-click on the file - Unity will open it automatically
  > - OR: Open Unity Editor first, then click on `Assets/Import Package/Custom Package`, and choose the file

### Option 2 - CLI (recommended)

Install the plugin via [`unity-mcp-cli`](https://github.com/IvanMurzak/Unity-MCP/blob/main/cli/README.md) — no Unity Editor needed:

```bash
# 1.1 Install unity-mcp-cli                                #  ┌────────────────────┐
npm install -g unity-mcp-cli                               #  │ Available AI agent │
                                                           #  ├────────────────────┤
# 1.2 (Optional) Install Unity                             #  │ antigravity        │
unity-mcp-cli install-unity                                #  │ claude-code        │
                                                           #  │ claude-desktop     │
# 1.3 (Optional) Create Unity project                      #  │ cline              │
unity-mcp-cli create-project ./MyUnityProject              #  │ codex              │

…

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [IvanMurzak](https://github.com/IvanMurzak)
- **Source:** [IvanMurzak/Unity-MCP](https://github.com/IvanMurzak/Unity-MCP)
- **License:** Apache-2.0
- **Homepage:** https://ai-game.dev

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.17.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.17.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-ivanmurzak-unity-mcp
- Seller: https://agentstack.voostack.com/s/ivanmurzak
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
