AI Game Developer: MCP for Unity, Unreal and Godot

io.github.IvanMurzak由 GitHub 账号 IvanMurzak 发布v9.3.2更新于 Nov 3, 2026

Make games with AI: one MCP server that connects your agent to Unity, Unreal and Godot editors.

已验证Streamable HTTP可网页运行开发者工具

概览

AI 生成的概览

把 AI 智能体连接到 Unity、Unreal 和 Godot 编辑器,让它查看场景、执行 C# 脚本、运行测试并截图。

可以做什么
  • 通过 RQL 查询读取和修改编辑器数据:场景、GameObject、组件、资源、控制台日志、设置、光照与性能分析
  • 创建 GameObject、材质、文件夹和场景,保存预制体,移动或删除资源,执行菜单项
  • 编译并执行 C# 代码,读取、创建或删除脚本文件,运行 EditMode/PlayMode 测试
  • 对单个 GameObject、Scene 视图、Game 视图或相机截图,可选保存到项目中
  • 列出、搜索、添加和移除 Unity Package Manager 包,并向智能体显示或隐藏工具
  • 安装动画、Cinemachine、导航、地形、瓦片地图等可选的扩展工具集
适用场景
适合用 Unity 开发游戏(说明中也提到 Unreal 和 Godot)并希望 AI 智能体直接查看工程、修改编辑器内容、迭代 C# 代码,并用测试或截图验证结果的场景,省去手动切换窗口。
运行要求
使用托管端点并完成 OAuth 登录,或由 MCP 客户端以 stdio 启动本地服务器二进制,并在项目中安装 Unity 插件。CLI 方式需要 Node.js 运行 npm 包,并通过浏览器 OAuth 设备码登录,凭据保存在本机。项目路径不能包含空格。AI 智能体需支持 Skills 或动态 MCP 工具更新。
安装前请注意
智能体拥有较大的写入权限:可创建、移动、删除资源和脚本,执行任意 C# 代码并运行测试,建议用版本控制审查改动。登录会把凭据存入共享的本机凭据库,默认智能体配置指向按项目固定的云端端点。工具调用只发送一次、不会重试,默认超时较长。

安装

在 SourceWeft 中

  1. 打开 控制台中的 AI Game Developer: MCP for Unity, Unreal and Godot,将其添加到工作区。
  2. 连接 所需的 凭据。它们会被私密存储,绝不会在公开页面上展示。
  3. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.IvanMurzak%2FUnity-MCP/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。 客户端会在首次连接时完成 OAuth 登录。

{
  "mcpServers": {
    "ai-game-developer-for-unity-unreal-and-g": {
      "type": "http",
      "url": "https://ai-game.dev/mcp"
    }
  }
}

README

Unity MCP is an AI-powered game development assistant for Editor & Runtime. Connect Claude, Cursor, & Windsurf to Unity via MCP. Automate workflows, generate code, and enable AI within your games.

Unlike other tools, this plugin works inside your compiled game, allowing for real-time AI debugging and player-AI interaction.

💬 Join our Discord Server - Ask questions, showcase your work, and connect with other developers!

[AI Game Developer — Unity MCP]

  • ✔️ AI agents - Use the best agents from Anthropic, OpenAI, Microsoft, or any other provider with no vendor lock-in
  • ✔️ Tools - A wide range of default MCP Tools for operating in Unity Editor
  • ✔️ Skills - Generate skills for AI based on operating system, Unity version, plugins in the project
  • ✔️ Code and Tests - Develop game mechanics and test them with AI agents
  • ✔️ Runtime (in-game) - Use LLMs directly inside your compiled game for dynamic NPC behavior or debugging
  • ✔️ Debug support - Let AI debug and fix the problems in a project
  • ✔️ Natural conversation - Chat with AI like you would with a human
  • ✔️ Flexible deployment - Works locally (stdio) and remotely (http) via configuration
  • ✔️ Extensible - Create custom Tools in your project code

[DOWNLOAD INSTALLER]

https://github.com/user-attachments/assets/228baf4d-4f00-4dce-939d-fb985ebdd8dd

OR use cli

bash
# 1. Install unity-mcp-clinpm install -g unity-mcp-cli
# 2. Install "AI Game Developer" in Unity projectunity-mcp-cli install-plugin ./MyUnityProject
# 3. Sign in to ai-game.dev (opens your browser — OAuth device flow)unity-mcp-cli login
# 4. Open Unity project (auto-connects and generates skills)unity-mcp-cli open ./MyUnityProject

