Unity MCP Server

平台与服务

by rachitkumarrastogi

面向 Unity 的 MCP server,提供项目信息、场景构建和 agent 文档;无需 Unity Editor,兼容 Cursor、Claude。

什么是 Unity MCP Server

面向 Unity 的 MCP server,提供项目信息、场景构建和 agent 文档;无需 Unity Editor,兼容 Cursor、Claude。

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

<p align="center"> <img src="assets/unity-mcp-server-diagram.png" alt="Cursor / IDE → Unity MCP Server → Unity Project" width="720"> </p>

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💻 Code & assemblies🎬 Scenes & prefabs📁 Assets & references
🎨 Materials & shaders🎞️ Animation🖼️ 2D & sprites✨ Rendering
📝 TextMeshPro & UI🎮 Input🏷️ Tags & layers🌐 Addressables & localization
🔊 Audio🧪 Testing & docs🔄 CI & version control🔌 Integrations
⚡ Speed & productivity🔍 Meta

<details open id="project-build"> <summary><strong>📦 Project & build</strong></summary>
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"
</details> <details id="code-assemblies"> <summary><strong>💻 Code & assemblies</strong></summary>
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?"
</details> <details id="scenes-prefabs"> <summary><strong>🎬 Scenes & prefabs</strong></summary>
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"
</details> <details id="assets-references"> <summary><strong>📁 Assets & references</strong></summary>
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"
</details> <details id="materials-shaders"> <summary><strong>🎨 Materials & shaders</strong></summary>
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"
</details> <details id="animation"> <summary><strong>🎞️ Animation</strong></summary>
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"
</details> <details id="2d-sprites"> <summary><strong>🖼️ 2D & sprites</strong></summary>
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"
</details> <details id="rendering"> <summary><strong>✨ Rendering</strong></summary>
ToolDescriptionExample prompt to type
list_render_pipelinesURP/HDRP pipeline assets, volume profiles"List render pipelines" · "What URP/HDRP assets are there?"
</details> <details id="textmeshpro-ui"> <summary><strong>📝 TextMeshPro & UI</strong></summary>
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"
</details> <details id="input"> <summary><strong>🎮 Input</strong></summary>
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"
</details> <details id="tags-layers"> <summary><strong>🏷️ Tags & layers</strong></summary>
ToolDescriptionExample prompt to type
get_tags_and_layersTags and layers from TagManager"Show tags and layers"
</details> <details id="addressables-localization"> <summary><strong>🌐 Addressables & localization</strong></summary>
ToolDescriptionExample prompt to type
get_addressables_infoGroups and config path"What Addressables groups are there?"
get_localization_tablesLocalization table files"List localization tables"
</details> <details id="audio"> <summary><strong>🔊 Audio</strong></summary>
ToolDescriptionExample prompt to type
list_audio_clips.wav, .mp3, .ogg, .aiff"List audio clips"
list_audio_mixersAudio Mixer assets"List audio mixers"
</details> <details id="testing-docs"> <summary><strong>🧪 Testing & docs</strong></summary>
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"
</details> <details id="ci-version-control"> <summary><strong>🔄 CI & version control</strong></summary>
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"
</details> <details id="integrations"> <summary><strong>🔌 Integrations</strong> (config discovery only)</summary>
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?"
</details> <details id="speed"> <summary><strong>⚡ Speed & productivity</strong></summary>
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"
</details> <details id="meta"> <summary><strong>🔍 Meta</strong></summary>
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
</details>

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.git
cd unity-mcp-server
npm install
npm 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

常见问题

Unity MCP Server 是什么?

面向 Unity 的 MCP server,提供项目信息、场景构建和 agent 文档;无需 Unity Editor,兼容 Cursor、Claude。

相关 Skills

MCP构建

by anthropics

Universal
热门

聚焦高质量 MCP Server 开发,覆盖协议研究、工具设计、错误处理与传输选型,适合用 FastMCP 或 MCP SDK 对接外部 API、封装服务能力。

想让 LLM 稳定调用外部 API,就用 MCP构建:从 Python 到 Node 都有成熟指引,帮你更快做出高质量 MCP 服务器。

平台与服务
未扫描114.1k

Slack动图

by anthropics

Universal
热门

面向Slack的动图制作Skill,内置emoji/消息GIF的尺寸、帧率和色彩约束、校验与优化流程,适合把创意或上传图片快速做成可直接发送的Slack动画。

帮你快速做出适配 Slack 的动图,内置约束规则和校验工具,少踩上传与播放坑,做表情包和演示都更省心。

平台与服务
未扫描114.1k

MCP服务构建器

by alirezarezvani

Universal
热门

从 OpenAPI 一键生成 Python/TypeScript MCP server 脚手架,并校验 tool schema、命名规范与版本兼容性,适合把现有 REST API 快速发布成可生产演进的 MCP 服务。

帮你快速搭建 MCP 服务与后端 API,脚手架完善、扩展顺手,尤其适合想高效验证服务能力的开发者。

平台与服务
未扫描10.2k

相关 MCP Server

Slack 消息

编辑精选

by Anthropic

热门

Slack 是让 AI 助手直接读写你的 Slack 频道和消息的 MCP 服务器。

这个服务器解决了团队协作中需要 AI 实时获取 Slack 信息的痛点,特别适合开发团队让 Claude 帮忙汇总频道讨论或发送通知。不过,它目前只是参考实现,文档有限,不建议在生产环境直接使用——更适合开发者学习 MCP 如何集成第三方服务。

平台与服务
83.4k

by netdata

热门

io.github.netdata/mcp-server 是让 AI 助手实时监控服务器指标和日志的 MCP 服务器。

这个工具解决了运维人员需要手动检查系统状态的痛点,最适合 DevOps 团队让 Claude 自动分析性能数据。不过,它依赖 NetData 的现有部署,如果你没用过这个监控平台,得先花时间配置。

平台与服务
78.4k

by d4vinci

热门

Scrapling MCP Server 是专为现代网页设计的智能爬虫工具,支持绕过 Cloudflare 等反爬机制。

这个工具解决了爬取动态网页和反爬网站时的头疼问题,特别适合需要批量采集电商价格或新闻数据的开发者。不过,它依赖外部浏览器引擎,资源消耗较大,不适合轻量级任务。

平台与服务
35.4k

评论