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.
💬 Join our community: Discord Server - Ask questions, showcase your work, and connect with other developers!
- ✅ Chat with AI like with a human
- ✅ Local and Remote usage supported
- ✅
STDIO
andHTTP
protocols supported - ✅ 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
- ✅ 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.
Unity Version | Editmode | Playmode | Standalone |
---|---|---|---|
2022.3.61f1 | |||
2023.2.20f1 | |||
6000.2.3f1 |
Important
Project path cannot contain spaces
- ✅
C:/MyProjects/Project
- ❌
C:/My Projects/Project
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.
- Claude Code
- Claude Desktop
- GitHub Copilot in VS Code
- Cursor
- 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.
- ⬇️ Download Installer
- 📂 Import 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
Alternative: Install Unity Plugin
via OpenUPM
- Install OpenUPM-CLI
- Open command line in Unity project folder
- Run the command
openupm add com.ivanmurzak.unity.mcp
- Open Unity project
- Open
Window/AI Connector (Unity-MCP)
- 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.
If Automatic configuration doesn't work for you for any reason. Use JSON from AI Connector (Unity-MCP)
window to configure any MCP Client
on your own.
Add Unity-MCP to Claude Code
(Windows)
Replace unityProjectPath
with your real project path
claude mcp add Unity-MCP "<unityProjectPath>/Library/mcp-server/win-x64/unity-mcp-server.exe" client-transport=stdio
Add Unity-MCP to Claude Code
(MacOS Apple-Silicon)
Replace unityProjectPath
with your real project path
claude mcp add Unity-MCP "<unityProjectPath>/Library/mcp-server/osx-arm64/unity-mcp-server" client-transport=stdio
Add Unity-MCP to Claude Code
(MacOS Apple-Intel)
Replace unityProjectPath
with your real project path
claude mcp add Unity-MCP "<unityProjectPath>/Library/mcp-server/osx-x64/unity-mcp-server" client-transport=stdio
Add Unity-MCP to Claude Code
(Linux x64)
Replace unityProjectPath
with your real project path
claude mcp add Unity-MCP "<unityProjectPath>/Library/mcp-server/linux-x64/unity-mcp-server" client-transport=stdio
Add Unity-MCP to Claude Code
(Linux arm64)
Replace unityProjectPath
with your real project path
claude mcp add Unity-MCP "<unityProjectPath>/Library/mcp-server/linux-arm64/unity-mcp-server" client-transport=stdio
Talk with AI (LLM) in your MCP Client
. Ask it to do anything you want. As better you describe your task / idea - as better it will do the job.
Some MCP Clients
allow to chose different LLM models. Take an eye on it, some model may work much better.
Explain my scene hierarchy
Create 3 cubes in a circle with radius 2
Create metallic golden material and attach it to a sphere gameObject
Make sure
Agent
mode is turned on in MCP client
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.
Unity-MCP server supports many different launch options and docker docker deployment. Both transport protocol are supported http
and stdio
. Read more...
⚠️ 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.
[McpPluginToolType]
public class Tool_GameObject
{
[McpPluginTool
(
"MyCustomTask",
Title = "Create a new GameObject"
)]
[Description("Explain here to LLM what is this, when it should be called.")]
public string CustomTask
(
[Description("Explain to LLM what is this.")]
string inputData
)
{
// do anything in background thread
return MainThread.Instance.Run(() =>
{
// do something in main thread if needed
return $"[Success] Operation completed.";
});
}
}
⚠️ Not yet supported. The work is in progress
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.