Unity MCP logo

Unity MCP

by IvanMurzak

Unity MCP (Server + Plugin) provides an AI gate to Unity Editor and Unity player's build. It supports custom tools within a Unity project, allowing interaction with the Unity API through an MCP client.

View on GitHub

Last updated: N/A

What is Unity MCP?

Unity MCP is a server and plugin combination that allows AI to interact with the Unity Editor and built Unity players. It enables the creation and execution of custom tools within Unity, making it possible to automate tasks and control the editor through AI clients.

How to use Unity MCP?

  1. Install .NET 9.0 and OpenUPM-CLI. 2. Add the package 'com.ivanmurzak.unity.mcp' to your Unity project using OpenUPM. 3. Print the server configuration from the Unity Editor menu (Tools/Unity-MCP/Server/Print Config). 4. Copy the JSON string and insert it into your MCP Client app's configuration file (e.g., Claude desktop).

Key features of Unity MCP

  • AI-driven Unity control

  • Custom tool support

  • GameObject manipulation (create, destroy, find)

  • Component management (add, remove, get)

  • Prefab instantiation

  • Asset searching

  • Scene hierarchy retrieval

Use cases of Unity MCP

  • Automated scene creation

  • AI-assisted asset management

  • Automated testing

  • Procedural content generation

  • Remote control of Unity editor

FAQ from Unity MCP

What is the purpose of Unity MCP?

It allows AI to interact with and control the Unity Editor and built Unity players.

How do I install Unity MCP?

Install .NET 9.0, OpenUPM-CLI, and then add the 'com.ivanmurzak.unity.mcp' package using OpenUPM.

How do I configure the MCP server?

Print the server configuration from the Unity Editor menu and insert the JSON string into your MCP Client app's configuration file.

Can I add my own custom tools?

Yes, you can add custom tools by creating classes with the 'McpPluginToolType' attribute and methods with the 'McpPluginTool' attribute.

What Unity versions are supported?

The README shows support for Unity versions 2022.3.61f1, 2023.2.20f1, and 6000.0.46f1.