
Unity MCP Server
io.github.rachitkumarrastogi由 GitHub 账号 rachitkumarrastogi 发布v1.7.0更新于 Oct 24, 2026
MCP server for Unity: 130+ tools, Unity 6 skills, AI/ML discovery. No Editor.
概览
一个本地 MCP 服务器,让 AI 助手无需打开 Unity 编辑器即可只读访问 Unity 项目的文件、设置、场景、预制体、脚本和资源。
- 可以做什么
- 查看项目与构建设置:项目信息、构建场景、播放器、质量、物理、图形、音频、XR 和版本控制设置、包以及 Unity Hub 项目。探索代码与程序集:列出脚本和程序集定义、按内容查找脚本、读取脚本的公开 API,并追踪程序集依赖与循环引用。浏览场景与预制体:列出场景、汇总层级、按组件或标签查找对象,并检查预制体内容与依赖。检索资源与引用:按名称或扩展名搜索、读取 .meta 文件、查找引用某资源的对象,并检测损坏的资源或脚本引用。审查材质与着色器、动画、2D、UI、输入、音频、测试、CI 配置、集成配置以及 AI/ML 资源等各类内容。
- 适用场景
- 适合在助手需要回答关于现有 Unity 项目的问题,或在不运行 Unity 编辑器的情况下协助重构、审计和发布检查时使用。适合希望直接在对话中了解项目结构、资源引用和构建就绪状态的开发者、测试人员和设计师。
- 运行要求
- 以 stdio 本地进程运行;需要 Node.js 18+,并将 UNITY_PROJECT_PATH 环境变量设为 Unity 项目根目录的绝对路径。服务器需从源码构建(npm install 与 build),并在 MCP 客户端配置文件中配置。
安装
在 SourceWeft 中
- 打开 控制台中的 Unity MCP Server,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Unity MCP Server
MCP server for Unity — Gives AI assistants structured access to your Unity project from any MCP-capable IDE or app. No Unity Editor required.
[Cursor / IDE → Unity MCP Server → Unity Project]
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_PATHper 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:
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.
📦 Project & build
💻 Code & assemblies
🎬 Scenes & prefabs
📁 Assets & references
🎨 Materials & shaders
🎞️ Animation
🖼️ 2D & sprites
✨ Rendering
📝 TextMeshPro & UI
🎮 Input
🌐 Addressables & localization
🔊 Audio
🧪 Testing & docs
🔄 CI & version control
🔌 Integrations (config discovery only)
🧱 Unity 6 coverage
⚡ Speed & productivity
🤖 AI & ML
🔍 Meta
Using search_tools — Pass an optional query to filter tools by name, description, or category. Omit query to get the full catalog grouped by category.
All tools read from the project filesystem only.
Real-life examples
Copy-paste these into Claude, Cursor, or any MCP client (with this server configured and UNITY_PROJECT_PATH set). The AI will pick the right tools.
What to type in Claude / Cursor or any other MCP Client
In Claude, Cursor, or any MCP client, ask in natural language; the AI picks the right tool. Use the Example prompt to type column in each tools table above — those are the phrases to type in chat to get that result.
Prerequisites
- Node.js 18+
- UNITY_PROJECT_PATH — Absolute path to your Unity project root (set in your MCP client)
Installation
The server uses stdio; your MCP client starts it automatically.
Configuration
Example for Cursor (same idea for Claude Desktop, VS Code + MCP, Windsurf, etc.):
Replace the paths with your actual paths. For Claude Desktop, add an entry under mcpServers in claude_desktop_config.json with the same command, args, and env. For VS Code, use your MCP extension’s config to add the server and UNITY_PROJECT_PATH. Other clients follow the same pattern in their own config files.
Development
- Run built:
node dist/index.js - Run dev:
npm run devornpx tsx src/index.ts
Integration with Unity Editor
-
Current workflow: The AI runs inside your IDE (Cursor, VS Code with MCP, Claude Desktop, Windsurf, or another MCP-capable client). This server provides the AI with read-only access to your project (scenes, scripts, settings, and related assets). You run Unity Editor separately to open scenes, enter Play mode, and build. The AI uses the server to inspect the project and to suggest changes, answer questions, and assist with refactoring.
-
Future compatibility: This server implements the standard MCP protocol over stdio and requires a single environment variable (
UNITY_PROJECT_PATH). If Unity Editor gains built-in MCP client support, you could connect it to this server using the same configuration: commandnode, arguments pointing todist/index.js, andUNITY_PROJECT_PATHset in the environment. No changes to this codebase would be required.
Security
This repository does not include game code, assets, or secrets. The Unity project path is supplied at runtime by your MCP client. The server is suitable for public and private use.
Documentation
- MCP Registry — Discover and install this server from the official registry.
- Guides: Quick start · Publish · Tools by role
- Skills: Unity-domain agent skills
- Changelog: CHANGELOG.md
来源:README.md,提交 33fbb7e
工具
0版本历史
1- v1.7.0最新Sep 16, 2026
评分
已满足适用检查项的 40%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
请在仓库或注册中心条目中声明许可证。