Sandbox
@codemaestroai/advanced-unity-mcp

MCP connector for Unity Editor control

Advanced Unity MCP connects the Unity Editor to AI assistants through MCP. It provides a dashboard in Unity, then routes commands either directly to the Code Maestro desktop app or through a relay server for other clients.

93 stars10 forksUpdated 5mo ago
Advanced MCP Integration for Unity - Powered by Code Maestro
Code Maestro1.1k views • 1 year ago
Who it's for

Builders who want to run Unity actions from Cursor, Copilot, Windsurf, or another MCP client.

What it delivers

You can ask an agent to change Unity scenes, assets, and builds instead of clicking through the editor.

What it does

Editor control

Play, pause, stop, run menu items, and read or clear console messages from an AI client.

Scene and asset actions

Create, change, and delete materials, prefabs, scripts, scenes, and GameObjects.

Build and platform tools

Switch build targets, build projects, and work with Android Debug Bridge operations.

Project configuration

Manage Unity packages, project settings, PlayerPrefs, and external tools from the editor.

Connection modes

Uses direct connection for the Code Maestro desktop app and a relay server for other MCP clients.

How to get it

  1. 1For Unity 2020-2022
    https://github.com/codemaestroai/advanced-unity-mcp.git?path=Unity2020_2022
  2. 2For Unity 6+
    https://github.com/codemaestroai/advanced-unity-mcp.git?path=Unity6

README

Advanced Unity MCP from Code Maestro

Control Unity with AI through natural language commands.

Instead of clicking through menus and manually setting up GameObjects, just tell your AI assistant what you want and watch it happen automatically.

"Create a red material and apply it to a cube"
"Build the project for Android" 
"Make a new scene with a camera and directional light"

Watch the video

Watch the video

Quick Start

1. Install the Package

Unity Package Manager → Add package from git URL for the version of Unity you are using

For Unity 2020-2022

https://github.com/codemaestroai/advanced-unity-mcp.git?path=Unity2020_2022

For Unity 6+

https://github.com/codemaestroai/advanced-unity-mcp.git?path=Unity6

2. Connect Your AI

  • Go to Code Maestro > MCP Dashboard in Unity.
  • For Code Maestro Desktop App: Select the "Code Maestro Desktop App" connection mode. The connection is automatic, and the dashboard will show the connection status.
  • For other clients (VS Code, Cursor, etc.): Select the "Other Clients" connection mode, then click Configure next to your preferred client.
  • Start giving commands!

Supported MCP Clients:

  • Code Maestro Desktop App (uses Direct Connection)
  • GitHub Copilot (VS Code)
  • Cursor
  • Windsurf
  • Claude Desktop
  • ...and any other MCP-capable copilot.

Clients other than the Code Maestro Desktop App use the Relay Server connection, which is installed automatically.

What Unity MCP Can Do

Core Editor Control - Play/pause/stop game, execute menu items, read/clear console messages
Asset & Scene Management - Create/modify/delete materials, prefabs, scripts, manage scenes and GameObjects
Build & Platform Tools - Build settings, platform switching, Android Debug Bridge operations
Project Configuration - Unity packages, project settings, PlayerPrefs, external tools
Performance Analysis - Unity Profiler control for performance bottlenecks

Examples

  • "Check the console for any errors"
  • "Create a script called PlayerMovement with WASD controls"
  • "Switch the build target to iOS"
  • "Add a rigidbody component to the selected object"
  • "Create a new material with metallic properties"
  • "Save the current GameObject as a prefab"
  • "Clear all console messages and check for warnings"

How It Works

Unity MCP bridges your Unity Editor with AI assistants using the Model Context Protocol. It supports two connection modes, which can be selected in the MCP Dashboard:

  • Direct Connection (for Code Maestro Desktop App): This is the recommended mode for Code Maestro users. The Unity Editor connects directly to the Code Maestro Desktop App's central hub. This method is faster and doesn't require a separate relay server.

    • Unity MCP Connector: Runs inside the Unity Editor to manage the connection.
  • Relay Server Connection (for other clients): For clients like VS Code or Cursor, the bridge uses a local TCP server and a relay server.

    • Bridge Server: Runs in the Unity Editor and provides API access over a local TCP port.
    • Relay Server: A small background process that handles communication between the AI client and the Unity Bridge Server. It is installed automatically.

The setup is automatic. Simply choose your connection mode in the dashboard.

💡 Tip: When multiple Unity projects are open, your AI assistant will automatically connect to the most recently opened Unity Editor instance.

Requirements

  • Unity 2022+
  • MCP Client (Such as GitHub Copilot or Cursor)

Made by Code MaestroJoin our DiscordReport IssuesLicense

Files in the repo

Repository payload4 top-level entries
  • Unity2020_2022
  • Unity6
  • LICENSE
  • README.md

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More connectors

High-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph — average repo in milliseconds. 158 languages, sub-ms queries, 99% fewer tokens. Single static binary, zero dependencies.

43k

Universal provider proxy for OpenAI Codex & Claude Code — use any LLM (Claude, Gemini, Grok, DeepSeek, Ollama…) with Codex CLI, App, SDK, and Claude Code

14k
okf-memory/
okf-agent-memory

Git-native persistent memory for AI coding agents. Implements Google OKF v0.2 with sub-300µs in-memory BM25 search, embedded MCP server, and progressive disclosure. Slashes token bloat by 80% with zero external databases or dependencies. Built in pure Go.

547
tirth8205/
code-review-graph

Local-first code intelligence graph for MCP and CLI. Builds a persistent map of your codebase so AI coding tools read only what matters, with benchmarked context reductions on reviews and large-repo workflows.

31k
2akouwu/
reverify

Stop your AI from making things up — it proposes, deterministic tools decide, every claim checked against ground truth with evidence. Grounded facts and context survive resets. Reverse engineering is the proving ground. MCP server + CLI.

1.1k
t8y2/dbxConnectors

20 MB lightweight cross-platform database client for 90+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 90+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP Server。

19k