Skip to main content
Glama
tyunta
by tyunta

Prefab Sentinel

CI License Python

Unity / VRChat 프로젝트의 Prefab / Scene / Asset을 안전하게 검사·편집하는 MCP 서버.

Variant의 override 충돌, Broken PPtr / missing fileID, Udon / ClientSim 런타임 예외를 구조화된 응답으로 진단하고, 수작업 YAML 편집을 거치지 않고 복구한다. AI 에이전트 전제 설계.

YAML 기반 read-only 경로(validate_refs / validate_materials / inspect_wiring / inspect_variant / inspect_hierarchy / find_referencing_assets 등)는 Unity를 실행하지 않고 완결된다. inspect_serialized_surface / inspect_with_profile / validate_inspector_profile은 last-saved SerializedObject surface를 상주 Editor Bridge 경유로 획득한다. 쓰기 경로(patch_apply / set_property / editor_* 등)는 상주 Editor Bridge와의 file-IPC로 동작하며, confirm=True + 비어 있지 않은 change_reason 감사 페어가 없는 호출은 CHANGE_REASON_REQUIRED로 거부된다.

공개 MCP 경계는 Tools capability만 제공한다. stdio는 modern 2026-07-28과 두 개의 legacy revision(2025-11-25 / 2025-06-18)을 지원하고, 임의의 HTTP 경로는 modern 2026-07-28만을 로컬 loopback의 /mcp로 제공한다. 이는 full conformance의 합격 선언이 아니라, protocol error의 우선순위와 stdio transport 예외는 docs/api-reference.md, 엄격 CI gate의 대상 범위는 TESTING.md, process-state의 알려진 이탈은 ARCHITECTURE.md를 정본으로 한다. 대응하는 request method와 transport는 docs/tool-conventions.md, docs/execution-reference.md를 참조.

본 README는 각 전문 문서로의 입구(문서 맵 참조). 사양의 정본은 전문 문서군, 운영 규칙의 정본은 AGENTS.md.

하는 일 / 하지 않는 일

하는 일

  • Unity SerializedObject 레벨의 안전한 편집 기반을 제공하고, Prefab Base / Variant / Scene 인스턴스의 실효값을 추적 가능하게 한다

  • 참조 해결(GUID + fileID)과 정합성 검증을 API화한다

  • 런타임 검증(UdonSharp compile / ClientSim smoke / 로그 분류)을 파이프라인화한다

  • 결정적인 synthetic workload와 고정 budget으로 주요 inspection path의 latency regression을 검출한다

  • 인간의 판단이 필요한 변경과 기계적으로 실행할 수 있는 변경을 명확히 분리한다

  • ModularAvatar / liltoon / VRCFury 등 VRChat 에코시스템 도구의 도메인 지식을 동봉하고, AI 에이전트의 판단 재료로 공급한다

  • Skills로 운영 플로우를 표준화한다(Claude Code / Codex CLI 양쪽 호스트 대응)

하지 않는 일

  • YAML 문자열의 직접 치환을 표준 수단으로 하지 않는다

  • Unity 내부 참조를 추측으로 보완하지 않는다

  • 변경 근거 없는 자동 최적화를 하지 않는다

  • 실프로젝트를 timing gate에 사용하지 않고, weekly benchmark에서 baseline을 자동 갱신하지 않는다

  • 사용자 판단이 필요한 사양 변경을 임의로 적용하지 않는다

  • legacy HTTP, 2025-06-18보다 오래된 legacy protocol version, remote / shared HTTP server는 공개하지 않는다

Related MCP server: unity-asset-reference-mcp

Quickstart

플러그인으로 도입한다. 호스트(Claude Code / Codex CLI)에 따라 2가지 경로가 있으며, 모두 marketplace에서 획득한다.

Claude Code(Claude Code 안에 입력하는 슬래시 커맨드):

/plugin marketplace add tyunta/prefab-sentinel
/plugin install prefab-sentinel@tyunta-prefab-sentinel

Codex CLI(셸에서 marketplace 등록 → Codex CLI 안의 /plugins TUI에서 활성화):

codex plugin marketplace add tyunta/prefab-sentinel

