
hackerzhuli/unity_code_mcp
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
Unity Code MCP は、AI エージェントがUnity プロジェクトを自律的に動作させる MCP サーバーです。Unity エディターでコードをコンパイルし、テストを実行するためのツールを提供しています.
概要
Unity Code MCP は、AI エージェントがUnity コードを自動で書き込むことを可能にする、モデル・コンテキスト・プロトコル (MCP) をコーディングするサーバーです。 Unity Code MCP は、Rust で構築された MCP サーバーの高性能なコーディング重視です。 Unityのコンパイルサイクルを適切に処理し、自動コード開発に必要な重要なツールのみを提供します。コンパイルフィードバックとテスト実行。 このMCPサーバーでは、AIエージェントは、例外的な速度と信頼性でUnityコードを自律的に開発することができます。コードを書く、コンパイル、コンパイルエラーの修正、テスト、バグの修正、リピートなど。 - : 効率的なAIエージェントのコーディングワークフロー用に設計された合理化されたツール - : 卓越した速度、最小限のメモリ使用量、超高速応答時間のためにRustで構築。 ワークスペースがUnityプロジェクトではなく、1MBのメモリのみを使用し、プロジェクト用にUnity Editorが開いているのは10MBのみです。 また、Unity Editorとの通信はUDPをベースにしているため、システムへの負荷が最小限に抑えられます.
概要(AI 翻訳)
説明
Unity Code MCP は、AI エージェントがUnity コードを自動で書き込むことを可能にする、モデル・コンテキスト・プロトコル (MCP) をコーディングするサーバーです。
ユニティコードMCPの理由
Unity Code MCP は、Rust で構築された MCP サーバーの高性能なコーディング重視です。 Unityのコンパイルサイクルを適切に処理し、自動コード開発に必要な重要なツールのみを提供します。コンパイルフィードバックとテスト実行。
このMCPサーバーでは、AIエージェントは、例外的な速度と信頼性でUnityコードを自律的に開発することができます。コードを書く、コンパイル、コンパイルエラーの修正、テスト、バグの修正、リピートなど。
✨ 主な特長
- ** コーディング最適化**: 効率的なAIエージェントのコーディングワークフロー用に設計された合理化されたツール
- ** ⚡ ライト級選手および高性能**:例外的な速度、最低の記憶使用法および落雷速い応答の時間のための錆で造られる。 ワークスペースがUnityプロジェクトではなく、1MBのメモリのみを使用し、プロジェクト用にUnity Editorが開いているのは10MBのみです。 また、Unity Editorとの通信はUDPをベースにしているため、システムへの負荷が最小限に抑えられます.
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
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.
🎯 Why Unity Code MCP?
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.
✨ Key Features
- 🤖 Coding-Optimized: Streamlined tools designed for efficient AI agent coding workflows
- ⚡ Lightweight and High Performance: Built in Rust for exceptional speed, minimal memory usage, and lightning-fast response times. Uses only 1MB memory when the workspace is not a Unity Project, and only 10MB when it is and Unity Editor is open for the project. Also, the communication with Unity Editor is based on UDP, so it’s minimal load for your system.
- 🎯 Efficient Communication: Minimal token usage with essential operations, only returns relevant information
- 🧪 Test-Driven: Comprehensive test execution and reporting capabilities
- 📦 Self-Contained: Single binary with no runtime dependencies (no Node.js, Python, or .NET required)
🛠️ MCP Server Tools
Unity Code MCP provides 2 tools for autonomous code development:
1. Asset Database Refresh
- Triggers Unity compilation and asset processing
- Returns compile errors and other non compile warning and errors only include the logs during the refresh
- Handles domain reload gracefully
Asset database refresh tool in action:
2. Test Execution
- Runs Unity tests with comprehensive reporting
- Provides detailed stack traces and logs for failures
- Supports both EditMode and PlayMode tests
Test execution tool in action:
🚀 Autonomous AI agent workflow example
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]
インストール
This server does not publish a one-line install command.
Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →設定
{
"mcpServers": {
"unity-code": {
"command": "/path/to/unity-code-mcp",
"env": {
"UNITY_PROJECT_PATH": "${workspaceFolder}"
}
}
}
}