The Unity MCP Integration package allows AI assistants to interact with Unity projects in real-time, providing access to scene hierarchies, project settings, and the ability to execute code directly in the Unity Editor environment.
Option A: Via Package Manager (Git URL)
Window > Package Manager
)+
button and select Add package from git URL...
https://github.com/quazaai/UnityMCPIntegration.git
Add
Option B: Import Custom Package
Assets > Import Package > Custom Package
UnityMCPIntegration.unitypackage
fileOption A: Run the server directly
mcpServer
directory (typically located at <path-to-project>\Library\PackageCache\com.quaza.unitymcp@d2b8f1260bca\mcpServer\
)npm install
node build/index.js
Option B: Add to MCP Host configuration Add the server to your MCP Host configuration for Claude Desktop or custom implementations:
{
"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
Monitor the connection and test features with the MCP Debug window:
Window > MCP Debug
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
.
Example filesystem operations:
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")
All file operations are restricted to the Unity project directory for security purposes.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.