Skip to main content
Glama
luckynee

Unity Prefab Parser MCP Server

by luckynee

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
init_unity_projectA

Initialize a Unity project for use with this MCP. Scans all .meta files to build a GUID→asset name cache, enabling full asset name resolution in parse_unity_file.

WORKFLOW: Call this ONCE per project before using parse_unity_file or browse_unity_project. The cache is saved to .unity-mcp-cache.json in the project root and reused automatically.

For large projects (100GB+), this may take 10-30 seconds but only needs to run once per session or when assets change significantly.

browse_unity_projectA

Browse the Unity project folder tree with asset counts. Use this to navigate large projects and find the subfolder containing the assets you want to work with.

WORKFLOW:

  1. init_unity_project (once)

  2. browse_unity_project (navigate to the right folder)

  3. list_unity_assets (list assets in that folder)

  4. parse_unity_file (parse specific assets)

parse_unity_fileA

Parse a Unity text-serialized prefab, scene, or asset file and extract Inspector-visible component data in YAML format.

WORKFLOW: For best results with asset name resolution, call init_unity_project first. If already initialized, the cache is loaded automatically.

Automatically resolves asset names from GUIDs by scanning the project's .meta files (or using the initialized cache). Outputs a clean, hierarchical structure showing the GameObject tree and all component data.

IMPORTANT: Fields not shown in output have their default values or are null references.

  • Transform: lPos (0,0,0), lRot (0,0,0,1), lScale (1,1,1) are omitted when default

  • Null references and unresolved GUIDs are omitted

  • enabled:true is omitted (only enabled:false is shown)

Features:

  • Resolves script, material, sprite, and other asset references to human-readable names

  • Filters out Unity internal fields (m_ObjectHideFlags, serializedVersion, etc.)

  • Renames fields to match Unity Inspector names (m_LocalPosition -> localPosition)

  • Supports configurable detail levels: minimal, standard, or compact

  • Prefab Variant Support:

    • Auto-detects prefab variants and nested prefab instances

    • Shows variant_of field with base prefab name

    • Groups all modifications under base prefab name

    • Merges Vector3 properties (x, y, z -> single vector)

    • Filters default values and null references

    • Adds # + markers for variant modifications

  • Compact mode optimizations (83% token reduction):

    • Short reference syntax (@Player instead of GameObject:Player)

    • Parentheses vector notation: (1, 2, 3) instead of {x:1, y:2, z:3}

    • Field abbreviations: lPos, lRot, lScale, trigger, order, mats

    • Inline simple components: {value: 42, active: true}

    • Omits null/Unknown references entirely

    • Omits enabled:true, default offsets, flipX/flipY:false

    • Removes redundant sortingLayerID (keeps sortingLayer)

    • Converts 0/1 to true/false for boolean fields

    • Converts bitmasks to layer arrays or 'all'

    • Simplifies Unity events to show method names

parse_unity_prefabA

Deprecated alias for parse_unity_file. Use parse_unity_file for new clients.

WORKFLOW: For best results with asset name resolution, call init_unity_project first. If already initialized, the cache is loaded automatically.

list_unity_assetsA

Scan a directory for Unity asset files (.prefab, .unity, .asset) and return a grouped list with absolute paths ready to use with parse_unity_file.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/luckynee/unity-prefab-parser-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server