Get the FREE Ultimate OpenClaw Setup Guide →

Unity

AI-powered bridge connecting LLMs and advanced AI agents to the Unity Editor via the Model Context Protocol (MCP). Chat with AI to generate code, debug errors, and automate game development tasks directly within your project.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio ivanmurzak-unity-mcp docker run -i ivanmurzakdev/unity-mcp-server

How to use

Unity MCP is a server that allows you to interact with Unity-powered AI tooling directly through the MCP (Model Context Protocol) ecosystem. This server enables AI-driven workflows inside Unity, including running MCP tools to automate editor tasks, generate scripts, create scenes, and debug runtime behavior via AI agents and in-game interactions. You can connect compatible MCP clients (such as Claude-based assistants, Cursor, or Windsurf) to chat with AI, issue commands, and have the AI perform actions inside the Unity Editor or at runtime in a built game. The server is designed to work both locally (stdio) and remotely (http), depending on your deployment setup.

To use it, deploy the server (the recommended path is via Docker using the provided image), then configure your MCP client to point at the server. In Unity, you install the Unity MCP plugin, open Window > AI Game Developer — MCP, and configure the client to connect to the running server. Once connected, you can ask the AI to perform tasks such as creating game objects, importing assets, adjusting scenes, or writing and running code and tests within Unity. The plugin ships with a large set of built-in MCP tools for common editor tasks, and you can extend it by adding custom MCP tools in your project code.

The tools are categorized into project/asset management, scene hierarchy manipulation, code generation, testing, and runtime debugging. Examples include creating assets, duplicating objects, modifying components, running package manager commands, and launching in-game AI conversations for debugging or behavior prototyping. The system supports natural language style prompts and structured tool usage, enabling rapid iteration of levels, NPC behavior, and AI-assisted development inside the Unity environment.

How to install

Prerequisites:

  • Docker installed and running on your machine
  • Stable internet connection to pull the Unity MCP Docker image

Step 1: Pull and run the Unity MCP Docker image

  • Ensure Docker is running
  • Start the MCP server with:
docker pull ivanmurzakdev/unity-mcp-server:latest
docker run -i ivanmurzakdev/unity-mcp-server:latest

Step 2: Configure an MCP client to connect

  • If your MCP client requires a URL/endpoint, use the default container behavior or set up port forwarding as needed (consult the client docs for HTTP vs stdio connections).
  • In Unity, install the Unity MCP plugin (via OpenUPM: openupm add com.ivanmurzak.unity.mcp or import the installer from the releases page).
  • Open Unity and go to Window > AI Game Developer — MCP and configure the server endpoint to the address exposed by the Docker container (for local dev this may be http://localhost:port or the stdio pipe depending on your setup).

Step 3: Verify connectivity

  • Use the Unity MCP UI to start a sample task, e.g., ask the AI to generate three cubes in a circle, and confirm that the objects appear in the scene.
  • If you encounter connection issues, check Docker logs, ensure the port is exposed, and verify that the Unity plugin is configured to the correct endpoint.

Additional notes

Tips and common issues:

  • If using Docker, you may need to map ports when using HTTP-based clients (e.g., -p 8080:8080 in the docker run command).
  • The Unity MCP plugin ships with 50+ built-in tools; you can rely on them out of the box or add custom tools to your project code for specialized tasks.
  • Ensure your Unity project is compatible with the MCP tools and that the plugin version matches the server expectations.
  • Environment variables you may configure (placeholders):
    • MCP_ENDPOINT: The URL or socket path for the MCP server (e.g., http://localhost:8080)
    • MCP_CLIENT_TIMEOUT: Time in ms to wait for AI responses before timing out
    • UNITY_MCP_LOG_LEVEL: Logging level for the plugin (e.g., INFO, DEBUG)
  • If you need to run offline or inside a CI environment, explore the stdio mode or local HTTP endpoints as documented by the client you are using.

Related MCP Servers

Sponsor this space

Reach thousands of developers