Utilizes .NET 9.0 as the foundation for the server component, enabling communication between the Unity plugin and external AI clients, with support for custom tool development in C#.
Acts as an AI-powered gateway between Unity Editor and LLM, allowing manipulation of GameObjects, Components, Assets, and Scenes. Supports creating and managing Unity objects, instantiating prefabs, searching assets, and viewing scene hierarchies with an extensible tool system.
✨ AI Game Developer — Unity MCP
AI helper which does wide range of tasks in Unity Editor and even in a running game compiled to any platform. It connects to AI using TCP connection, that is why it is so flexible.
Features for a human
- ✅ Few clicks installation
- ✅ Chat with AI like with a human
- ✅ Wide range of default AI tools
- ✅ Use
Description
attribute in C# code to provide detailed information forclass
,field
,property
ormethod
. - ✅ Customizable reflection convertors, inspired by
System.Text.Json
convertors- do you have something extremely custom in your project? Make custom reflection convertor to let LLM be able to read and write into that data
- ✅ Remote AI units setup using docker containers,
- make a team of AI workers which work on your project simultaneously
Features for LLM
- ✅ Agent ready tools, find anything you need in 1-2 steps
- ✅ Instant C# code compilation & execution using
Roslyn
, iterate faster - ✅ Assets access (read / write), C# scripts access (read / write)
- ✅ Well described positive and negative feedback for proper understanding of an issue
- ✅ Provide references to existed objects for the instant C# code using
Reflection
- ✅ Get full access to entire project data in a readable shape using
Reflection
- ✅ Populate & Modify any granular piece of data in the project using
Reflection
- ✅ Find any
method
in the entire codebase, including compiled DLL files usingReflection
- ✅ Call any
method
in the entire codebase usingReflection
- ✅ Provide any property into
method
call, even if it is a reference to existed object in memory usingReflection
and advanced reflection convertors - ✅ Unity API instantly available for usage, even if Unity changes something you will get fresh API using
Reflection
. - ✅ Get access to human readable description of any
class
,method
,field
,property
by reading it'sDescription
attribute.
Stability status
Unity Version | Editmode | Playmode | Standalone |
---|---|---|---|
2022.3.61f1 | |||
2023.2.20f1 | |||
6000.0.46f1 |
Requirements
Important
Project path cannot contain spaces
- ✅
C:/MyProjects/Project
- ❌
C:/My Projects/Project
Install MCP client
Choose MCP client you prefer, don't need to install all of them. This is will be your main chat window to talk with LLM.
- GitHub Copilot in VS Code
- Cursor
- Claude Desktop
- Claude Code
- Windsurf
- Any other supported
MCP protocol is quite universal, that is why you may any MCP client you prefer, it will work as smooth as anyone else. The only important thing, that the MCP client has to support dynamic tool update.
👉 Installation
Option 1: Install .unitypackage
installer
- ⬇️ Download the Installer ⬇️
- 📂 Open the installer into Unity project 📂
- You may use double click on the file - Unity will open it
- OR: You may open Unity Editor first, then click on
Assets/Import Package/Custom Package
, then choose the file
Option 2: Using OpenUPM
This option is recommended for people well familiar with command line and probably with the NPM package managers.
- Install OpenUPM-CLI
- Open command line in Unity project folder
- Run the command
👉 Configure MCP client
🟢 Step 1 Open AI Connector
window
Open Unity project, go 👉 Window/AI Connector (Unity-MCP)
.
🟢 Step 2: Click Configure
at your MCP client
If MCP client is not in the list, use the raw JSON below in the window, to inject it into your MCP client. Read instructions for your MCP client how to do that.
👉 Talk to LLM
Make sure
Agent
mode is turned on in MCP client
How it works
Unity-MCP is a bridge between LLM and Unity. It exposes and explains to LLM Unity's tools. LLM understands the interface and utilizes the tools in the way a user asks.
Connect Unity-MCP to LLM client such as Claude or Cursor using integrated AI Connector
window. Custom clients are supported as well.
The project is designed to let developers to add custom tools soon. After that the next goal is to enable the same features in player's build. For not it works only in Unity Editor.
The system is extensible: you can define custom tool
s directly in your Unity project codebase, exposing new capabilities to the AI or automation clients. This makes Unity-MCP a flexible foundation for building advanced workflows, rapid prototyping, or integrating AI-driven features into your development process.
Advanced MCP server setup
Unity-MCP server supports many different launch options and docker docker deployment. Both transport protocol are supported http
and stdio
. Read more...
Add custom tool
⚠️ It only works with MCP client that supports dynamic tool list update.
Unity-MCP is designed to support custom tool
development by project owner. MCP server takes data from Unity plugin and exposes it to a Client. So anyone in the MCP communication chain would receive the information about a new tool
. Which LLM may decide to call at some point.
To add a custom tool
you need:
- To have a class with attribute
McpPluginToolType
. - To have a method in the class with attribute
McpPluginTool
. - [optional] Add
Description
attribute to each method argument to let LLM to understand it. - [optional] Use
string? optional = null
properties with?
and default value to mark them asoptional
for LLM.
Take a look that the line
MainThread.Instance.Run(() =>
it allows to run the code in Main thread which is needed to interact with Unity API. If you don't need it and running the tool in background thread is fine for the tool, don't use Main thread for efficiency purpose.
Add custom in-game tool
⚠️ Not yet supported. The work is in progress
Running PlayMode tests
To be able to run Play Mode tests via the TestRunner MCP tool, you should consider configuring Unity to not perform a domain reload when entering Play Mode (Edit -> Project Settings -> Editor -> Enter Play Mode Settings
- set to Reload Scene only
or Do not reload Domain or Scene
). Otherwise, starting the Play Mode tests will interrupt the TestRunner MCP tool, leading to a cycle of tests restarting.
Contribution 💙💛
Contribution is highly appreciated. Brings your ideas and lets make the game development as simple as never before! Do you have an idea of a new tool
, feature or did you spot a bug and know how to fix it.
- 👉 Fork the project
- Clone the fork and open the
./Unity-MCP-Plugin
folder in Unity - Implement new things in the project, commit, push it to GitHub
- Create Pull Request targeting original Unity-MCP repository,
main
branch.
This server cannot be installed
Seamless automation and intelligent control over your Unity projects. By integrating with the MCP server and client, it allows AI agents or external tools to interact with your Unity environment—creating, modifying, and managing GameObjects, Components, Assets, Scenes, and more.
Related MCP Servers
- AsecurityAlicenseAqualityMCP Unity Server to integrate Unity Editor game engine with different AI Model clients (e.g. Claude Desktop, Windsurf, Cursor)Last updated -5901MIT License
- -securityAlicense-qualityA Unity Master Control Protocol implementation that allows AI agents to control and interact with Unity, enabling them to execute code, query editor state, modify GameObjects, and capture screenshots through a WebSocket-based communication system.Last updated -7MIT License
- -securityFlicense-qualityUnreal-Blender MCP is a unified server for controlling both Blender and Unreal Engine via AI agents using the MCP (Machine Control Protocol) approach.Last updated -5Python
- -securityAlicense-qualityAn MCP server that bridges AI agents with GUI automation capabilities, allowing them to control mouse, keyboard, windows, and take screenshots to interact with desktop applications.Last updated -8PythonMIT License