Enables automation of Unity Editor tasks and game development workflows, allowing AI assistants to create GameObjects, run tests, build projects, and manipulate scenes.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Unity MCPcreate a cube at position (0, 5, 0) and name it 'SpawnPoint'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Unity MCP - AI Assistant Integration for Unity Editor
Model Context Protocol (MCP) server that enables AI assistants like Claude, Codex, and Cursor to automate Unity Editor tasks and game development workflows.
Why Use This Unity AI Plugin?
Zero telemetry - Completely private Unity automation. No data collection.
40+ built-in tools - Create GameObjects, run tests, build projects, manipulate scenes through AI.
Simple extension API - Add custom AI tools with a single attribute.
Requirements
Unity 6 or later
Any MCP client: Claude Code, Claude Desktop, Codex, Cursor, or other AI assistants
Installation
Download the latest release
Open Unity Package Manager
Click the
+buttonSelect "Add package from tarball"
Select the downloaded release!
Example: https://github.com/Bluepuff71/UnityMCP/releases/download/2025.01.25/UnityMCP-2025.01.25.tgz
Setup
Claude Code
Claude Desktop
Add this to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Restart Claude Desktop after saving.
Other MCP Clients (Codex, Cursor, etc.)
Unity MCP runs an HTTP server at http://localhost:8080/. Any MCP client with HTTP transport support can connect directly. For stdio-only clients, use the mcp-remote bridge as shown above.
Note: Configurations for clients other than Claude Code have not been tested. Open a PR!
How Unity Editor Automation Works
Unity MCP uses a native C plugin to maintain an HTTP server on a background thread, independent of Unity's C# scripting domain. This architecture ensures the AI assistant connection remains active during script recompilation.
When Unity recompiles scripts, the C# domain unloads temporarily. During this time, the native plugin continues accepting HTTP requests but returns a "Unity is recompiling" error instead of disconnecting. Once recompilation completes, requests are forwarded to Unity's main thread for execution.
Adding Custom AI Tools
Create a static method and mark it with [MCPTool]:
Tools are automatically discovered on domain reload. No registration needed.
Adding Custom Resources
Resources expose read-only data to AI assistants. Use [MCPResource]:
Resources use URI patterns (e.g., unity://player/stats) and are read via resources/read.
License
GPLv3 - see LICENSE file for details.