MCP for Unity logo

MCP for Unity

OrganizationPopular
CoplayDev

Unity MCP acts as a bridge, allowing AI assistants (like Claude, Cursor) to interact directly with your Unity Editor via a local MCP (Model Context Protocol) Client. Give your LLM tools to manage assets, control scenes, edit scripts, and automate tasks within Unity.

PublisherCoplayDev
Repositoryunity-mcp
LanguageC#
Forks
1.1K
Stars
9.9K
Available tools
0
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    MCP for Unity exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    9.9K stars and 1.1K forks from the linked repository.

Proudly sponsored and maintained by Aura -- the AI assistant for Unreal & Unity.

And don't miss Godot AI 🤖, the new open source MCP/AI project from the makers of MCP for Unity!

Discord python

Create your Unity apps with LLMs! MCP for Unity bridges AI assistants (Claude, Claude Code, Cursor, VS Code, etc.) with your Unity Editor via the Model Context Protocol. Give your LLM the tools to manage assets, control scenes, edit scripts, and automate tasks.

  • v9.6.3 (beta) — New manage_profiler tool (14 actions): Profiler session control (start/stop/status/set areas), frame timing and counter reads, object memory queries, memory snapshots (take/list/compare via com.unity.memoryprofiler), and Frame Debugger (enable/disable/get events). Group: profiling.
  • v9.6.2 — New manage_physics tool (21 actions): physics settings, layer collision matrix, physics materials, joints (5 3D + 9 2D types), queries (raycast, raycast_all, linecast, shapecast, overlap), force application (AddForce/AddTorque/AddExplosionForce), rigidbody configuration, scene-wide validation, and edit-mode simulation. Full 3D and 2D support.
  • v9.6.1 — QoL extensions: manage_editor gains undo/redo actions. manage_scene gains multi-scene editing (additive load, close, set active, move GO between scenes), scene templates (3d_basic, 2d_basic, etc.), and scene validation with auto-repair. New manage_build tool: trigger player builds, switch platforms, configure player settings, manage build scenes and profiles (Unity 6+), run batch builds across multiple platforms, and async job tracking with polling. New MaxPollSeconds infrastructure for long-running tool operations.
  • v9.5.4 — New unity_reflect and unity_docs tools for API verification: inspect live C# APIs via reflection and fetch official Unity documentation (ScriptReference, Manual, package docs). New manage_packages tool: install, remove, search, and manage Unity packages and scoped registries. Includes input validation, dependency checks on removal, and git URL warnings.
  • v9.5.3 — New manage_graphics tool (33 actions): volume/post-processing, light baking, rendering stats, pipeline settings, URP renderer features. 3 new resources: volumes, rendering_stats, renderer_features.
  • v9.5.2 — New manage_camera tool with Cinemachine support (presets, priority, noise, blending, extensions), cameras resource, priority persistence fix via SerializedProperty.
  • v9.4.8 — New editor UI, real-time tool toggling via manage_tools, skill sync window, multi-view screenshot, one-click Roslyn installer, Qwen Code & Gemini CLI clients, ProBuilder mesh editing via manage_probuilder.
  • v9.4.7 — Per-call Unity instance routing, macOS pyenv PATH fix, domain reload resilience for script tools.
  • v9.4.6 — New manage_animation tool, Cline client support, stale connection detection, tool state persistence across reloads.
  • v9.4.4 — Configurable batch_execute limits, tool filtering by session state, IPv6/IPv4 loopback fixes.

Quick Start

Prerequisites

1. Install the Unity Package

In Unity: Window > Package Manager > + > Add package from git URL...

[!TIP]

text
https://github.com/CoplayDev/unity-mcp.git?path=/MCPForUnity#main

Want the latest beta? Use the beta branch:

text
https://github.com/CoplayDev/unity-mcp.git?path=/MCPForUnity#beta

Unity Asset Store:

  1. Visit MCP for Unity on the Asset Store
  2. Click Add to My Assets, then import via Window > Package Manager

OpenUPM:

bash
openupm add com.coplaydev.unity-mcp

