Unity Code MCP
Description
Unity Code MCP is a coding focused Model Context Protocol (MCP) server that enables AI agents to write Unity code autonomously.
Power your agent
การติดตั้งจากผู้เผยแพร่ ไม่ใช่เอนด์พอยต์ของ PlugMCP
URL แบบรีโมตหรือคำสั่งบนเครื่องของคุณ? การติดตั้งสองแบบต่างกันอย่างไร
รันบน PlugMCP
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
เปิดจากผู้เผยแพร่
Unity Code MCP is a coding focused Model Context Protocol (MCP) server that enables AI agents to write Unity code autonomously.
Unity Code MCP is a MCP server that enables AI agents to work on Unity project autonomously, by providing tools to compile code and run tests in Unity Editor.
Unity Code MCP is a high-performance, coding-focused MCP server built in Rust. It handles Unity's compilation cycles gracefully while providing only the essential tools needed for autonomous code development: compilation feedback and test execution.
This MCP server enables AI agents to develop Unity code autonomously with exceptional speed and reliability - write code, compile, fix compile errors, test, fix bugs, repeat, just like how a human would.
Unity Code MCP provides 2 tools for autonomous code development:
Asset database refresh tool in action:

Test execution tool in action:

Once configured, AI agents can develop Unity code completely autonomously:
User: "Create a player controller that moves with WASD keys and has jump functionality. Make sure it's fully tested."
AI: I'll create a complete player controller with movement and jumping, then write comprehensive tests.
1. [AI writes PlayerController.cs with movement logic]
2. [AI calls: refresh_asset_database]
→ Result: "Compilation failed: CS0246: The type or namespace name 'Rigidbody' could not be found"
3. [AI fixes the missing using UnityEngine; statement]
4. [AI calls: refresh_asset_database]
→ Result: "Compilation successful, no errors"
5. [AI writes PlayerControllerTests.cs with movement and jump tests]
6. [AI calls: run_tests]
→ Result: "5 tests passed, 2 tests failed: NullReferenceException in Jump_ShouldApplyUpwardForce, ArgumentException in Move_WithInvalidInput"
7. [AI analyzes failures and fixes null reference and input validation bugs]
8. [AI calls: refresh_asset_database]
→ Result: "Compilation successful, no errors"
9. [AI calls: run_tests]
→ Result: "All 7 tests passed successfully"
AI: ✅ Complete! Created a fully functional PlayerController with WASD movement, jump mechanics, and comprehensive test coverage. All tests are passing.
This demonstrates true autonomous development - from user request to fully tested, working Unity code without any human intervention.
AI agent in action, tell Kimi K2 to fix compile errors in Unity project with no context:

Install the Visual Studio Code Editor package in your Unity project.
Important: The Visual Studio Code Editor package must be enabled (that is, you most select an external script editor provided by Visual Studio Code Editor for it to be enabled) for unity_code_mcp to work. Verify this in Unity at
Preferences→External Tools→External Script Editor- it should show something like "Visual Studio Code Editor v1.0.12 enabled".
Option A: Download Release (Recommended) (Windows Only)
Option B: Build from Source
cargo build --release
Add the MCP server to your AI assistant configuration:
For Cursor/Trae:
{
"mcpServers": {
"unity-code": {
"command": "/path/to/unity-code-mcp",
"env": {
"UNITY_PROJECT_PATH": "${workspaceFolder}"
}
}
}
}
For VS Code with MCP Extension:
{
"mcp.servers": {
"unity-code": {
"command": "/path/to/unity_code_mcp",
"env": {
"UNITY_PROJECT_PATH": "${workspaceFolder}"
}
}
}
}
For Claude Desktop:
{
"mcpServers": {
"unity-code": {
"command": "/path/to/unity_code_mcp"
}
}
}
Note: The
UNITY_PROJECT_PATHenvironment variable is a fallback option. If your IDE supports the MCProotscapability, the server will automatically detect Unity projects from the provided workspace roots and prioritize that over the environment variable.
Troubleshooting: If
${workspaceFolder}doesn't work in your IDE, try using an absolute path instead, e.g.,"UNITY_PROJECT_PATH": "/absolute/path/to/your/unity/project". Alternatively, ask your IDE developer to add support for the MCProotscapability.
Important: Use absolute paths for the binary command.
The code is cross platform, but I can't build or test for other platforms, because I only use Windows. If there are platform specific bugs, you have to fix them yourself.
To run the test suite:
Start Unity Editor with the embedded test project:
# Open Unity Editor and load the project at:
# ./UnityProject
Run tests (single-threaded to avoid Unity conflicts):
cargo test -- --test-threads=1
Note: Tests require a running Unity Editor instance with the embedded project loaded. Tests may take 30-60 seconds to complete due to Unity Editor interactions.
aws-lc-rs dependency
xcode-select --install)sudo apt-get install build-essential on Ubuntu/Debian)aws-lc-rs dependency
brew install cmakesudo apt-get install cmake (Ubuntu/Debian)# Debug build
cargo build
# Release build (recommended for production)
cargo build --release
Contributions are welcome! Please:
cargo test -- --test-threads=1This project is licensed under the MIT License - see the LICENSE file for details.
Unity Code MCP is a MCP server that enables AI agents to work on Unity project autonomously, by providing tools to compile code and run tests in Unity Editor.
เครื่องมือ
ยังไม่มีรายการเครื่องมือ เซิร์ฟเวอร์แบบรีโมตจะได้รายการหลังการตรวจสอบสถานะครั้งแรก
FAQ
คัดลอกคอนฟิก stdio สำหรับ Cursor, Claude Desktop, Claude Code หรือ VS Code ได้ในหน้านี้ คอนฟิกนี้ใช้การติดตั้งของผู้เผยแพร่ ไม่ใช่พร็อกซีของ PlugMCP
ระเบียนนี้ไม่ได้ระบุตัวแปรสภาพแวดล้อมที่จำเป็น
Unity Code ทำงานแบบโลคัลผ่าน stdio
ตรวจสอบล่าสุดเมื่อ 2026-10-28 Unity Code MCP is a MCP server that enables AI agents to work on Unity project autonomously, by providing tools to compile code and run tests in Unity Editor.