QU

quazaai/unitymcpintegration

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

155 stars 34 forks 质量 67 趋势 0MIT

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)

  1. 打开Unity包管理器(Window > Package Manager)
  2. 点击+按钮,选择Add package from git URL...
  3. 输入仓库网址:https://github.com/quazaai/UnityMCPIntegration.git
  4. 点击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)

  1. Open the Unity Package Manager (Window > Package Manager)
  2. Click the + button and select Add package from git URL...
  3. Enter the repository URL: https://github.com/quazaai/UnityMCPIntegration.git
  4. Click Add

Option B: Import Custom Package

  1. Clone this repository or download it as a unityPackage
  2. In Unity, go to Assets > Import Package > Custom Package
  3. Select the UnityMCPIntegration.unitypackage file

2. Set up the MCP Server

You have two options to run the MCP server:

Option A: Run the server directly

在 GitHub 查看完整 README

安装

npx -y @smithery/cli install @quazaai/unitymcpintegration --client claude
新手?先看 mcpskill.org 教程 →

配置

{ "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" } } } }