2. Start the Server & Connect

First-run wizard (recommended): After import, MCP for Unity opens a setup window automatically.

  1. Confirm Python and uv are installed — the window guides you through both if missing.
  2. Click Done. Once dependencies are green, you'll see a list of MCP clients detected on your machine.
  3. Pick the clients you want to configure and click Configure Selected. Done.

Manually (anytime): Window > MCP for Unity opens the main panel.

  • Click Start Server if it's not already running (launches HTTP server on localhost:8080).
  • In the Clients tab, click Configure All Detected Clients to set up every client found on your machine in one shot, or pick a single client from the dropdown and click Configure.
  • Look for 🟢 "Connected ✓".

Per-client gotchas: Some clients (Cursor, Antigravity, OpenClaw) still require enabling an MCP toggle or plugin in their own settings. OpenClaw also needs the openclaw-mcp-bridge plugin enabled and follows the currently selected MCP for Unity transport (HTTP or stdio). Claude Desktop only supports stdio — MCP for Unity will silently configure it that way even if you've selected HTTP elsewhere. Claude Code, VS Code, Windsurf, Cline, and the various CLI clients auto-connect after configuration.

Updates handle themselves. When you update the package, MCP for Unity rewrites the configs of every detected client on the next Editor open — no need to repeat the Configure step.

That's it! Try a prompt like: "Create a red, blue and yellow cube" or "Build a simple player controller"


Key Features

  • Natural Language Control — Instruct your LLM to perform Unity tasks
  • Powerful Tools — Manage assets, scenes, materials, scripts, and editor functions
  • Automation — Automate repetitive Unity workflows
  • Extensible — Works with various MCP Clients

Available Tools

apply_text_editsbatch_executecreate_scriptdebug_request_contextdelete_scriptexecute_custom_toolexecute_menu_itemfind_gameobjectsfind_in_fileget_shaget_test_jobmanage_animationmanage_assetmanage_buildmanage_cameramanage_componentsmanage_editormanage_gameobjectmanage_graphicsmanage_materialmanage_packagesmanage_physicsmanage_prefabsmanage_probuildermanage_profilermanage_scenemanage_scriptmanage_script_capabilitiesmanage_scriptable_objectmanage_shadermanage_texturemanage_toolsmanage_uimanage_vfxread_consolerefresh_unityrun_testsscript_apply_editsset_active_instanceunity_docsunity_reflectvalidate_script

Available Resources

camerascustom_toolsrenderer_featuresrendering_statsvolumeseditor_active_tooleditor_prefab_stageeditor_selectioneditor_stateeditor_windowsgameobjectgameobject_apigameobject_componentgameobject_componentsget_testsget_tests_for_modemenu_itemsprefab_apiprefab_hierarchyprefab_infoproject_infoproject_layersproject_tagstool_groupsunity_instances

Performance Tip: Use batch_execute for multiple operations — it's 10-100x faster than individual calls!

If auto-setup doesn't work, add this to your MCP client's config file:

HTTP (default — works with Cursor, Windsurf, Antigravity, VS Code, Cline; Claude Desktop is stdio-only, see below):

json
{
  "mcpServers": {
    "unityMCP": {
      "url": "http://localhost:8080/mcp"
    }
  }
}

VS Code:

json
{
  "servers": {
    "unityMCP": {
      "type": "http",
      "url": "http://localhost:8080/mcp"
    }
  }
}

macOS/Linux:

json
{
  "mcpServers": {
    "unityMCP": {
      "command": "uvx",
      "args": ["--from", "mcpforunityserver", "mcp-for-unity", "--transport", "stdio"]
    }
  }
}

Windows:

json
{
  "mcpServers": {
    "unityMCP": {
      "command": "C:/Users/YOUR_USERNAME/AppData/Local/Microsoft/WinGet/Links/uvx.exe",
      "args": ["--from", "mcpforunityserver", "mcp-for-unity", "--transport", "stdio"]
    }
  }
}

