Skip to main content
Glama

Union Unity MCP Server

by nurture-tech

Union ♾️ - The Unity MCP Server

A Model Context Protocol server for Unity

Doki Delivery Airship

Key Features

  • πŸ–ΌοΈ Multimodal Vision: Your agent can see what you see. It can view the scene, look through any camera, watch play mode, and inspect asset thumbnails.

  • πŸ”Ž Powerful Search: Go beyond the project panel with simultaneous search across the hierarchy and project assets.

  • βœ”οΈ Superior Code Analysis: Leverage Unity's own compiler for code analysis that is more accurate than your agent's linter.

  • ⏩ Quick Start: Get running in seconds with a single mcp.json configuration file.

  • πŸ› οΈ Extensible: Add your own project-specific tools with minimal boilerplate.

  • πŸ“… Always Current: Kept up-to-date with the latest MCP protocol version β€” currently 2025-06-18 via the Official MCP C# SDK.

Compatibility

Name

Compatible

Notes

Models

GPT-4.1

βœ…

Claude 4 Sonnet

βœ…

Claude 4 Opus

βœ…

Gemini 2.5 Pro

βœ…

Gemini 2.5 Flash

βœ…

o3

βœ…

No image understanding

o4-mini

βœ…

Unity Versions

Unity 6000.0.x

βœ…

Higher versions should be fine. Lower versions may work but untested.

Agents

Cursor

βœ…

Rider AI

βœ…

Claude Desktop

βœ…

Claude Code

βœ…

Terminal requires Screen & System Audio Recording permissions on Mac

Operating Systems

Windows

βœ…

Mac

βœ…

Ubuntu

❔

Untested

Setup

1. Install node.js

2. Configure mcp.json

{ "mcpServers": { "unity": { "command": "npx", "args": ["-y", "@nurture-tech/unity-mcp-runner", "-unityPath", "<path to unity editor>", "-projectPath", "<path to unity project>"] } } }

This will automatically install the is.nurture.mcp package in your unity project. Feel free to commit those changes to source control.

About the Tools

Meet your Unity AI toolbox.

Tool

Description

Assets

get_asset_contents

Get the full contents of an asset or sub-asset.

copy_asset

Copy an asset to a new path.

import_asset

Import an asset from the filesystem into Unity.

get_asset_importer

Get the importer settings for an asset.

Prefabs

open_prefab

Open a Unity prefab in isolation mode so that it can be edited.

Scenes

open_scene

Open a scene

close_scene

Close an open scene

save_scene

Save the current scene. If the scene is not dirty, this will do nothing.

get_game_object

Get the details of a game object in a loaded scene or prefab by its hierarchy path.

test_active_scene

Test the active scene by entering play mode and running for a given number of seconds.

Scripting

create_script

Create or replace a C# code file at the given path. This also checks to make sure the script compiles.

execute_code

Execute code inside the Unity editor.

get_type_info

Get public fields and methods on a Unity fully qualified type name, including the assembly.

Search

search

Search project assets and scene objects.

Editor State

get_state

Get the state of the Unity Editor.

get_selection

Get the objects the user has currently selected in the editor.

Vision

focus_game_object

Focus on a game object in the scene view.

screenshot

Retrieve a preview of what is focused in the scene view.

Known Issues

  • The Google External Dependency Manager (EDMU) causes Unity to hang forever on startup when launched via Cursor on Windows. This is under investigation.

  • The test_active_scene tool sometimes fails with the error message Maximum call stack size exceeded.

  • The search tool occasionally fails with the error message Search index is not ready yet. Please try again later.

Adding Project-Specific Tools

Union uses the official C# MCP SDK.

  1. Create a static class to hold your tools. Add the [McpServerToolType] annotation to the class.

  2. Declare static methods to implement each tool. Add the [McpServerTool] annotation to each method.

  3. Reference the Services directory for examples.

  4. You will likely need to quit unity and restart your agent in order for it to see the new tools.

Usage Tips

Here are some tips to get the most out of Union:

  • πŸš€ Launch through your agent: Always launch Unity through your AI agent's MCP integration. Launching Unity from the Hub will prevent the MCP server from connecting.

  • πŸ“‚ Per-project setup: If your agent supports it, configure the MCP server in your per-project settings. This allows you to seamlessly switch between Unity projects.

  • βš™οΈ Command-line arguments: You can pass additional arguments to Unity for advanced scenarios like running in -batchmode or -nographics for CI/CD pipelines. Add a -- separator before the Unity-specific arguments:

    { "mcpServers": { "unity": { "command": "npx", "args": [ "-y", "@nurture-tech/unity-mcp-runner" "-unityPath", "<path to unity editor>", "-projectPath", ".", "--", "-batchmode", "-nographics" ] } } }
  • ⚠️ Important: Do not use the -logFile command-line argument. The MCP server relies on Unity's standard output for communication.

  • πŸ–₯️ Split screen for vision: For tools like screenshot, ensure the Unity editor is visible on your screen otherwise it will end up screenshotting the foreground window.

-
security - not tested
A
license - permissive license
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

Enables AI agents to interact with Unity projects through multimodal vision, code analysis, asset management, and scene manipulation. Supports real-time Unity editor control, project search, script creation, and visual debugging through screenshots.

  1. Key Features
    1. Compatibility
      1. Setup
        1. 1. Install node.js
        2. 2. Configure mcp.json
      2. About the Tools
        1. Known Issues
          1. Adding Project-Specific Tools
            1. Usage Tips

              Related MCP Servers

              • -
                security
                A
                license
                -
                quality
                A Unity Master Control Protocol implementation that allows AI agents to control and interact with Unity, enabling them to execute code, query editor state, modify GameObjects, and capture screenshots through a WebSocket-based communication system.
              • -
                security
                A
                license
                -
                quality
                A server that enables AI assistants to understand and interact with Unity projects in real-time, providing access to scene hierarchy, project settings, and the ability to execute code directly in the Unity Editor.
                Last updated -
                93
                MIT License
                • Linux
                • Apple
              • -
                security
                F
                license
                -
                quality
                A protocol server that bridges AI assistants with Unity projects, allowing them to analyze code, parse scenes, generate scripts, and perform other Unity operations through specialized tools.
              • A
                security
                A
                license
                A
                quality
                A bridge between Unity and AI assistants that enables AI to interact with Unity game environments through a standardized interface for code execution, scene analysis, and runtime debugging.
                Last updated -
                3
                15
                3
                MIT License

              View all related MCP servers

              MCP directory API

              We provide all the information about MCP servers via our MCP API.

              curl -X GET 'https://glama.ai/api/mcp/v1/servers/nurture-tech/unity-mcp-server'

              If you have feedback or need assistance with the MCP directory API, please join our Discord server