Get the FREE Ultimate OpenClaw Setup Guide →

UnityMCPIntegration

Enable AI Agents to Control Unity

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio quazaai-unitymcpintegration node path-to-project>\\Library\\PackageCache\\com.quaza.unitymcp@d2b8f1260bca\\mcpServer\\mcpServer\\build\\index.js \
  --env MCP_WEBSOCKET_PORT="5010"

How to use

This MCP server provides a Unity-specific integration that bridges Unity Editor capabilities with AI agents via the Model Context Protocol (MCP). The server implements an MCP protocol layer in Node.js and exposes a suite of tools that let an AI assistant query Unity editor state, inspect the scene, manipulate game objects, and execute C# code directly in the Unity Editor. It also offers filesystem tools to read, write, and modify files within the Unity project, browse directories, and search for assets. Users interact with the server through WebSocket messages and use the provided commands to request data or perform actions in real-time within Unity.

How to install

Prerequisites:

  • Unity 2021.3 or later
  • Node.js 18+ (for running the MCP server)

Installation options:

Option A: Run the server directly

  1. Open a terminal and navigate to the mcpServer directory inside the Unity package cache, for example: path-to-project\Library\PackageCache\com.quaza.unitymcp@d2b8f1260bca\mcpServer
  2. Install dependencies:
npm install
  1. Start the server:
node build/index.js

Option B: Add to MCP Host configuration Add the server to your MCP Host configuration for Claude Desktop, Custom Implementations, 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"
      }
    }
  }
}

Installing via Smithery:

npx -y @smithery/cli install @quazaai/unitymcpintegration --client claude

Additional notes

Notes:

  • The MCP_WEBSOCKET_PORT environment variable defines the port used by the WebSocket server. If you already run another MCP server on port 5010, choose a different port.
  • File paths in Unity are resolved relative to the Unity project's Assets folder for security. When specifying paths in commands, prefer relative Unity project paths (e.g., Assets/Scenes/MyScene.unity).
  • The server command assumes the standard Unity MCP package path; if your project uses a different package version, adjust the path accordingly.
  • To debug, use the MCP Debug window in Unity (Window > MCP Debug) to inspect the connection, test code execution, view logs, and monitor events.

Related MCP Servers

Sponsor this space

Reach thousands of developers