[AI Game Developer Windows]

[AI Game Developer — Unity SKILLS and MCP]

Quick Start

Get up and running in three steps:

  1. Install plugin — download the .unitypackage installer or run openupm add com.ivanmurzak.unity.mcp

    Alternative: npx unity-mcp-cli install-plugin ./MyUnityProject — see CLI documentation

  2. Pick an AI agent — Claude Code, Claude Desktop, GitHub Copilot, Cursor, or any other
  3. Setup AI agent — open Window/AI Game Dev in Unity and click Auto-generate skills (recommended) or Configure MCP [Setup AI Skills]

    Alternative: npx unity-mcp-cli setup-skills claude-code ./MyUnityProject — see CLI documentation

That's it. Ask your AI "Create 3 cubes in a circle with radius 2" and watch it happen. ✨


Skills and Tools Reference

Since 1.0.0 the plugin exposes a small set of tools, and most Editor work goes through RQL, a query language over the Editor's data: rql-query reads, rql-mutate changes, and rql-schema describes the sources, types and calls (start there when unsure). The one-tool-per-action tools of earlier versions (gameobject-create, scene-save, console-get-logs and others) were replaced by RQL in #1017. See docs/default-mcp-tools.md for the full reference.

🧰 Browse the full MCP tools registry online: ai-game.dev/docs/tools

Shown to the AI agent by default: rql-query, rql-mutate, rql-schema, screenshot-isolated, script-execute, tests-run, unity-tool-list. The other tools are installed but hidden from the agent's tool list (a hidden tool still runs when called by name). Show them with tool-set-visibility, in the AI Game Developer window, or with unity-mcp-cli configure <path> --enable-tools <ids>.

RQL (scenes, GameObjects, components, assets, console, editor)
  • rql-query - Read Editor data with an RQL query, e.g. roots | recurse children | select name active
  • rql-mutate - Change Editor data or call Editor operations, e.g. editor | call CreateGameObject({name: "Ground", primitive: "Plane"})
  • rql-schema - Describe the sources, types, members and calls RQL can use, and print the topic guides
  • Sources: scenes, roots, objects (every GameObject in the loaded scenes), selection, prefab (the prefab open in prefab mode), editor (create GameObjects, materials, folders and scenes; open and save scenes and prefabs; copy, move and delete assets; execute menu items; …), settings, console (captured Editor log entries), shaders, componentTypes, tests, testResults, profiler, lighting; assets by path with unity.asset("Assets/…")
Screenshots
  • screenshot-isolated - Render a GameObject in isolation from a chosen angle (optional composite 2x2 view)
  • screenshot-scene-view - Captures a screenshot from the Unity Editor Scene View (hidden by default)
  • screenshot-game-view - Captures a screenshot from the Unity Editor Game View (hidden by default)
  • screenshot-camera - Captures a screenshot from a camera and returns it as an image (hidden by default)
  • All four take an optional savePath, for when the user wants the picture as a file: the PNG is also written inside the project (never over an existing file) and the result says Saved to <absolute path>; under Assets/ it is imported as a Unity asset
Scripting, tests and packages
  • script-execute - Compiles and executes C# code dynamically using Roslyn
  • script-read - Reads the content of a script file (hidden by default)
  • script-update-or-create - Updates or creates script file with the provided C# code (hidden by default)
  • script-delete - Delete the script file(s) (hidden by default)
  • tests-run - Execute Unity tests (EditMode/PlayMode): any RQL selection over the tests source as one run, results filtered with RQL
  • package-list, package-search, package-add, package-remove - Unity Package Manager packages (hidden by default)
Tool management
  • unity-tool-list - List every tool and whether the agent sees it
  • tool-set-visibility - Show or hide tools in the agent's tool list (hidden by default)
  • tool-set-enabled-state - Deprecated alias of tool-set-visibility (hidden by default)
Profiling & Diagnostics
  • RQL source profiler (via rql-query / rql-mutate) - memory, rendering, script and frame snapshots, module flags; Start, Stop, ClearFrames, EnableModule, Save, Load
