Acts as a bridge to the Unity Editor, enabling AI clients to interact with and control Unity projects programmatically.
MCP For Unity
This project implements a Model Context Protocol (MCP) server that acts as a bridge to the Unity Editor.
Structure
Server/: Contains the Python MCP server that AI clients connect to.
Scripts/: Contains the Unity C# scripts.
package.json: Unity Package definition file.
Installation
1. Unity Setup (via Package Manager)
You can install the Unity integration directly from GitHub using the Unity Package Manager.
Open Unity.
Go to Window > Package Manager.
Click the + button in the top-left corner.
Select Add package from git URL....
Enter the following URL:
https://github.com/yunuscan/MCPForUnity.gitClick Add.
2. Python Server Setup
Install dependencies:
pip install -r Server/requirements.txtRun the server:
python Server/server.py
Usage
Ensure the Unity project is open and the package is installed. You should see
[UnityMCP] Server started...in the Unity Console.Run the Python server.
Connect your AI client (e.g., Claude Desktop, Cursor) to the MCP server.