등록 후, Codex CLI 안에서 /plugins를 열고 목록에서 prefab-sentinel을 선택해 Install한다(codex plugin install이라는 셸 커맨드는 존재하지 않는다).

도입 후 사용법은 guide 스킬(/prefab-sentinel:guide)이 입구 — MCP 도구 목록과 호출 방법, 패치 스키마, Editor Bridge 설정, 에코시스템 지식 안내가 정리되어 있다. MCP 도구를 실제로 호출하는 것은 AI 에이전트 쪽이므로, 에이전트에 이 guide를 참조시키면 사용을 시작할 수 있다.

각 경로의 상세는 설정, 리포지토리에서 MCP 서버를 직접 기동하는 개발자용 절차는 CONTRIBUTING.md를 참조.

설정

전제 조건

  • Python 3.11 이상

  • uv(패키지 매니저) — 설치 절차는 uv 공식 가이드 참조(Windows / macOS / Linux에서 다름)

  • Unity 2022.3 + VRChat SDK 3.x(Worlds / Avatars) — Editor Bridge 경유의 쓰기·실행 검증 경로에서 필요

MCP 서버는 Plugin 내부에서 uv / uvx 경유로 로컬 기동되므로, Plugin 도입 경로에서도 Python / uv가 필요하다. 호스트(Claude Code / Codex CLI)와 본 도구는 Windows / macOS / Linux에서 동작한다.

Claude Code Plugin

Quickstart의 2커맨드로 도입한다. 설치하면 MCP 서버·6개 스킬·knowledge/ 디렉토리가 일괄 전개되고, /prefab-sentinel:guide 등의 스킬을 Claude Code에서 직접 호출할 수 있다. 각 스킬 내 커맨드는 ${CLAUDE_PLUGIN_ROOT} 템플릿 변수로 로컬에서 실행된다.

Codex CLI Plugin

Quickstart의 절차로 도입한다(셸에서 codex plugin marketplace add → Codex CLI 안의 /plugins TUI에서 prefab-sentinel을 Install). MCP 서버는 Plugin 정의(.codex-plugin/plugin.json의 mcpServers가 가리키는 .codex-plugin/mcp.json)에서 등록되고, packaged MCP definition은 필요한 modern protocol marker도 공급한다. skill bundle도 동시에 전개된다. Codex의 MCP 서버는 uvx가 GitHub에서 본체를 획득해 기동하므로, 기동 시 네트워크 연결이 필요하다(Claude Code 경로는 로컬 도입물에서 기동). Plugin을 갱신한 뒤 Codex CLI 세션을 재기동한다. 무효화·등록 해제는 /plugins TUI에서 수행한다.

스킬

스킬

호출

설명

guide

/prefab-sentinel:guide

MCP 도구 레퍼런스·패치 스키마·Bridge 설정·에코시스템 지식 안내

variant-safe-edit

/prefab-sentinel:variant-safe-edit

Prefab Variant의 안전한 편집 워크플로우

prefab-reference-repair

/prefab-sentinel:prefab-reference-repair

깨진 참조의 검출·복구 워크플로우

udon-log-triage

/prefab-sentinel:udon-log-triage

런타임 로그의 트리아지 워크플로우

knowledge-acquisition

/prefab-sentinel:knowledge-acquisition

VRChat 에코시스템 도구의 지식 조사·축적

inspector-profile-authoring

/prefab-sentinel:inspector-profile-authoring

last-saved SerializedObject surface와 소스 근거에서 project-local Inspector profile을 작성·복구하는 워크플로우

Unity Bridge

패치 실적용·런타임 검증 등의 쓰기 경로와, last-saved SerializedObject surface를 다루는 Inspector profile 경로는 Unity Editor 내에 상주하는 Editor Bridge와의 file-IPC로 동작한다. Bridge의 설정 절차는 /prefab-sentinel:guide 스킬에, watch 디렉토리를 지정하는 환경 변수 UNITYTOOL_BRIDGE_WATCH_DIR는 CONFIGURATION.md에 기재. 미설정 상태로 쓰기계 도구를 호출하면 BRIDGE_WATCH_DIR_MISSING, Inspector profile 도구를 호출하면 INSPECTOR_SURFACE_UNAVAILABLE로 fail-fast 정지한다. YAML 기반 read-only 검사에는 Bridge 설정이 불필요하다.

