RU

rachitkumarrastogi/unity-mcp-server

开发工具

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

7 stars 6 forks 质量 90 趋势 35MIT

统一 MCP 服务器

概览

——向AI助手提供结构化访问您的Unity项目(Unity 6 ready),来自任何MCP能开发的IDE或app. 不需要统一编辑器 。 您的 IDE 向这个服务器说话; 服务器读取您的 Unity 项目文件夹, 用项目信息回答, 构建场景, 脚本, 预发文件, 以及更多—— 这样AI 就可以不打开编辑器而提供帮助 。 - 仅从项目文件系统读取 。 在MCP配置中设置Unity PROJECT PATH每个项目. - 与任何支持模式上下文协议的客户端合作(工具大于stdio). 此服务器使用标准并曝光 。 任何能够运行 MCP 服务器和通过环境变量的IDE或应用程序都会奏效. 常用客户包括: 配置在任何地方都是一样的: = 节点, = dist/index.js的路径, = UNITY PROJECT PATH=你的团结项目根. ưμ㼯A 将下面的一个类别扩展到它包含的工具 .

概述(AI 翻译)

Unitedy3D MCP服务器用于Cursor,克洛德桌面,克洛德代码,VS代码,Windsurf,以及任何MCP客户端 – 给予AI助手从任何MCP有能力的IDE或app中结构化访问你的Unity项目(Unity 6 ready). 不需要统一编辑器 。

您的 IDE 向这个服务器说话; 服务器读取您的 Unity 项目文件夹, 用项目信息回答, 构建场景, 脚本, 预发文件, 以及更多—— 这样AI 就可以不打开编辑器而提供帮助 。

– – . . .

□ 概览

  • ** 无编辑器 ** — 只从项目文件系统读取 。
  • 一个服务器,许多项目——在您的 MCP 配置中每个项目设置 [[T0] 。
  • ** MCP-内在**——与任何支持《示范背景协议》的客户进行协作(工具大于结构)。

– – . . .

□ 支持IDEs和客户端

这个服务器使用标准 ** MCP 协议在stdio之上,并曝光了tools**. 任何能够运行 MCP 服务器和通过环境变量的IDE或应用程序都会奏效. 常用客户包括:

QQ 客户端 QQ 笔记 QQ |-|-. ** ** Cursor ** 将服务器添加到 MCP 设置中;在 [T2] 中设置 UNITY_PROJECT_PATH. | ** ** Claude 桌面 ** * * * * 添加到 [[T3] ; 相同命令 + env 模式 。 * *

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

README

以下为原文 README 节选,完整内容请查看原文。

Unity MCP Server

Unity3D MCP Server for Cursor, Claude Desktop, Claude Code, VS Code, Windsurf, and any MCP client — Gives AI assistants structured access to your Unity project (Unity 6 ready) from any MCP-capable IDE or app. No Unity Editor required.

Your IDE talks to this server; the server reads your Unity project folder and answers with project info, build scenes, scripts, prefabs, and more — so the AI can help without opening the Editor.


Overview

  • Editor-free — Reads only from the project filesystem.
  • One server, many projects — Set UNITY_PROJECT_PATH per project in your MCP config.
  • MCP-native — Works with any client that supports the Model Context Protocol (tools over stdio).

Supported IDEs and clients

This server uses the standard MCP protocol over stdio and exposes tools. Any IDE or app that can run an MCP server and pass environment variables will work. Commonly used clients include:

Client Notes
Cursor Add server to MCP settings; set UNITY_PROJECT_PATH in env.
Claude Desktop Add to claude_desktop_config.json; same command + env pattern.
Claude Code MCP support including tools.
VS Code Use an MCP extension (e.g. GenAI / Copilot MCP); configure server and UNITY_PROJECT_PATH.
Windsurf Add MCP server with command and env.
Continue Configure MCP server in Continue settings.
Cline MCP tools and resources.
Other Any client that supports MCP tools over stdio (e.g. Zed, Roo Code, LibreChat, custom agents).

Configuration is the same everywhere: command = node, args = path to dist/index.js, env = UNITY_PROJECT_PATH = your Unity project root. See Configuration below for a Cursor example; other clients use the same structure in their own config format.


Tools

Expand a category below to see the tools it includes.

在 GitHub 查看完整 README

安装

npx -y unity-mcp-server
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "unity": { "command": "npx", "args": ["-y", "unity-mcp-server"], "env": { "UNITY_PROJECT_PATH": "/absolute/path/to/YourUnityProject" } } } }