Lighting
  • RQL source lighting (via rql-query / rql-mutate) - the active scene's environment (ambient, fog, skybox, sun, reflections; undoable), its Lighting Settings asset and the bake: CreateSettings, UseSettings, Bake, CancelBake, ClearBakedData, BakeReflectionProbes
  • LightProbeGroup.PlaceGrid(size, spacing) - fill a box with evenly spaced light probes; ReflectionProbe.Bake() - bake a Custom probe next to its scene

Install Additional Skills and Tools

Install extensions when need more tools or create your own tools.

ExtensionDescription
AI AnimationSet of additional tools for Unity Animations
AI CinemachineMCP Tools for Cinemachine
AI InputSystemMCP Tools for the Unity Input System
AI NavigationMCP Tools for AI Navigation (NavMesh surfaces, baking, agents, links)
AI ParticleSystemSet of additional tools for Unity Particle System
AI ProBuilderSet of additional tools for Unity ProBuilder
AI SplinesMCP Tools for Unity Splines
AI TerrainSet of additional tools for Unity Terrain
AI TilemapMCP Tools for Unity 2D Tilemaps
AI TimelineMCP Tools for Unity Timeline cutscenes and sequences

[AI Game Developer — Unity SKILLS and MCP]

Contents

More Documentation

DocumentDescription
Default MCP ToolsFull reference of all built-in tools with descriptions
MCP Server SetupServer configuration, environment variables, remote hosting
Docker DeploymentStep-by-step Docker deployment guide
Development GuideArchitecture, code style, CI/CD — for contributors
WikiGetting started, tutorials, API reference, FAQ
CLI ToolInstall plugins, configure, and connect via command line

[AI Game Developer — Unity SKILLS and MCP]

Installation

Step 1: Install Unity MCP Plugin

⚠️ Requirements (click)

[!IMPORTANT] Project path cannot contain spaces

  • ✅ C:/MyProjects/MyProject
  • ❌ C:/My Projects/MyProject
  • ❌ C:/My Projects/My Project
  • ❌ C:/MyProjects/My Project

Option 1 - Installer

  • ⬇️ Download Installer
  • 📂 Import installer into Unity project
    • You can double-click on the file - Unity will open it automatically
    • OR: Open Unity Editor first, then click on Assets/Import Package/Custom Package, and choose the file

Option 2 - CLI (recommended)

Install the plugin via unity-mcp-cli — no Unity Editor needed:

bash
# 1.1 Install unity-mcp-cli                                #  ┌────────────────────┐npm install -g unity-mcp-cli                               #  │ Available AI agent │                                                           #  ├────────────────────┤# 1.2 (Optional) Install Unity                             #  │ antigravity        │unity-mcp-cli install-unity                                #  │ claude-code        │                                                           #  │ claude-desktop     │# 1.3 (Optional) Create Unity project                      #  │ cline              │unity-mcp-cli create-project ./MyUnityProject              #  │ codex              │                                                           #  │ cursor             │# 2. Install "AI Game Developer" in Unity project          #  │ gemini             │unity-mcp-cli install-plugin ./MyUnityProject              #  │ github-copilot-cli │                                                           #  │ kilo-code          │# 3. Sign in to ai-game.dev (OAuth device flow)            #  │ open-code          │unity-mcp-cli login                                        #  │ rider-junie        │                                                           #  │ unity-ai           │# 4. Open Unity project (auto-connects and generates skills)  │ vs-copilot         │unity-mcp-cli open ./MyUnityProject                        #  │ vscode-copilot     │                                                           #  └────────────────────┘# 5. Wait for Unity Editor to be readyunity-mcp-cli wait-for-ready ./MyUnityProject

See full CLI documentation for all available commands.

