Get the FREE Ultimate OpenClaw Setup Guide →

mcp -unity

Model Context Protocol (MCP) server for Unity - enables Claude to interact with Unity projects

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio zabaglione-mcp-server-unity node /path/to/mcp-server-unity/build/simple-index.js

How to use

Unity MCP Server lets Claude interact with your Unity projects through natural language. You can ask Claude to create scripts that follow Unity patterns, generate or adjust shaders compatible with Built-in, URP, and HDRP pipelines, and organize your project folders for better structure. You can also query essential project information, such as the Unity version and active render pipeline. With the provided server integration, Claude executes safe, asset-aware changes within your Unity project, giving you hands-free automation while preserving Unity project integrity.

How to install

Prerequisites:

  • Node.js and npm installed on your machine
  • A Unity project to connect to (Unity 2019.4 or newer recommended)

Manual installation steps:

  1. Clone the repository and install dependencies
    git clone https://github.com/zabaglione/mcp-server-unity.git
    cd mcp-server-unity
    npm install
    
  2. Build the server bundle
    npm run build
    
  3. Configure Claude Desktop to use the Unity MCP server by adding the server entry
    {
      "mcpServers": {
        "unity": {
          "command": "node",
          "args": ["/path/to/mcp-server-unity/build/simple-index.js"]
        }
      }
    }
    
  4. Start using Claude and point it to your Unity project path as needed (e.g., set the project path when Claude requests it).

Optional: Install the Unity Newtonsoft JSON package in your project as described in the README to ensure smooth serialization.

Additional notes

Tips:

  • Ensure your Unity project contains an Assets folder and is a valid Unity project before connecting.
  • If Claude reports issues with server responsiveness, check that Node.js has access to the project path and that the build script was executed successfully.
  • The integration supports creating scripts, shaders, and folder structures; for complex shader or gameplay logic, review the generated assets to confirm they meet your project’s requirements.
  • No extra environment variables are required by default, but you can add debugging or API keys as needed in the env block of the mcp_config.

Related MCP Servers

Sponsor this space

Reach thousands of developers