A Unity Editor integration that lets AI assistants control your game development workflow through WebSocket connections. Exposes Unity's Editor APIs for scene manipulation, GameObject inspection, and real-time C# code execution, plus comprehensive filesystem operations for reading and editing project files. You can browse scene hierarchies, monitor console logs, control play mode, and even make targeted code changes with diff previews. Particularly useful when you want Claude or other AI assistants to understand your Unity project structure, debug issues, or help with rapid prototyping by directly executing editor commands and manipulating assets.
This package provides a seamless integration between Model Context Protocol (MCP) and Unity Editor, allowing AI assistants to understand and interact with your Unity projects in real-time. With this integration, AI assistants can access information about your scene hierarchy, project settings, and execute code directly in the Unity Editor context.
You have several options to install the Unity package:
Option A: Package Manager (Git URL)
Window > Package Manager)+ button and select Add package from git URL...https://github.com/quazaai/UnityMCPIntegration.gitAddOption B: Import Custom Package
Assets > Import Package > Custom PackageUnityMCPIntegration.unitypackage fileYou have two options to run the MCP server:
Option A: Run the server directly
mcpServer (likely <path-to-project>\Library\PackageCache\com.quaza.unitymcp@d2b8f1260bca\mcpServer\) directorynpm install
node build/index.js
Option B: Add to MCP Host configuration
Add the server to your MCP Host configuration for Claude Desktop, Custom Implementation etc
{
"mcpServers": {
"unity-mcp-server": {
"command": "node",
"args": [
"path-to-project>\\Library\\PackageCache\\com.quaza.unitymcp@d2b8f1260bca\\mcpServer\\mcpServer\\build\\index.js"
],
"env": {
"MCP_WEBSOCKET_PORT": "5010"
}
}
}
}
To install Unity MCP Integration for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @quazaai/unitymcpintegration --client claude
You can open the MCP Debug window in Unity to monitor the connection and test features:
Window > MCP DebugThe Unity MCP integration provides several tools to AI assistants:
File paths can be absolute or relative to the Unity project's Assets folder. For example, "Scenes/MyScene.unity" refers to <project>/Assets/Scenes/MyScene.unity.
The integration consists of two main components:
Communication between them happens via WebSocket, transferring JSON messages for commands and data.
The Unity MCP integration now includes powerful filesystem tools that allow AI assistants to:
All file operations are restricted to the Unity project directory for security. The system intelligently handles both absolute and relative paths, always resolving them relative to your project's Assets folder for convenience.
Example usages:
list_directory(path: "Scenes")read_file(path: "Scripts/Player.cs")edit_file(path: "Resources/config.json", edits: [{oldText: "value: 10", newText: "value: 20"}], dryRun: true)find_assets_by_type(assetType: "Material")Contributions are welcome! Here's how you can contribute:
git checkout -b feature/amazing-feature)git commit -m 'Add some amazing feature')git push origin feature/amazing-feature)Unity Side:
UnityMCPConnection/Editor directoryServer Side:
mcpServer directorynpm installsrc directorynpm run buildnode build/index.jsThis project is licensed under the MIT License - see the LICENSE file for details.
If you encounter any issues or have questions, please file an issue on the GitHub repository.
miapre/html-to-figma-design-system
ie3jp/illustrator-mcp-server
coding-solo/godot-mcp
ivanmurzak/unity-mcp
yctimlin/mcp_excalidraw
figma/mcp-server-guide