Unity

SSE

by arodoid

415 Not rated yet

About

Enables real-time interaction with Unity Editor projects for tasks like automated level design, asset management, and debugging assistance through C# command execution and editor state retrieval.

Details

Repository
jackwrichards/UnityMCP
Transport
SSE

Explore

- Command execution timeout protection
- Error handling and validation
- Log buffer management
- Connection state monitoring

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Unity
    Command (node, npx, python, etc.) npx
    Arguments
    • Argument 1 -y
    • Argument 2 @highlight/mcp-server

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

- Unity 2022.3 or later
- Node.js 18 or later
- npm 9 or later

To install UnityMCP for Claude Desktop automatically via Smithery:

``bash
npx -y @smithery/cli install @Arodoid/unitymcp --client claude


1. Copy the
UnityMCPPlugin folder to your Unity project's Assets directory
2. Open Unity Editor
3. Access the plugin through Unity's top menu bar > UnityMCP > Debug Window

bash
cd unity-mcp-server
npm install
npm run build
``

get_editor_state

Retrieves current Unity Editor state including active GameObjects, selection state, play mode status, scene hierarchy, and project structure. Supports different output formats (Raw, scripts only, no scripts).

execute_editor_command

Executes C# code directly in the Unity Editor with full access to UnityEngine and UnityEditor APIs. Provides real-time execution with comprehensive error handling and command timeout protection.

get_logs

Retrieves and filters Unity Editor logs, supporting filtering by type, content, and timestamp. Offers customizable output fields and buffer management for optimal performance.

1. get_editor_state
- Retrieves current Unity Editor state
- Includes active GameObjects, selection state, play mode status
- Provides scene hierarchy and project structure
- Supports different output formats (Raw, scripts only, no scripts)

2. execute_editor_command
- Executes C# code directly in the Unity Editor
- Full access to UnityEngine and UnityEditor APIs
- Real-time execution with comprehensive error handling
- Command timeout protection

3. get_logs
- Retrieves and filters Unity Editor logs
- Supports filtering by type, content, and timestamp
- Customizable output fields
- Buffer management for optimal performance

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "unity": {
            "env": {},
            "args": [
                "-y",
                "@highlight/mcp-server"
            ],
            "command": "npx"
        }
    }
}

Linux

{
    "env": [],
    "args": [
        "-y",
        "@highlight/mcp-server"
    ],
    "command": "npx"
}

Macos

{
    "env": [],
    "args": [
        "-y",
        "@highlight/mcp-server"
    ],
    "command": "npx"
}

Windows

{
    "env": [],
    "args": [
        "/c",
        "npx",
        "-y",
        "@highlight/mcp-server"
    ],
    "command": "cmd"
}

2. MCP Server (unity-mcp-server)

A TypeScript-based MCP server that exposes Unity Editor functionality through standardized tools:
Available Tools
1. get_editor_state - Retrieves current Unity Editor state - Includes active GameObjects, selection state, play mode status - Provides scene hierarchy and project structure - Supports different output formats (Raw, scripts only, no scripts) 2. execute_editor_command - Executes C# code directly in the Unity Editor - Full access to UnityEngine and UnityEditor APIs - Real-time execution with comprehensive error handling - Command timeout protection 3. get_logs - Retrieves and filters Unity Editor logs - Supports filtering by type, content, and timestamp - Customizable output fields - Buffer management for optimal performance
No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.

Videos about Unity

Relevant YouTube tutorials, setups, and demos