MCP Unity Editor
by CoderGamester
MCP Unity is an implementation of the Model Context Protocol for Unity Editor, allowing AI assistants to interact with your Unity projects. It provides a bridge between Unity and a Node.js server, enabling AI agents to execute operations within the Unity Editor.
Last updated: N/A
What is MCP Unity Editor?
MCP Unity is a server that implements the Model Context Protocol (MCP) for the Unity Editor. It allows AI assistants to interact with and manipulate Unity projects by providing a set of tools and resources accessible through the MCP protocol.
How to use MCP Unity Editor?
To use MCP Unity, you need to install the Unity package, install Node.js, configure your AI LLM client to connect to the server, and start the server from the Unity Editor. Once the server is running, AI agents can use the provided tools and resources to interact with the Unity project.
Key features of MCP Unity Editor
IDE Integration with Package Cache Access
Execute Unity menu items
Select game objects in the Unity hierarchy
Update component fields on a GameObject
Install new packages in the Unity Package Manager
Run tests using the Unity Test Runner
Display messages in the Unity Editor
Add assets to the scene
Retrieve information about the Unity hierarchy, game objects, logs, packages, assets, and tests
Use cases of MCP Unity Editor
Automated scene creation
AI-assisted debugging
Automated testing
AI-driven content generation
Package management through AI commands
Automated code modification and refactoring
FAQ from MCP Unity Editor
How do I install the MCP Unity server?
How do I install the MCP Unity server?
Install the Unity MCP Server package via Unity Package Manager by adding the git URL: https://github.com/CoderGamester/mcp-unity.git
.
What are the requirements to run MCP Unity?
What are the requirements to run MCP Unity?
You need Unity 2022.3 or later, Node.js 18 or later, and npm 9 or later.
How do I start the Unity Editor MCP Server?
How do I start the Unity Editor MCP Server?
Open the Unity Editor, navigate to Tools > MCP Unity > Server Window, and click "Start Server".
How do I configure my AI LLM client?
How do I configure my AI LLM client?
You can configure it either through the Unity Editor (Tools > MCP Unity > Server Window) or manually by adding the server configuration to your AI client's configuration file.
What should I do if I have connection issues?
What should I do if I have connection issues?
Ensure the WebSocket server is running, check for firewall restrictions, and make sure the port number is correct. Try changing the port number in the Unity Editor MCP Server window.