MCP for Unity supports multiple Unity Editor instances. To target a specific one:

  1. Ask your LLM to check the unity_instances resource
  2. Use set_active_instance with the Name@hash (e.g., MyProject@abc123)
  3. All subsequent tools route to that instance

For Strict validation that catches undefined namespaces, types, and methods:

  1. Install NuGetForUnity
  2. Window > NuGet Package Manager → Install Microsoft.CodeAnalysis v5.0
  3. Also install SQLitePCLRaw.core and SQLitePCLRaw.bundle_e_sqlite3 v3.0.2
  4. Add USE_ROSLYN to Player Settings > Scripting Define Symbols
  5. Restart Unity

Open Window > MCP for Unity, scroll to the Runtime Code Execution (Roslyn) section in the Scripts/Validation tab, and click Install Roslyn DLLs. This downloads the required NuGet packages and places the DLLs in Assets/Plugins/Roslyn/ automatically.

You can also run it from the menu: Window > MCP For Unity > Install Roslyn DLLs.

  1. Download Microsoft.CodeAnalysis.CSharp.dll and dependencies from NuGet
  2. Place DLLs in Assets/Plugins/Roslyn/ folder
  3. Ensure .NET compatibility settings are correct
  4. Add USE_ROSLYN to Scripting Define Symbols
  5. Restart Unity
  • Unity Bridge Not Connecting: Check Window > MCP for Unity status, restart Unity
  • Server Not Starting: Verify uv --version works, check the terminal for errors
  • Client Not Connecting: Ensure the HTTP server is running and the URL matches your config

Detailed setup guides:

Still stuck? Open an Issue or Join Discord

See README-DEV.md for development setup. For custom tools, see CUSTOM_TOOLS.md.

  1. Fork → Create issue → Branch (feature/your-idea) → Make changes → PR

Anonymous, privacy-focused telemetry (no code, no project names, no personal data). Opt out with DISABLE_TELEMETRY=true. See TELEMETRY.md.

Network defaults are intentionally fail-closed:

  • HTTP Local allows loopback-only hosts by default (127.0.0.1, localhost, ::1).
  • Bind-all interfaces (0.0.0.0, ::) require explicit opt-in in Advanced Settings via Allow LAN Bind (HTTP Local).
  • HTTP Remote requires https:// by default.
  • Plaintext http:// for remote endpoints requires explicit opt-in via Allow Insecure Remote HTTP.

License: MIT — See LICENSE | Need help? Discord | Issues


Star History

Star History Chart

bibtex
@inproceedings{10.1145/3757376.3771417,
author = {Wu, Shutong and Barnett, Justin P.},
title = {MCP-Unity: Protocol-Driven Framework for Interactive 3D Authoring},
year = {2025},
isbn = {9798400721366},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/3757376.3771417},
doi = {10.1145/3757376.3771417},
series = {SA Technical Communications '25}
}

Unity AI Tools by Aura

Aura offers 2 AI tools for Unity:

  • MCP for Unity is available freely under the MIT license.
  • Aura for Unity is a premium Unity/Unreal AI assistant that is built for game devs.

Disclaimer

This project is a free and open-source tool for the Unity Editor, and is not affiliated with Unity Technologies.

Installation

TypingMind
Prerequisites:

Node.js 18+

{
  "mcpServers": {
    "coplaydev-unity-mcp": {
      "command": "",
      "args": []
    }
  }
}

Use MCP for Unity MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once MCP for Unity is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add MCP for Unity as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the MCP for Unity MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "coplaydev-unity-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "unity-mcp"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the MCP for Unity MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the MCP for Unity MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use MCP for Unity to help me with this task?
MCP for Unity
Sure. I read it.
Here is what I found using MCP for Unity.

Frequently asked questions

What is the MCP for Unity MCP server used for?

MCP for Unity is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use MCP for Unity MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use MCP for Unity with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use MCP for Unity MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With MCP for Unity connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect MCP for Unity MCP to TypingMind?

MCP for Unity runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does MCP for Unity MCP provide in TypingMind?

MCP for Unity exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use MCP for Unity MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If MCP for Unity requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