Python wheel은 tools/unity/와 knowledge/의 배포 대상만을 package 내로 mapping하고, nested .serena 등 workspace-local metadata는 동봉하지 않는다.

대표적인 MCP 도구

전 MCP 도구의 정본 카탈로그는 docs/tools.md, 응답 엔벨로프(success / severity / code / message / data / diagnostics)와 에러 코드의 정본은 docs/api-reference.md. 아래 표는 대표 도구만.

도구

설명

activate_project

프로젝트 스코프 설정 + 캐시 웜(서버 프로세스 시작 후 호출)

validate_refs

손상된 GUID / fileID 참조 스캔

validate_materials

.mat / renderer slot / TMP material preset / folder policy의 정적 검증. 임의 규칙은 CONFIGURATION.md를 정본으로 한다

validate_structure

YAML 내부 구조 검증(fileID 중복·Transform 정합성)

inspect_wiring

MonoBehaviour 필드 배선 분석(null 참조 분류 포함)

inspect_variant

Prefab Variant의 override 체인 분석

inspect_hierarchy

saved YAML의 GameObject 계층 표시. expand_prefab_instances로 effective nested PrefabInstance 계층을 read-only 전개

inspect_transform_effective_values

offline asset_path + symbol_path의 Transform default / override / effective 값을 local/world로 비교

inspect_unity_event_listeners

Button / Slider / Toggle의 UnityEvent persistent listener entries와 UdonSharp 진단을 단일 응답으로 획득

find_referencing_assets

GUID / 경로의 참조 원본 에셋 검색

patch_apply

패치 계획 검증·적용. exactly one mode="open" Prefab은 composable handle grammar와 response-equal report, introduced-only validation, automatic rollback을 가진 transaction. 상세는 docs/execution-reference.md, payload/error는 docs/api-reference.md, 실제 Unity acceptance는 TESTING.md

delete_asset / delete_assets

AssetDatabase-backed asset 삭제의 dry-run / confirm. 삭제 후 broken-reference delta를 반환

editor_create_generated_asset / editor_move_asset

RenderTexture generated asset 생성과 AssetDatabase.MoveAsset-backed asset 이동. 공개 도구 목록은 docs/tools.md, payload/error는 docs/api-reference.md, confirm audit/report requirements는 CONFIGURATION.md, live Unity smoke는 TESTING.md를 정본으로 한다

validate_runtime

기본값 compile_only의 UdonSharp compile 검증. ClientSim은 profile="clientsim" + audit pair로 명시적 opt-in으로 하고, requested scene이 유일하게 loaded이고 active인 경우에만 Play Mode lifecycle을 실행

editor_get_transform / editor_get_bounds / editor_measure_distance

Editor Bridge 경유의 read-only live geometry 검사

editor_serialized_property_read / editor_serialized_property_list / editor_serialized_property_write

SerializedObject-backed generic inspector / writer API. 공개 도구 목록은 docs/tools.md, payload와 에러 코드는 docs/api-reference.md를 정본으로 한다

inspect_serialized_surface / inspect_with_profile / validate_inspector_profile

last-saved raw Inspector surface와 project-local declarative profile. 3개 도구 모두 read-only이지만, 상주 Editor Bridge가 전제. 도구는 docs/tools.md, envelope/error는 docs/api-reference.md, profile path/writer gates는 CONFIGURATION.md, live Unity protocol은 TESTING.md, author/repair procedure는 skills/inspector-profile-authoring/SKILL.md를 정본으로 한다

editor_*

Editor Bridge 경유의 Scene / Hierarchy / Component / BlendShape / Animation 편집, 스크린샷, Console, UdonSharp field / array write

Routine CI / agent 검증에서는 validate_runtime(profile="compile_only") 또는 validate_runtime(profile="editor_console_only")를 사용한다. ClientSim은 submission scene용 명시적 opt-in으로, profile="clientsim" + audit pair가 갖춰지고 requested scene이 sole loaded active scene인 경우에만 실행한다. 상세한 cleanup/restore/side-effect 계약은 docs/api-reference.md와 docs/execution-reference.md를 정본으로 한다.

