
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 分
請在儲存庫或註冊中心條目中宣告授權條款。