
AI Game Developer: MCP for Unity, Unreal and Godot
io.github.IvanMurzak由 GitHub 帳號 IvanMurzak 發布v9.3.2更新於 Nov 10, 2026
用AI製作遊戲:一個MCP伺服器,將你的代理程式連接到Unity、Unreal和Godot編輯器。
AI 翻譯由 AI 模型根據下方的原文描述翻譯,可能有誤。
原文描述
Make games with AI: one MCP server that connects your agent to Unity, Unreal and Godot editors.
概覽
AI Game Developer: MCP for Unity, Unreal and Godot 的託管 MCP 服務(ai-game.dev);需要 OAuth 登入;Streamable HTTP。
暫無 AI 概覽:以下資訊來自註冊中心條目和服務本身。
- 端點
- ai-game.dev
- 最近檢查
安裝
在 SourceWeft 中
- 開啟 儀表板中的 AI Game Developer: MCP for Unity, Unreal and Godot,將其新增到工作區。
- 連接 所需的 憑證。它們會被私密儲存,絕不會在公開頁面上展示。
- 為需要使用其工具的對話啟用該服務。
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
✨ AI Game Developer — Unity SKILLS, MCP
[MCP]
[OpenUPM]
[Docker Image]
[Unity Editor]
[Unity Runtime]
[r]
[Discord]
[OpenUPM]
[Stars]
[License]
[Stand With Ukraine]
[Claude] [Codex] [Cursor] [GitHub Copilot] [Gemini] [Antigravity] [VS Code] [Rider] [Visual Studio] [Open Code] [Cline] [Kilo Code]
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
https://github.com/user-attachments/assets/228baf4d-4f00-4dce-939d-fb985ebdd8dd
OR use cli
[AI Game Developer — Unity SKILLS and MCP]
Quick Start
Get up and running in three steps:
- Install plugin — download the
.unitypackageinstaller or runopenupm add com.ivanmurzak.unity.mcpAlternative:
npx unity-mcp-cli install-plugin ./MyUnityProject— see CLI documentation - Pick an AI agent — Claude Code, Claude Desktop, GitHub Copilot, Cursor, or any other
- Setup AI agent — open
Window/AI Game Developerin 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
The plugin ships with 70+ built-in tools across four categories. Each tool brings AI skill. All tools are available immediately after installation — no extra configuration required. See docs/default-mcp-tools.md for the full reference with detailed descriptions.
🧰 Browse the full MCP tools registry online: ai-game.dev/docs/tools
Project & Assets
assets-copy- Copy the asset at path and stores it at newPathassets-create-folder- Creates a new folder in the specified parent folderassets-delete- Delete the assets at paths from the projectassets-find- Search the asset database using the search filter stringassets-find-built-in- Search the built-in assets of the Unity Editorassets-get-data- Get asset data from the asset file including all serializable fields and propertiesassets-material-create- Create new material asset with default parametersassets-modify- Modify asset file in the projectassets-move- Move the assets at paths in the project (also used for rename)assets-prefab-close- Close currently opened prefabassets-prefab-create- Create a prefab from a GameObject in the current active sceneassets-prefab-instantiate- Instantiates prefab in the current active sceneassets-prefab-open- Open prefab edit mode for a specific GameObjectassets-prefab-save- Save a prefab in prefab editing modeassets-refresh- Refreshes the AssetDatabaseassets-shader-get-data- Get detailed data about a shader asset (properties, subshaders, passes)assets-shader-list-all- List all available shaders in the project assets and packagespackage-add- Install a package from the Unity Package Manager registry, Git URL, or local pathpackage-list- List all packages installed in the Unity project (UPM packages)package-remove- Remove (uninstall) a package from the Unity projectpackage-search- Search for packages in both Unity Package Manager registry and installed packages
Scene & Hierarchy
gameobject-component-add- Add Component to GameObjectgameobject-component-destroy- Destroy one or many components from target GameObjectgameobject-component-get- Get detailed information about a specific Component on a GameObjectgameobject-component-list-all- List C# class names extended from UnityEngine.Componentgameobject-component-modify- Modify a specific Component on a GameObjectgameobject-create- Create a new GameObject in opened Prefab or in a Scenegameobject-destroy- Destroy GameObject and all nested GameObjects recursivelygameobject-duplicate- Duplicate GameObjects in opened Prefab or in a Scenegameobject-find- Finds specific GameObject by provided informationgameobject-modify- Modify GameObjects and/or attached component's fields and propertiesgameobject-set-parent- Set parent GameObject to list of GameObjectsobject-get-data- Get data of the specified Unity Objectobject-modify- Modify the specified Unity Objectscene-create- Create new scene in the project assetsscene-get-data- Retrieves the list of root GameObjects in the specified scenescene-list-opened- Returns the list of currently opened scenes in Unity Editorscene-open- Open scene from the project asset filescene-save- Save opened scene to the asset filescene-set-active- Set the specified opened scene as the active scenescene-unload- Unload scene from the opened scenes in Unity Editorscreenshot-camera- Captures a screenshot from a camera and returns it as an imagescreenshot-game-view- Captures a screenshot from the Unity Editor Game Viewscreenshot-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
Scripting & Editor
console-clear-logs- Clears the MCP log cache and the Unity Editor Console windowconsole-get-logs- Retrieves Unity Editor logs with filtering optionseditor-application-get-state- Returns information about the Unity Editor application state (playmode, paused, compilation)editor-application-set-state- Control the Unity Editor application state (start/stop/pause playmode)editor-selection-get- Get information about the current Selection in the Unity Editoreditor-selection-set- Set the current Selection in the Unity Editorreflection-method-call- Call any C# method with input parameters and return resultsreflection-method-find- Find method in the project using C# Reflection (even private methods)script-delete- Delete the script file(s)script-execute- Compiles and executes C# code dynamically using Roslynscript-read- Reads the content of a script filescript-update-or-create- Updates or creates script file with the provided C# codetests-run- Execute Unity tests (EditMode/PlayMode): any RQL selection over thetestssource as one run, results filtered with RQLtype-get-json-schema- Generate a JSON Schema for a C# type via reflection
Profiling & Diagnostics
- RQL source
profiler(viarql-query/rql-mutate) - memory, rendering, script and frame snapshots, module flags;Start,Stop,ClearFrames,EnableModule,Save,Load
Lighting
- RQL source
lighting(viarql-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.
[AI Game Developer — Unity SKILLS and MCP]
Contents
- Quick Start
- Skills and Tools Reference
- Contents
- Installation
- AI Workflow Examples
- Customize Tools
- Runtime usage (in-game)
- Unity
MCP Serversetup - How Unity MCP Architecture Works
- Contribution 💙💛
More Documentation
[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:
See full CLI documentation for all available commands.
Cloud sign-in & project pinning:
unity-mcp-cli loginruns 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 thatsetup-mcpwrites points at a per-project pinned endpoint (https://ai-game.dev/mcp/p/<pin>); pass--no-pinto use the sharedhttps://ai-game.dev/mcpendpoint 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.
- Claude Code (recommended)
- Claude Desktop
- GitHub Copilot in VS Code
- Antigravity
- Cursor
- Windsurf
- Any other supported
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 Developer - Option 1: Click
Auto-generateSkills (recommended) - Option 2: Click
ConfigureModel Context Protocol (MCP)
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
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
Replace
<command>from the table above
[Claude Code CLI] Claude Code CLI
Replace
<command>from the table above
[GitHub Copilot CLI] GitHub Copilot CLI
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:
Make sure
Agentmode 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
Roslynfor 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, orpropertyviaDescriptionattributes
[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:
- A class with the
AiToolTypeattribute - A method in the class with the
AiToolattribute - Optional: Add a
Descriptionattribute to each method argument to help the LLM understand it - Optional: Use
string? optional = nullproperties with?and default values to mark them asoptionalfor 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.
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.
[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.
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.
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.
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
stdiowhen the MCP client launches the server binary directly (local use — this is the most common setup). UsestreamableHttpwhen 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 at runtime; on first run or when a new authentication token is generated, the overridden values are written to the config file. On subsequent runs, overrides are applied in memory but are not automatically saved. The exception is UNITY_MCP_TOOLS, which uses [JsonIgnore] and is never persisted — it is runtime-only.
Command-line args take precedence over environment variables. Both override the saved config file value. The short flags
-url,-token, and-authare aliases; the full-UNITY_MCP_*arg names are also accepted.
Example (CI/CD batch mode):
Docker 📦
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
MCP Client config:
Replace
urlwith 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.
MCP Client config:
Custom port
MCP Client config:
Replace
urlwith 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.
MCP Client config:
Replace
<project>with your Unity project path.
[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:
- Open Window ▸ Package Manager, select the AI Game Developer — MCP package, and click Remove.
- Close Unity, then delete the
Assets/Plugins/NuGetfolder (along with itsAssets/Plugins/NuGet.metafile).
[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!
- 👉 Read Development documentation
- 👉 Fork the project
- Clone the fork and open the
./Unity-MCP-Pluginfolder in Unity - Implement new things in the project, commit, push it to GitHub
- Create Pull Request targeting original Unity-MCP repository,
mainbranch.
來源:README.md,提交 394c2ea
工具
0版本歷史
2- v9.3.2最新Nov 3, 2026
- v0.17.1Sep 16, 2026
評分
已滿足適用檢查項的 85%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通必需25 分
- 已宣告認證方式必需10 分
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分