
quazaai/unitymcpintegration 是一个从 https://github.com/quazaai/unitymcpintegration. 导入的 MCP 服务器候选程序。
概览
quazaai/unitymcpintegration 是一个从 https://github.com/quazaai/unitymcpintegration. 导入的 MCP 服务器候选程序。
概述(AI 翻译)
该软件包实现了模型上下文协议(MCP)与Unity编辑器之间的无缝集成,使AI助手能够实时理解并与您的Unity项目互动。通过这种集成,AI助手可以访问您的场景层级、项目设置信息,并直接在Unity编辑器上下文中执行代码。
📚 特色
- 直接浏览和操作项目文件
- 访问关于你Unity项目的实时信息
- 了解你的场景层级和游戏对象
- 直接在Unity编辑器中执行C#代码
- 监控日志和错误
- 控制编辑器的播放模式
- 等待代码执行
🚀 开始
先决条件
- Unity 2021.3 或更高版本
- Node.js 18+(用于运行MCP服务器)
安装
1.安装Unity包
你有几个安装Unity包的选项:
选项A:包管理器(Git URL)
- 打开Unity包管理器(
Window > Package Manager) - 点击
+按钮,选择Add package from git URL... - 输入仓库网址:
https://github.com/quazaai/UnityMCPIntegration.git - 点击
Add
选项B:导入自定义软件包 1.
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
🚀 Advacned Unity MCP Integration
This package provides a seamless integration between Model Context Protocol (MCP) and Unity Editor, allowing AI assistants to understand and interact with your Unity projects in real-time. With this integration, AI assistants can access information about your scene hierarchy, project settings, and execute code directly in the Unity Editor context.
📚 Features
- Browse and manipulate project files directly
- Access real-time information about your Unity project
- Understand your scene hierarchy and game objects
- Execute C# code directly in the Unity Editor
- Monitor logs and errors
- Control the Editor’s play mode
- Wait For Code Execution
🚀 Getting Started
Prerequisites
- Unity 2021.3 or later
- Node.js 18+ (for running the MCP server)
Installation
1. Install Unity Package
You have several options to install the Unity package:
Option A: Package Manager (Git URL)
- Open the Unity Package Manager (
Window > Package Manager) - Click the
+button and selectAdd package from git URL... - Enter the repository URL:
https://github.com/quazaai/UnityMCPIntegration.git - Click
Add
Option B: Import Custom Package
- Clone this repository or download it as a unityPackage
- In Unity, go to
Assets > Import Package > Custom Package - Select the
UnityMCPIntegration.unitypackagefile
2. Set up the MCP Server
You have two options to run the MCP server:
Option A: Run the server directly
安装
npx -y @smithery/cli install @quazaai/unitymcpintegration --client claude配置
{
"mcpServers": {
"unity-mcp-server": {
"command": "node",
"args": [
"path-to-project>\\Library\\PackageCache\\com.quaza.unitymcp@d2b8f1260bca\\mcpServer\\mcpServer\\build\\index.js"
],
"env": {
"MCP_WEBSOCKET_PORT": "5010"
}
}
}
}