Cloud sign-in & project pinning: unity-mcp-cli login runs the browser OAuth device flow and stores the credential in the shared machine store (~/.ai-game-dev/credentials.json) — there is no personal access token to paste. By default the AI-agent config that setup-mcp writes points at a per-project pinned endpoint (https://ai-game.dev/mcp/p/<pin>); pass --no-pin to use the shared https://ai-game.dev/mcp endpoint instead. Teams can distribute access with an enrollment code: unity-mcp-cli install-plugin --enroll <code>.

Step 2: Install AI agent

Choose a single AI agent you prefer - you don't need to install all of them. This will be your main chat window to communicate with the LLM.

The AI Game Developer is quite universal, which is why you may use any AI agent you prefer - it will work as smoothly as any other. The only important requirement is that the AI agent must support Skills or dynamic MCP Tool updates.

Step 3: Configure AI agent

Automatic configuration

  • Open Unity project
  • Open Window/AI Game Dev
  • Option 1: Click Auto-generate Skills (recommended)
  • Option 2: Click Configure Model Context Protocol (MCP)

[Unity_AI]

If your MCP client is not in the list, use the raw JSON shown in the window to inject it into your MCP client. Read the instructions for your specific MCP client on how to do this.

Manual configuration

If automatic configuration doesn't work for you for any reason, use the JSON from the AI Game Developer (Unity-MCP) window to configure any MCP Client manually.

Command line configuration
Create command

1. Choose your <command> for your environment

Platform<command>
Windows x64"<unityProjectPath>/Library/mcp-server/win-x64/gamedev-mcp-server.exe" port=<port> client-transport=stdio
Windows x86"<unityProjectPath>/Library/mcp-server/win-x86/gamedev-mcp-server.exe" port=<port> client-transport=stdio
Windows arm64"<unityProjectPath>/Library/mcp-server/win-arm64/gamedev-mcp-server.exe" port=<port> client-transport=stdio
MacOS Apple-Silicon"<unityProjectPath>/Library/mcp-server/osx-arm64/gamedev-mcp-server" port=<port> client-transport=stdio
MacOS Apple-Intel"<unityProjectPath>/Library/mcp-server/osx-x64/gamedev-mcp-server" port=<port> client-transport=stdio
Linux x64"<unityProjectPath>/Library/mcp-server/linux-x64/gamedev-mcp-server" port=<port> client-transport=stdio
Linux arm64"<unityProjectPath>/Library/mcp-server/linux-arm64/gamedev-mcp-server" port=<port> client-transport=stdio

2. Replace <unityProjectPath> with the full path to Unity project

3. Replace <port> with your port from AI Game Developer configuration

4. Add MCP server using command line

[Gemini CLI] Gemini CLI
bash
gemini mcp add ai-game-developer <command>

Replace <command> from the table above

[Claude Code CLI] Claude Code CLI
bash
claude mcp add ai-game-developer <command>

Replace <command> from the table above

[GitHub Copilot CLI] GitHub Copilot CLI
bash
copilot
bash
/mcp add

Server name: ai-game-developer Server type: local Command: <command>

Replace <command> from the table above

[AI Game Developer — Unity SKILLS and MCP]

AI Workflow Examples

Communicate with the AI (LLM) in your AI agent. Ask it to do anything you want. The better you describe your task or idea, the better it will perform the job.

Some AI agents allow you to choose different LLM models. Pay attention to this feature, as some models may work much better than others.

Example prompts:

text
Explain my scene hierarchy
text
Create 3 spheres on top of each other
text
Create metallic golden material and attach it to a new sphere gameObject

Make sure Agent mode is enabled if using VS Code with Copilot

Disabling update notifications for the whole team

The plugin shows an update popup at Editor startup when a newer version is available on OpenUPM. By default, each team member sees this popup until they individually click "Do not show again" (which is a per-user setting stored on their machine).

For multi-person Unity projects where one engineer owns plugin versioning, you can disable the popup for the entire team by opening Edit ▸ Project Settings ▸ AI Game Developer and enabling "Disable update notifications for the entire team". The setting is persisted to ProjectSettings/AI-Game-Developer-UpdateSettings.asset and only needs to be set once per project — commit that file and every team member who pulls the commit will have the popup suppressed.

The same toggle is also reachable via Tools ▸ AI Game Developer ▸ Updates ▸ Disable Update Notifications (Team) in the menu bar.

Advanced Features for LLM

Unity MCP provides advanced tools that enable the LLM to work faster and more effectively, avoiding mistakes and self-correcting when errors occur. Everything is designed to achieve your goals efficiently.

Core Capabilities

  • ✔️ Agent-ready tools - Find anything you need in 1-2 steps
  • ✔️ Instant compilation - C# code compilation & execution using Roslyn for faster iteration
  • ✔️ Full asset access - Read/write access to assets and C# scripts
  • ✔️ Intelligent feedback - Well-described positive and negative feedback for proper issue understanding

Reflection-Powered Features

  • ✔️ Object references - Provide references to existing objects for instant C# code
  • ✔️ Project data access - Get full access to entire project data in a readable format
  • ✔️ Granular modifications - Populate & modify any piece of data in the project
  • ✔️ Method discovery - Find any method in the entire codebase, including compiled DLL files
  • ✔️ Method execution - Call any method in the entire codebase
  • ✔️ Advanced parameters - Provide any property for method calls, even references to existing objects in memory
  • ✔️ Live Unity API - Unity API instantly available - even when Unity changes, you get the fresh API
  • ✔️ Self-documenting - Access human-readable descriptions of any class, method, or property via Description attributes

[AI Game Developer — Unity SKILLS and MCP]

Customize Tools

Unity MCP supports custom MCP Tool, MCP Resource, and MCP Prompt development by project owners. The MCP server takes data from the Unity MCP Plugin and exposes it to a client. Anyone in the MCP communication chain will receive information about new MCP features, which the LLM may decide to use at some point.

Add custom Tool

To add a custom Tool, you need:

  1. A class with the AiToolType attribute
  2. A method in the class with the AiTool attribute
  3. Optional: Add a Description attribute to each method argument to help the LLM understand it
  4. Optional: Use string? optional = null properties with ? and default values to mark them as optional for the LLM

Note that the line MainThread.Instance.Run(() => allows you to run code on the main thread, which is required for interacting with Unity's API. If you don't need this and running the tool in a background thread is acceptable, avoid using the main thread for efficiency purposes.

csharp
[AiToolType]public class Tool_GameObject{    [AiTool    (        "MyCustomTask",        Title = "Create a new GameObject"    )]    [Description("Explain here to LLM what is this, when it should be called.")]    public string CustomTask    (        [Description("Explain to LLM what is this.")]        string inputData    )    {        // do anything in background thread
        return MainThread.Instance.Run(() =>        {            // do something in main thread if needed
            return $"[Success] Operation completed.";        });    }}

Add custom MCP Prompt

MCP Prompt allows you to inject custom prompts into the conversation with the LLM. It supports two sender roles: User and Assistant. This is a quick way to instruct the LLM to perform specific tasks. You can generate prompts using custom data, providing lists or any other relevant information.

csharp
[AiPromptType]public static class Prompt_ScriptingCode{    [AiPrompt(Name = "add-event-system", Role = Role.User)]    [Description("Implement UnityEvent-based communication system between GameObjects.")]    public string AddEventSystem()    {        return "Create event system using UnityEvents, UnityActions, or custom event delegates for decoupled communication between game systems and components.";    }}

[AI Game Developer — Unity SKILLS and MCP]

Runtime usage (in-game)

Use Unity MCP in your game/app. Use Tools, Resources or Prompts. By default there are no tools, you would need to implement your custom.

csharp
// Build MCP pluginvar mcpPlugin = UnityMcpPluginRuntime.Initialize(builder =>    {        builder.WithConfig(config =>        {            config.Host = "http://localhost:8080";            config.Token = "your-token";        });        // Automatically register all tools from the current assembly        builder.WithToolsFromAssembly(Assembly.GetExecutingAssembly());    })    .Build();
await mcpPlugin.Connect(); // Start active connection with retry to the MCP server
await mcpPlugin.Disconnect(); // Stop active connection and close existed connection

Sample: AI powered Chess game bot

There is a classic Chess game. Lets outsource to LLM the bot logic. Bot should do the turn using game rules.

Mark game-only tools [AiToolType(Target = ToolTarget.Runtime)] (using com.IvanMurzak.McpPlugin.Common;): only the game registers them, and the MCP server sends their calls to the running game even while the Editor is connected.

csharp
[AiToolType(Target = ToolTarget.Runtime)]public static class ChessGameAI{    [AiTool("chess-do-turn", Title = "Do the turn")]    [Description("Do the turn in the chess game. Returns true if the turn was accepted, false otherwise.")]    public static Task<bool> DoTurn(int figureId, Vector2Int position)    {        return MainThread.Instance.RunAsync(() => ChessGameController.Instance.DoTurn(figureId, position));    }
    [AiTool("chess-get-board", Title = "Get the board")]    [Description("Get the current state of the chess board.")]    public static Task<BoardData> GetBoard()    {        return MainThread.Instance.RunAsync(() => ChessGameController.Instance.GetBoardData());    }}

Why runtime usage is needed?

There are many use cases, lets imagine you are working on a Chess game with bot. You may outsource the bot decision making to LLM by writing few lines of code.

[AI Game Developer — Unity SKILLS and MCP]

Unity MCP Server setup

Unity MCP Server supports many different launch options and Docker deployment. Both transport protocols are supported: streamableHttp and stdio. If you need to customize or deploy Unity MCP Server to a cloud, this section is for you. Read more...

Variables

Doesn't matter what launch option you choose, all of them support custom configuration using both Environment Variables and Command Line Arguments. It would work with default values, if you just need to launch it, don't waste your time for the variables. Just make sure Unity Plugin also has default values, especially the --port, they should be equal.

Environment VariableCommand Line ArgsDescription
MCP_PLUGIN_PORT--portClient -> Server <- Plugin connection port (default: 8080)
MCP_PLUGIN_CLIENT_TIMEOUT--plugin-timeoutPlugin -> Server connection timeout (ms) (default: 10000)
MCP_PLUGIN_TOOL_TIMEOUT--tool-timeoutHow long the Server waits for one tool call (ms). A tool call is sent to the Plugin once, never re-sent (default: 300000, or --plugin-timeout if larger; servers built on McpPlugin 8.11.0+)
MCP_PLUGIN_CLIENT_TRANSPORT--client-transportClient -> Server transport type: stdio or streamableHttp (default: streamableHttp)
MCP_AUTHORIZATION--authorizationAuthentication mode for incoming Client connections: none, oauth, or token (default: none; the legacy required mode was removed)
MCP_PLUGIN_TOKEN--tokenBearer token required from the Client when authorization is token (default: unset)
MCP_PLUGIN_IDLE_TIMEOUT_SECONDS--idle-timeout-secondsShut down the server after this many seconds with no connections (default: 600)

Command line args support also the option with a single - prefix (-port) and an option without prefix at all (port).

For analytics and authorization webhook variables (MCP_PLUGIN_WEBHOOK_*), see docs/mcp-server.md.

Choosing a transport: Use stdio when the MCP client launches the server binary directly (local use — this is the most common setup). Use streamableHttp when running the server as a standalone process or in Docker/cloud, and connecting over HTTP.

Plugin Variables

The Unity MCP Plugin reads the following environment variables (and command-line arguments) on startup to override values from the saved config file. Overrides are applied in memory only and are never written to the config file (UserSettings/AI-Game-Developer-Config.json), so the saved values (for example connectionMode or transportMethod) still show what was chosen in the AI Game Developer window. To change a setting permanently, change it in the window, in an Editor started without that override (while an override is active, a change to the same setting in the window is not kept).

Environment VariableCommand Line ArgValuesDescription
UNITY_MCP_CLOUD_URL-urlURL stringOverride the MCP Server URL (UNITY_MCP_HOST is a legacy alias)
UNITY_MCP_CONNECTION_MODE-UNITY_MCP_CONNECTION_MODECloud / CustomForce the connection mode (a loopback URL implies Custom)
UNITY_MCP_KEEP_CONNECTED-UNITY_MCP_KEEP_CONNECTEDtrue / falseForce enable or disable the active connection
UNITY_MCP_AUTH_OPTION-authnone / oauth / tokenForce set the authentication mode (legacy required migrates to token)
UNITY_MCP_TOKEN-tokenstringForce set the authentication token
UNITY_MCP_TRANSPORT-UNITY_MCP_TRANSPORTstdio / streamableHttpForce the client transport the plugin configures
UNITY_MCP_START_SERVER-UNITY_MCP_START_SERVERtrue / falseForce whether the plugin keeps a local server process running
UNITY_MCP_TOOLS-UNITY_MCP_TOOLScomma-separated tool IDsShow only the listed tools to MCP clients (tools/list); all others are hidden (a hidden tool still runs when called by name). Unknown IDs are logged as errors.
UNITY_MCP_CREDENTIALS_DIR— (environment only)absolute folder pathRead (and refresh) the machine credential store from this folder instead of ~/.ai-game-dev. For development/test Editors whose launcher signs in under another profile (the AI Game Dev App's local dev stand); a path, never a token. A relative value is logged and ignored

Command-line args take precedence over environment variables. Both override the saved config file value. The short flags -url, -token, and -auth are aliases; the full -UNITY_MCP_* arg names are also accepted.

Cloud vs Custom mode in UserSettings/AI-Game-Developer-Config.json: connectionMode defaults to Cloud, which connects to https://ai-game.dev/mcp and never auto-starts the local server (even if keepServerRunning is true). The saved "host" field is used only when connectionMode is "Custom"; editing "host" in the file does not switch the mode. To use a local server, select Custom in the AI Game Dev window, or set "connectionMode": "Custom" while Unity is closed.

Example (CI/CD batch mode):

bash
Unity.exe -batchmode -nographics \  -UNITY_MCP_CLOUD_URL=http://localhost:8080 \  -UNITY_MCP_KEEP_CONNECTED=true \  -UNITY_MCP_AUTH_OPTION=token \  -UNITY_MCP_TOKEN=my-secret-token

Docker 📦

[Docker Image]

Make sure Docker is installed. And please make sure Docker Desktop is launched if you are at Windows operation system.

Read advanced Docker configuration instructions.

streamableHttp Transport

bash
docker run -p 8080:8080 aigamedeveloper/mcp-server
MCP Client config:
json
{  "mcpServers": {    "ai-game-developer": {      "url": "http://localhost:8080"    }  }}

Replace url with your real endpoint if it is hosted in cloud.

stdio Transport

For using this variant, MCP Client should launch the MCP Server in the docker. It is achievable through the modified MCP Client configuration.

bash
docker run -t -e MCP_PLUGIN_CLIENT_TRANSPORT=stdio -p 8080:8080 aigamedeveloper/mcp-server
MCP Client config:
json
{  "mcpServers": {    "ai-game-developer": {      "command": "docker",      "args": [        "run",        "-t",        "-e",        "MCP_PLUGIN_CLIENT_TRANSPORT=stdio",        "-p",        "8080:8080",        "aigamedeveloper/mcp-server"      ]    }  }}

Custom port

bash
docker run -e MCP_PLUGIN_PORT=123 -p 123:123 aigamedeveloper/mcp-server
MCP Client config:
json
{  "mcpServers": {    "ai-game-developer": {      "url": "http://localhost:123"    }  }}

Replace url with your real endpoint if it is hosted in cloud

Binary executable

You may launch Unity MCP Server directly from a binary file. You would need to have a binary compiled specifically for your CPU architecture. Check GitHub Release Page, it contains pre-compiled binaries for all CPU architectures.

bash
./gamedev-mcp-server --port 8080 --plugin-timeout 10000 --client-transport stdio
MCP Client config:

Replace <project> with your Unity project path.

json
{  "mcpServers": {    "ai-game-developer": {      "command": "<project>/Library/mcp-server/win-x64/gamedev-mcp-server.exe",      "args": [        "--port=8080",        "--plugin-timeout=10000",        "--client-transport=stdio"      ]    }  }}

[AI Game Developer — Unity SKILLS and MCP]

How Unity MCP Architecture Works

Unity MCP serves as a bridge between LLMs and Unity. It exposes and explains Unity's tools to the LLM, which then understands the interface and utilizes the tools according to user requests.

Connect Unity MCP to LLM clients such as Claude or Cursor using the integrated AI Connector window. Custom clients are also supported.

The system is highly extensible - you can define custom MCP Tools, MCP Resource or MCP Prompt directly in your Unity project codebase, exposing new capabilities to AI or automation clients. This makes Unity MCP a flexible foundation for building advanced workflows, rapid prototyping, and integrating AI-driven features into your development process.

What is MCP

MCP - Model Context Protocol. In a few words, that is USB Type-C for AI, specifically for LLM (Large Language Model). It teaches LLM how to use external features. Such as Unity Engine in this case, or even your custom C# method in your code. Official documentation.

What is AI agent

It is an application with a chat window. It may have smart agents to operate better, it may have embedded advanced MCP Tools. In general well done MCP Client is 50% of the AI success of executing a task. That is why it is very important to choose the best one for usage.

What is MCP Server

It is a bridge between MCP Client and "something else", in this particular case it is Unity Engine. This project includes MCP Server.

What is MCP Tool

MCP Tool is a function or method that the LLM can call to interact with Unity. These tools act as the bridge between natural language requests and actual Unity operations. When you ask the AI to "create a cube" or "change material color," it uses MCP Tools to execute these actions.

Key characteristics:

  • Executable functions that perform specific operations
  • Typed parameters with descriptions to help the LLM understand what data to provide
  • Return values that give feedback about the operation's success or failure
  • Thread-aware - can run on main thread for Unity API calls or background thread for heavy processing

When to use Tool

  • Automate repetitive tasks - Create tools for common operations you do frequently
  • Complex operations - Bundle multiple Unity API calls into a single, easy-to-use tool
  • Project-specific workflows - Build tools that understand your project's specific structure and conventions
  • Error-prone tasks - Create tools that include validation and error handling
  • Custom game logic - Expose your game's systems to AI for dynamic content creation

Examples:

  • Creating and configuring GameObjects with specific components
  • Batch processing assets (textures, materials, prefabs)
  • Setting up lighting and post-processing effects
  • Generating level geometry or placing objects procedurally
  • Configuring physics settings or collision layers

What is MCP Resource

MCP Resource provides read-only access to data within your Unity project. Unlike MCP Tools that perform actions, Resources allow the LLM to inspect and understand your project's current state, assets, and configuration. Think of them as "sensors" that give the AI context about your project.

Key characteristics:

  • Read-only access to project data and Unity objects
  • Structured information presented in a format the LLM can understand
  • Real-time data that reflects the current state of your project
  • Contextual awareness helping the AI make informed decisions

When to use MCP Resource

  • Project analysis - Let AI understand your project structure, assets, and organization
  • Debugging assistance - Provide current state information for troubleshooting
  • Intelligent suggestions - Give AI context to make better recommendations
  • Documentation generation - Automatically create documentation based on project state
  • Asset management - Help AI understand what assets are available and their properties

Examples:

  • Exposing scene hierarchy and GameObject properties
  • Listing available materials, textures, and their settings
  • Showing script dependencies and component relationships
  • Displaying current lighting setup and render pipeline configuration
  • Providing information about audio sources, animations, and particle systems

What is MCP Prompt

MCP Prompt allows you to inject pre-defined prompts into the conversation with the LLM. These are smart templates that can provide context, instructions, or knowledge to guide the AI's behavior. Prompts can be static text or dynamically generated based on your project's current state.

Key characteristics:

  • Contextual guidance that influences how the AI responds
  • Role-based - can simulate different personas (User requests or Assistant knowledge)
  • Dynamic content - can include real-time project data
  • Reusable templates for common scenarios and workflows

When to use MCP Prompt

  • Provide domain knowledge - Share best practices and coding standards specific to your project
  • Set coding conventions - Establish naming conventions, architecture patterns, and code style
  • Give context about project structure - Explain how your project is organized and why
  • Share workflow instructions - Provide step-by-step procedures for common tasks
  • Inject specialized knowledge - Add information about specific Unity features, third-party assets, or custom systems

Examples:

  • "Always use PascalCase for public methods and camelCase for private fields"
  • "This project uses a custom event system located in Scripts/Events/"
  • "When creating UI elements, always add them to the Canvas in Scene/UI/MainCanvas"
  • "Performance is critical - prefer object pooling for frequently instantiated objects"
  • "This project follows SOLID principles - explain any architecture decisions"

[AI Game Developer — Unity SKILLS and MCP]

Uninstall 🧹

To completely remove the plugin from your Unity project:

  1. Open Window ▸ Package Manager, select the AI Game Developer — MCP package, and click Remove.
  2. Close Unity, then delete the Assets/Plugins/NuGet folder (along with its Assets/Plugins/NuGet.meta file).

[AI Game Developer — Unity SKILLS and MCP]

Contribution 💙💛

Contributions are highly appreciated. Bring your ideas and let's make game development simpler than ever before! Do you have an idea for a new Tool or feature, or did you spot a bug and know how to fix it?

Please give this project a star 🌟 if you find it useful!

  1. 👉 Read Development documentation
  2. 👉 Fork the project
  3. Clone the fork and open the ./Unity-MCP-Plugin folder in Unity
  4. Implement new things in the project, commit, push it to GitHub
  5. Create Pull Request targeting original Unity-MCP repository, main branch.

[AI Game Developer — Unity SKILLS and MCP]

来源:README.md,提交 f1c7513

工具

0
该服务器需要登录,因此 SourceWeft 无法在没有账号的情况下读取其工具,也未收录。已连接账号所能看到的内容可能因账号及其权限而异。

版本历史

2
  1. v9.3.2最新Nov 3, 2026
  2. v0.17.1Sep 16, 2026

评分

已满足适用检查项的 85%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分