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.

已驗證STDIO僅桌面檔案與儲存開發者工具

概覽

AI 產生的概覽

一個本機 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 用戶端設定檔中設定。
安裝前請注意
伺服器會讀取專案資料夾,助理因此可看到專案檔案、設定與儲存庫文件;請只將 UNITY_PROJECT_PATH 指向你願意向用戶端揭露的專案。它是唯讀的,不會開啟編輯器,因此無法自行修改內容或執行建置。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Unity MCP Server,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

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.

[npm version] [MCP Registry]

[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_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:

ClientNotes
CursorAdd server to MCP settings; set UNITY_PROJECT_PATH in env.
Claude DesktopAdd to claude_desktop_config.json; same command + env pattern.
Claude CodeMCP support including tools.
VS CodeUse an MCP extension (e.g. GenAI / Copilot MCP); configure server and UNITY_PROJECT_PATH.
WindsurfAdd MCP server with command and env.
ContinueConfigure MCP server in Continue settings.
ClineMCP tools and resources.
OtherAny 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.


📦 Project & build
ToolDescriptionExample prompt to type
get_project_infoPath, Unity version, build scene count, player/product name"What's my project path and Unity version?" · "Show build scene count and player name"
list_build_scenesScenes in EditorBuildSettings (build order)"Which scenes are in the build?" · "List build scenes in order"
get_player_settingsProduct name, company, bundle ID, version"What are the player settings?" · "Show bundle ID and company name"
list_packagesPackages from manifest.json"List installed Unity packages"
get_quality_settingsQuality levels"What are the quality settings?"
get_scripting_definesGlobal and per-assembly defines"Show scripting defines" · "What defines are set per assembly?"
get_physics_settingsPhysics / Physics2D settings"What are the physics settings?"
get_graphics_settingsGraphics settings (GraphicsSettings.asset)"Show graphics settings"
get_time_settingsTime / fixed timestep (TimeManager.asset)"What's the fixed timestep?" · "Show time settings"
get_build_target_infoActive build target / platform"What's the current build target?"
get_feature_set_inferenceInfer Unity 6 feature sets from packages (2D, ECS, AR, etc.)"What feature sets does this project use?"
get_project_versionBundle version"What's the bundle version?"
get_changelogCHANGELOG contents"Show the changelog"
get_audio_settingsAudioManager.asset (global volume, reverb, DSP buffer)"What are the audio settings?"
get_navigation_settingsNavMesh/agent settings from ProjectSettings"Show NavMesh / navigation settings"
get_xr_settingsXR/VR project settings"What XR or VR settings are configured?"
get_script_execution_orderScript execution order (MonoManager)"Show script execution order"
get_version_control_settingsSerialization mode, visible meta files"What's the version control / serialization setup?"
get_layer_collision_matrixLayer collision matrix and layer names"Show layer collision matrix" · "What layers collide?"
get_cloud_services_configUnity Cloud / Unity Connect config"Is Unity Cloud configured?"
get_package_dependency_graphPackage dependency graph (manifest + lock)"Show package dependency graph"
list_package_samplesSamples folders under Packages"List package samples"
list_unity_hub_projectsList Unity projects from Unity Hub (no project path required)"List my Unity Hub projects"
💻 Code & assemblies
ToolDescriptionExample prompt to type
list_assembliesAssembly definitions with references, platforms"List assembly definitions"
get_assembly_for_pathAssembly that contains a given script or folder path"Which assembly contains Assets/Scripts/Player.cs?"
list_scripts_by_assemblyC# script paths in a given assembly (by name or asmdef path)"List scripts in Assembly-CSharp" · "What scripts are in MyGame.Runtime?"
list_asmdef_referencesAssembly names that reference a given assembly (reverse deps)"Who depends on MyGame.Core?"
list_scriptsC# scripts (optional folder filter)"List all C# scripts" · "Show scripts in Assets/Scripts"
find_scripts_by_contentBy type/pattern (e.g. MonoBehaviour)"Find scripts that extend MonoBehaviour"
get_assembly_dependency_graphNodes and edges"Show assembly dependency graph"
list_editor_scriptsScripts in Editor folders"List editor scripts"
list_visual_scripting_assetsBolt / Unity Visual Scripting .asset files"List Visual Scripting assets"
get_script_public_apiParse C# script: class name, base type, public methods/fields"What's the public API of PlayerController.cs?"
🎬 Scenes & prefabs
ToolDescriptionExample prompt to type
list_all_scenesAll .unity files under Assets"List all scenes"
get_scene_summaryRoot GameObjects, component count"Summarize MainMenu.unity" · "What's in this scene?"
get_scene_components_by_typeGameObjects in a scene with a component type (e.g. Camera, Light)"Which GameObjects have a Camera in Game.unity?"
get_scene_objects_by_tagGameObjects in a scene with a given tag (e.g. Spawn)"Find objects with tag Spawn in this scene"
get_all_components_by_typeAll Cameras/Lights/etc. across all scenes"List all Cameras in the project"
get_scene_hierarchy_flatFlat list of GameObjects in a scene (name and layer)"List all objects in Main.unity with their layers"
get_lighting_scene_infoLighting assets and GI workflow mode for a scene"What lighting does Main.unity use?"
list_prefabsPrefabs (optional path prefix)"List all prefabs" · "List prefabs in Assets/Prefabs"
list_prefab_variantsPrefabs that are variants of another prefab"List prefab variants"
list_prefabs_with_componentPrefabs that contain a component type (e.g. Animator)"Which prefabs have an Animator?"
get_prefab_summaryPrefab summary: root name, component count, component types"Summarize Hero.prefab" · "What's in this prefab?"
get_prefab_script_guidsScript GUIDs used by a prefab"What scripts does Hero.prefab use?"
list_subscenesECS/DOTS .subscene assets"List subscenes"
📁 Assets & references
ToolDescriptionExample prompt to type
get_asset_folder_treeFolder tree under Assets"Show asset folder tree"
list_assets_by_extensionBy extension (e.g. .png, .fbx)"List all .png textures" · "List FBX models"
find_referencesAssets referencing a path or GUID"What references this asset?" · "Find what uses Assets/Textures/hero.png"
list_large_assetsFiles over N MB (default 5)"List large assets" · "What's over 10 MB?"
list_video_clipsVideo clip assets (.mp4, .mov, .webm, etc.)"List video clips"
list_legacy_font_assetsLegacy fonts (.fontsettings, .ttf, .otf) — not TMP"List legacy fonts"
list_render_texturesRenderTexture assets"List render textures"
list_terrain_dataTerrainData and TerrainLayer assets"List terrain data"
list_lighting_settings_assetsLighting-related .asset files"List lighting settings assets"
search_assets_by_nameSearch Assets (and optionally Packages) by name pattern"Search assets named 'hero'"
get_texture_metaTexture .meta (maxSize, dimensions, spriteMode, PPU)"What's the import settings for hero.png?"
search_projectCombined search: name pattern, script pattern, and/or referrers of path"Search project for X" · "What references this path?"
get_meta_for_assetRead .meta for any asset path (guid, importer keys)"Show .meta for Assets/Models/character.fbx"
get_broken_asset_refsPrefabs/scenes/materials with any missing GUID reference"Find broken asset references"
list_scriptable_objects.asset files that are ScriptableObject instances"List all ScriptableObject assets"
🎨 Materials & shaders
ToolDescriptionExample prompt to type
list_materialsMaterials (optional folder)"List all materials" · "List materials in Assets/Materials"
list_materials_using_shaderMaterials that use a given shader (GUID or path)"Which materials use Standard shader?"
list_shaders.shader in Assets and Packages"List shaders"
list_shader_graphsShader Graph assets"List Shader Graph assets"
list_vfx_graphsVFX Graph assets"List VFX Graph assets"
🎞️ Animation
ToolDescriptionExample prompt to type
list_animator_controllers.controller assets"List animator controllers"
list_animation_clips.anim assets"List animation clips"
get_animator_statesState names from a controller"What states are in Player.controller?"
get_animator_transitionsState names and from/to transitions from a controller"Show animator transitions in Player.controller"
list_timeline_playablesTimeline .playable assets"List Timeline playables"
list_avatar_masksAvatar Mask (.mask) assets"List avatar masks"
list_animator_override_controllersAnimatorOverrideController assets"List animator override controllers"
🖼️ 2D & sprites
ToolDescriptionExample prompt to type
list_sprite_atlasesSprite Atlas assets"List sprite atlases"
list_tilemap_assetsTilemap-related assets"List tilemap assets"
list_sprite_assetsTextures configured as sprites (spriteMode in .meta)"List sprite assets"
✨ Rendering
ToolDescriptionExample prompt to type
list_render_pipelinesURP/HDRP pipeline assets, volume profiles"List render pipelines" · "What URP/HDRP assets are there?"
📝 TextMeshPro & UI
ToolDescriptionExample prompt to type
list_tmp_fontsTMP/font assets"List TextMeshPro fonts"
get_tmp_settings_pathTMP Settings asset path"Where is TMP Settings?"
list_ui_documents.uxml and .uss (UI Toolkit)"List UI Toolkit documents" · "List UXML and USS files"
🎮 Input
ToolDescriptionExample prompt to type
get_input_axesInputManager axes"What's in the Input Manager?" · "Show input axes"
list_input_action_assetsNew Input System .inputactions"List Input System action assets"
get_input_actions_summaryAction maps and actions from a file"Summarize Player.inputactions"
🏷️ Tags & layers
ToolDescriptionExample prompt to type
get_tags_and_layersTags and layers from TagManager"Show tags and layers"
🌐 Addressables & localization
ToolDescriptionExample prompt to type
get_addressables_infoGroups and config path"What Addressables groups are there?"
get_localization_tablesLocalization table files"List localization tables"
🔊 Audio
ToolDescriptionExample prompt to type
list_audio_clips.wav, .mp3, .ogg, .aiff"List audio clips"
list_audio_mixersAudio Mixer assets"List audio mixers"
🧪 Testing & docs
ToolDescriptionExample prompt to type
list_test_assembliesTest assembly definitions"List test assemblies"
get_repo_docsREADME, CONTRIBUTING, .cursorrules, etc."Show repo docs" · "What's in the README?"
read_agent_docs.agents/AGENT.md, optional REPO_UNDERSTANDING.md"Read agent docs" · "Show AGENT.md"
🔄 CI & version control
ToolDescriptionExample prompt to type
list_ci_configs.github/workflows, Jenkinsfile, unity-cloud-build"List CI configs" · "Show GitHub workflows"
list_presets.preset assets"List presets"
get_git_lfs_trackedLFS patterns from .gitattributes"What does Git LFS track?"
get_plastic_configPlastic SCM config"Show Plastic SCM config"
🔌 Integrations (config discovery only)
ToolDescriptionExample prompt to type
get_playfab_configTitle ID, config paths"Is PlayFab configured?"
list_figma_related_assetsFigma folder / named assets"List Figma-related assets"
get_firebase_configGoogleServices path, project ID"Show Firebase config"
get_steam_configsteam_appid.txt, Steamworks path"Is Steam configured?"
get_discord_configDiscord SDK path"Show Discord config"
get_fmod_configBanks path, bank files"Show FMOD config"
get_wwise_configSound banks, project paths"Show Wwise config"
list_substance_assets.sbsar, .sbs"List Substance assets"
list_speedtree_assets.spm, .stm"List SpeedTree assets"
list_lottie_assetsLottie JSON assets"List Lottie assets"
get_analytics_or_crash_configSentry, Crashlytics, BugSnag, etc."What analytics or crash reporting is set up?"
get_ads_configUnity Ads, AdMob, ironSource presence"Is ads SDK configured?"
get_multiplayer_stackNetcode / multiplayer packages and scripts"What multiplayer stack does this use?"
get_ugs_cloud_stackUnity Gaming Services / Cloud Code inventory"Is UGS or Cloud Code set up?"
🧱 Unity 6 coverage
ToolDescriptionExample prompt to type
list_build_profilesUnity 6 Build Profile assets"List build profiles"
get_physics_stackUnity Physics / Physics Core 2D / classic physics"Audit the physics stack"
get_optimization_package_inventoryAdaptive Performance + Project Auditor"Is Adaptive Performance installed?"
get_accessibility_stackAccessibility APIs and packages"Any accessibility APIs in use?"
list_cinemachine_assetsCinemachine cameras and related assets"List Cinemachine assets"
get_platform_build_hintsAndroid/WebGL PlayerSettings snippets"Show platform build hints"
get_render_pipeline_migration_hintsBIRP vs URP/HDRP migration risk"Are we still on Built-in RP?"
get_localization_stackLocalization package + locale tables"Audit localization setup"
⚡ Speed & productivity
ToolDescriptionExample prompt to type
get_project_statsOne-shot stats: scripts, prefabs, scenes, materials, animations, assemblies, packages"Give me project stats" · "How many prefabs and scenes?"
get_scene_referenced_assetsAsset paths referenced by a scene (build size / impact)"What assets does Main.unity reference?"
detect_assembly_cyclesCircular refs in assembly definitions (fix compile errors)"Detect assembly cycles" · "Any circular assembly refs?"
find_script_referencesC# files that reference a type/class name (refactoring)"Find references to PlayerController"
get_broken_script_refsPrefabs/scenes with missing script refs"Find prefabs with missing script"
get_prefab_dependenciesAsset paths referenced by a prefab (impact analysis)"What does Hero.prefab depend on?"
get_release_readinessOne-shot: version, build scenes, packages, broken refs, cycles, large assets"Is the project release ready?" · "Run release readiness check"
get_build_size_estimateBuild size estimate: total size and largest assets from build scenes"What's the build size?" · "Show largest assets in the build"
🤖 AI & ML
ToolDescriptionExample prompt to type
get_ai_stack_summaryOne-shot AI audit: packages, models, scripts, ML-Agents YAMLs"What AI does this project use?" · "Run an AI stack audit"
get_ai_ml_package_inventoryML-Agents, Sentis, Barracuda, AI Navigation, Muse, Unity AI"List AI/ML Unity packages"
list_ml_model_assets.onnx, .nn, .pt, .tflite, .pb model files"List ONNX models in the project"
find_ai_related_scriptsC# with Sentis, ML-Agents, NavMesh, behavior trees, LLM APIs"Which scripts use ML-Agents or Sentis?"
list_ml_agents_training_configsML-Agents trainer YAML configs"Find ML-Agents training configs"
list_ai_prompt_or_config_assetsPrompt/RAG-like JSON or MD under Assets"Any LLM prompt assets in Assets?"
list_ai_skillsBundled skills by Unity domain (39: scenes, multiplayer, build profiles, …)"List Unity skills"
read_ai_skillRead skill by id (e.g. unity-scenes-workflow, unity-multiplayer-netcode)"Read the unity-ai-audit skill"
🔍 Meta
ToolDescriptionExample prompt to type
search_toolsFind relevant tools by intent (e.g. find references, missing script). Omit query to list all tools by category."What Unity tools do you have?" · "Find tools for references" · "List all tools by category"

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.

IntentExample queryTools you get (conceptually)
Find what references an assetfind referencesfind_references, search_project, …
Fix missing script on prefabsmissing scriptget_broken_script_refs, …
Work with texturestextureget_texture_meta, list_assets_by_extension, …
List or inspect prefabsprefablist_prefabs, list_prefabs_with_component, get_prefab_dependencies, …
Scenes and build orderscene or buildlist_all_scenes, list_build_scenes, get_scene_summary, …
C# scripts and APIsscript or assemblylist_scripts, get_script_public_api, find_scripts_by_content, …
Animationanimation or animatorlist_animator_controllers, list_animation_clips, …
List everything (no filter)(omit query)All tools, 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.

RoleExample prompt
Developer"Which assembly contains Assets/Scripts/Player.cs?" · "List scripts in MyGame.Runtime" · "Who depends on MyGame.Core?" · "Are there assembly dependency cycles?" · "Run release readiness check"
Tester"Which scenes are in the build?" · "List assemblies that have test in the name" · "Is the project release ready?" · "What's the build size and largest assets?"
Game developer"Which prefabs have an Animator?" · "Summarize Hero.prefab" · "Show animator transitions in Player.controller" · "List input action assets"
Game designer"Which materials use Standard shader?" · "List all ScriptableObject assets" · "Summarize Main.unity" · "What lighting does Main.unity use?" · "List all objects in Main.unity with their layers"

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

bash
git clone https://github.com/rachitkumarrastogi/unity-mcp-server.gitcd unity-mcp-servernpm installnpm run build

The server uses stdio; your MCP client starts it automatically.


Configuration

Example for Cursor (same idea for Claude Desktop, VS Code + MCP, Windsurf, etc.):

json
{  "mcpServers": {    "unity": {      "command": "node",      "args": ["/absolute/path/to/unity-mcp-server/dist/index.js"],      "env": {        "UNITY_PROJECT_PATH": "/absolute/path/to/YourUnityProject"      }    }  }}

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 dev or npx 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: command node, arguments pointing to dist/index.js, and UNITY_PROJECT_PATH set 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

來源:README.md,提交 33fbb7e

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.7.0最新Sep 16, 2026

評分

已滿足適用檢查項的 40%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。