YAML 기반 읽기 전용 검사(validate_refs / validate_materials / inspect_wiring / inspect_variant / inspect_hierarchy / find_referencing_assets 등)는 Unity가 필요 없다. Inspector profile의 3개 도구는 읽기 전용이지만, 상주 Editor Bridge가 전제이며, editor_* 계열과 patch_apply의 confirm 적용도 같은 Bridge를 사용한다.

validate_refs / inspect_wiring / validate_all_wiring / validate_structure / validate_materials는 project root의 config/diagnostics_baseline.json을 읽으면 diagnostics를 new / known / resolved로 분류한다. baseline은 자동 생성·암묵 갱신을 하지 않으며, 명시적인 update_diagnostics_baseline만이 preview / audit-gated write를 담당한다. baseline file 형식은 CONFIGURATION.md, 응답 형태와 update tool 계약은 docs/api-reference.md, 공개 tool 목록은 docs/tools.md를 정본으로 한다.

권장 플로우: validate_refs로 참조 손상을 조기 탐지 → inspect_variant로 override 충돌을 실효값으로 가시화 → patch_apply의 dry-run → 적용 시에는 confirm=True + change_reason, 정확히 하나의 open Prefab transaction에서는 추가로 out_report를 지정하여 감사 로그를 포함해 적용.

VRChat 에코시스템 지식

knowledge/ 디렉터리에 ModularAvatar / liltoon / VRCFury / AvatarOptimizer 등의 도메인 지식을 3레벨(L1 개념 / L2 조작 패턴 / L3 SerializedProperty)로 축적하고, 플러그인에 동봉한다. guide 스킬이 참조를 안내하고, AI 에이전트가 작업에 따라 해당 지식을 knowledge/에서 읽는다. 지식의 조사·확충은 knowledge-acquisition 스킬로 수행한다. 편집 규약은 knowledge/STYLE_GUIDE.md.

문서 맵

사양은 전문 문서로 나뉘어 배치되어 있다. 목적별 진입점은 아래 표와 같다.

문서

내용

ARCHITECTURE.md

구성 개요·레이어 책임·서비스 사양·데이터 모델·용어집

docs/tools.md

전체 MCP 도구의 정본 카탈로그

docs/tool-conventions.md

MCP protocol / result 경계와, 도구의 주소 표현·인수 명명·감사 페어 필요 여부 규약

docs/api-reference.md

MCP protocol error, 도구 응답 엔벨로프, domain error code의 정본

docs/execution-reference.md

MCP transport / 실행 방법 / smoke-batch / 벤치마크 / patch 스키마 / 리포트 출력 형식

TESTING.md

유닛 / 통합 / 회귀 / mutation 테스트 실행 절차와 테스트 전략

CONFIGURATION.md

UNITYTOOL_* 환경 변수·ignore_guids.txt·scope config 규약

skills/inspector-profile-authoring/SKILL.md

inspector-profile.v1의 안전한 project-local author / repair 절차

DEBUGGING.md

Bridge 엔벨로프 / Unity Console / broken reference 조사 절차

CONTRIBUTING.md

개발 환경·MCP 서버 직접 실행·테스트·커밋 규약·PR 플로우

AGENTS.md

운영 규칙과 판단 기준의 정본

AGENT_GUIDE.md

AI 에이전트용 onboarding(첫 번째 참조 지점)

CHANGELOG.md

변경 이력

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    B
    maintenance
    A runtime inspection and automation toolkit that enables MCP clients to interact with live Unity game sessions through a dedicated bridge plugin. It allows users to browse scene hierarchies, inspect component fields, search text elements, and modify game object properties in real-time.
    6
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Indexes Unity project assets into a SQLite reference graph and provides an MCP server for querying asset dependencies, references, unused assets, and broken references.
    29 npm
    4
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Read-only MCP server that provides AI agents with context about Unity project relationships, including scenes, prefabs, scripts, GUIDs, and code impact analysis.
    2
    Apache 2.0