Unity MCP (Server + Plugin)
| Unity Version | Editmode | Playmode | Standalone |
|---|---|---|---|
| 2022.3.61f1 | |||
| 2023.2.20f1 | |||
| 6000.0.46f1 |
Unity-MCP acts as an AI-powered gateway between your Unity Editor and LLM, enabling 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.
The system is extensible: you can define custom tools 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.
AI Tools
GameObject
Component
Prefabs
Editor
| Assets
Scene
Materials
Scripts
|
Legend: ✅ = Implemented & available 🔲 = Planned / Not yet implemented
Installation
- Install .NET 9.0
- Install OpenUPM-CLI
- Open command line in Unity project folder
- Run the command
openupm add com.ivanmurzak.unity.mcp
Usage
- Go 👉
Window/AI Connector (Unity-MCP). - Click configure on your MCP client.
- Restart your MCP client.
- Make sure
AI Connectoris “Connected” after restart.
Add custom tool
⚠️ Not yet supported. There is a blocker issue in
csharp-sdkfor MCP server. Waiting for solution.
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
Descriptionattribute to each method argument to let LLM to understand it. - [optional] Use
string? optional = nullproperties with?and default value to mark them asoptionalfor LLM.
Take a look that the line
=> MainThread.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 efficience purpose.
[McpPluginToolType]
public class Tool_GameObject
{
[McpPluginTool
(
"GameObject_Create",
Title = "Create a new GameObject",
Description = "Create a new GameObject."
)]
public string Create
(
[Description("Path to the GameObject (excluding the name of the GameObject).")]
string path,
[Description("Name of the GameObject.")]
string name
)
=> MainThread.Run(() =>
{
var targetParent = string.IsNullOrEmpty(path) ? null : GameObject.Find(path);
if (targetParent == null && !string.IsNullOrEmpty(path))
return $"[Error] Parent GameObject '{path}' not found.";
var go = new GameObject(name);
go.transform.position = new Vector3(0, 0, 0);
go.transform.rotation = Quaternion.identity;
go.transform.localScale = new Vector3(1, 1, 1);
if (targetParent != null)
go.transform.SetParent(targetParent.transform, false);
EditorUtility.SetDirty(go);
EditorApplication.RepaintHierarchyWindow();
return $"[Success] Created GameObject '{name}' at path '{path}'.";
});
}
Contribution
Feel free to add new tool into the project.
- Fork the project.
- Implement new
toolin your forked repository. - Create Pull Request into original Unity-MCP repository.
Ivan Murzak
Project Details
- IvanMurzak/Unity-MCP
- MIT License
- Last Updated: 4/18/2025
Recomended MCP Servers
MCP server for Readwise
Model Context Protocol (MCP) server that interacts with a Language Server
An advanced sequential thinking process using a Multi-Agent System (MAS) built with the Agno framework and served via...
A Model Context Protocol server for retrieving and analyzing issues from Sentry.io
Webflow MCP server
An MCP server for unconventional and boundary-breaking problem-solving through an advanced note-taking system.
MCP Server for AI Agent Marketplace Index from DeepNLP
py-mcp-mssql





