creator-hub-mcp
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCreator Hub MCP — live scene editing
Creator Hub MCP — 实时场景编辑
The Creator Hub runs an MCP server inside the app (localhost, streamable HTTP, bearer token). Its tools read and mutate the scene that is open in the editor: changes apply to the live engine, show up in the viewport immediately, autosave to , and every one of them is a normal undo step for the user. The same server powers the Creator Hub's built-in AI assistant and can be exposed to any external MCP-capable tool.
assets/scene/main.compositeTwo ways you can be running:
| You are… | How the tools reach you |
|---|---|
| Inside the Creator Hub's AI assistant (Settings > AI > Enable AI Assistant; on by default since Creator Hub 0.50.0 — it is no longer experimental) | Pre-wired. The app launches your |
| In another tool (Claude Code terminal or VS Code extension, Cursor, Codex, Claude Desktop, …) | Connect to the running Creator Hub — see |
In Claude Code the tools appear as ; inside the Creator Hub's assistant and in other clients they appear under their bare names (, , …). The connected tools are self-describing — treat the live catalog as authoritative over the table below.
mcp__creator-hub__<tool>scene_statecreate_entityCreator Hub 在应用内部运行一个 MCP 服务器(本地主机、流式 HTTP、Bearer 令牌)。其工具可读取和修改在编辑器中打开的场景:更改会实时应用到引擎,立即在视口中显示,并自动保存到 ,且每一项更改对用户来说都是普通的可撤销步骤。同一服务器为 Creator Hub 内置的 AI 助手提供支持,也可以暴露给任何支持 MCP 的外部工具使用。
assets/scene/main.composite有两种运行场景:
| 你的运行环境 | 工具的连接方式 |
|---|---|
| 在 Creator Hub 的 AI 助手中(设置 > AI > 启用 AI 助手;自 Creator Hub 0.50.0 起默认开启——不再是实验性功能) | 预配置完成。应用会启动你的 |
| 在其他工具中(Claude Code 终端或 VS Code 扩展、Cursor、Codex、Claude Desktop 等) | 连接到正在运行的 Creator Hub——参见 |
在 Claude Code 中,这些工具的显示格式为 ;在 Creator Hub 助手和其他客户端中,它们以原始名称显示(、 等)。连接的工具是自描述的——以下表格仅供参考,实时目录才是权威依据。
mcp__creator-hub__<tool>scene_statecreate_entityFiles the user attaches to a prompt
用户附加到提示中的文件
Inside the Creator Hub's assistant the user can attach files to a turn (creator-hub ): the Attach files paperclip left of the composer input opens a multi-select picker, files can be dropped onto the composer (overlay: Drop files to attach), and images can be pasted from the clipboard. Attachments appear as removable chips; 8 per prompt is the cap. What this means for you:
3395b643- A file picked or dropped from disk arrives as its real absolute path — no copy, no base64 round-trip, no size cap. Read it in place; do not ask the user to re-paste its contents or to move it into the project. A pasted (clipboard) image has no path, so the app writes it to a temp file and hands you that path instead.
- Any file type is accepted. The app classifies it only for the chip icon: (png, jpg, jpeg, gif, webp, bmp, svg, avif),
image(glb, gltf),model(mp3, wav, ogg, m4a, flac),audiofor everything else.file - This is the natural way to hand over a reference image or a GLB. A dropped is a model the user wants in the scene: it is still outside the project, so copy it under
.glbbefore referencing it fromassets/Models/(see add-3d-models for the bounding-box and collider audit). A reference image is usually art direction for a UI or material, not a file to import.GltfContainer - A prompt may arrive with attachments and no text at all — the attachment is the request. Ask what to do with it rather than guessing.
在 Creator Hub 助手中,用户可以在一轮对话中附加文件(creator-hub ):输入框左侧的附加文件回形针图标可打开多选器,文件可以拖放到输入框上(覆盖提示:拖放文件以附加),图片可以从剪贴板粘贴。附件显示为可移除的标签;每条提示最多附加 8 个文件。这对你来说意味着:
3395b643- 从磁盘选择或拖放的文件会以其真实绝对路径传入——无需复制,无需 base64 转码,没有大小限制。直接读取该文件即可;不要要求用户重新粘贴文件内容或将其移动到项目中。粘贴的(剪贴板)图片没有路径,因此应用会将其写入临时文件,然后将该路径提供给你。
- 支持任何文件类型。 应用仅为显示标签图标而分类:(png、jpg、jpeg、gif、webp、bmp、svg、avif)、
image(glb、gltf)、model(mp3、wav、ogg、m4a、flac),其他所有类型均为audio。file - 这是传递参考图片或 GLB 文件的自然方式。 拖放的 文件是用户想要添加到场景中的模型:它仍在项目外部,因此在通过
.glb引用它之前,需要将其复制到GltfContainer目录下(边界盒和碰撞体检查参见 add-3d-models)。参考图片通常用于 UI 或材质的美术方向参考,而非需要导入的文件。assets/Models/ - 提示可能只有附件而没有任何文本——附件本身就是请求。此时应询问用户需要如何处理,而不是猜测。
RULE — the MCP is the way to change the scene graph; the file is the fallback
规则 —— 修改场景图应通过 MCP,文件编辑是最后手段
Never write , , or by hand while the Creator Hub MCP is available. Reasons, all verified in the Creator Hub source:
assets/scene/main.compositemain.crdtscene.json- The editor owns those files. It regenerates wholesale from its in-memory engine on every autosave (~100 ms after any editor transaction) and never re-reads the file from disk. A hand edit to an open scene is silently lost; there is no error.
main.composite - The tools do the bookkeeping the file workflow makes you do by hand: registration,
inspector::Nodes,core-schema::Name,inspector::TransformConfig, entity-id allocation,entity-names.tson non-core components.jsonSchema - Every mutation is undoable by the user (Ctrl+Z / the assistant's Undo AI changes button). A file edit is not.
Decision ladder — pick the first row that matches:
- Tools present and answering (or
get_selectionreturns) → use them for every entity/component/settings change. Read the composite from disk only as a read-only cross-check.scene_state - Tools present but failing (, connection refused,
No editor window is open.) → the Creator Hub is closed, was restarted (URL and token rotate per launch), or no scene is open. Say so and ask the user to open the scene in the Creator Hub (or re-copy the connection snippet). Do not fall back to editing the file silently.401 - Tools absent, but the user has the Creator Hub → tell them the MCP is the safe route and point them at . Hand-edit the file only if they decline, and only with the scene closed in the Creator Hub (the composites skill's edit-mode rules then apply in full).
reference/connect.md - No Creator Hub in play (CLI-only project, CI) → the composites skill's file workflow applies.
What still lives in files and is yours to edit directly: (scene code; saving triggers a rebuild automatically), (script components — write the file, then ), and asset files you add under , , etc.
src/**assets/Scripts/*.tsxattach_scriptassets/Models/assets/Images/当 Creator Hub MCP 可用时,绝对不要手动编辑 、 或 。 原因均已在 Creator Hub 源码中验证:
assets/scene/main.compositemain.crdtscene.json- 这些文件由编辑器管理。每次自动保存时(任何编辑器操作后约 100 毫秒),编辑器都会根据其内存中的引擎状态完全重新生成 ,且永远不会从磁盘重新读取该文件。对已打开场景的手动编辑会被静默覆盖,不会有任何错误提示。
main.composite - 这些工具会自动处理文件工作流中需要手动完成的簿记工作:注册、
inspector::Nodes、core-schema::Name、inspector::TransformConfig、实体 ID 分配、非核心组件的entity-names.ts等。jsonSchema - 每一项修改都可以由用户撤销(Ctrl+Z / 助手的撤销 AI 更改按钮)。而文件编辑则无法撤销。
决策阶梯——选择第一个匹配的情况:
- 工具存在且响应正常(或
get_selection有返回值)→ 所有实体/组件/设置更改都使用工具完成。仅在需要只读交叉校验时才从磁盘读取 composite 文件。scene_state - 工具存在但调用失败(提示 、连接被拒绝、
No editor window is open.)→ Creator Hub 已关闭、已重启(每次启动都会更换 URL 和令牌),或未打开任何场景。告知用户该情况,并请用户在 Creator Hub 中打开场景(或重新复制连接片段)。不要静默回退到文件编辑。401 - 没有工具,但用户安装了 Creator Hub → 告知用户 MCP 是更安全的方式,并指引他们查看 。仅当用户拒绝使用 MCP 时才手动编辑文件,且必须确保 Creator Hub 中已关闭该场景(此时完全适用 composites 技能的编辑模式规则)。
reference/connect.md - 完全不使用 Creator Hub(仅 CLI 项目、CI 环境)→ 适用 composites 技能的文件工作流。
以下内容仍存储在文件中,你可以直接编辑:(场景代码;保存后会自动触发重建)、(脚本组件——先编写文件,再调用 ),以及你添加到 、 等目录下的资源文件。
src/**assets/Scripts/*.tsxattach_scriptassets/Models/assets/Images/RULE — search the catalog before manually building any standard object
规则 —— 手动构建任何标准对象之前先搜索目录
Before creating an entity and manually assembling its components with + , always first to check whether a Smart Item already exists for the object. This applies especially to:
create_entityset_componentsearch_catalog- Lights — the catalog has Spotlight and Point Light Smart Items (category ) that bundle a real GLB model, a pre-configured
lightscomponent, and built-in Turn On / Turn Off / Toggle actions. Manually creating aLightSourceentity misses the visual model, inspector integration, and action wiring.LightSource - Interactive furniture — doors, chairs, platforms, chests, buttons, levers, etc.
- Media — screens, image displays, NFT frames.
- Triggers — trigger areas, click triggers. The category has exactly one entry named "Trigger Area" (
utils), a script-based item: an invisible box or sphere the user places and resizes, with a control that seeds the AI-assistant composer with a prompt describing what should happen on enter/leave. The older non-script item of the same name (e9fa0eab-44de-4efe-af77-a71171a1a73f) and the interim label "Trigger Area (Script)" were both removed in creator-hub1ab2733f-1782-4521-9eda-6aa8ad684277— do not search for either.e43441b5
place_smart_itemset_component- Downloads the item's GLB files and resolves with the real on-disk path (e.g.
asset-packs::Placeholder).assets/asset-packs/spotlight/spotlight.glb - Sets up ,
asset-packs::Script, andasset-packs::Actionscomponents so the item works in the Creator Hub UI with configurable actions and triggers.inspector::Config - Registers the entity in automatically.
inspector::Nodes
Only build manually when no catalog item fits the requirement.
Media the user already has: tell them to drag it from the Local Assets tab onto the viewport. Since creator-hub that is the fastest path and it spawns a catalog item pointed at their file, not a bare component — so the entity arrives with the same component set and basic-view a hand-placed item has:
062ed0a2inspector::Config| Dropped file | Item spawned | What gets repointed |
|---|---|---|
| Image ( | the |
| Ambient Sound - Forest Birds ( | |
| Video Screen ( | |
The entity is named after the file with the extension stripped, de-duplicated against existing names, and the template's own placeholder media file is skipped on import. / still drop as plain models. You can reproduce this through the tools ( the same asset id, then the field above), but the drag is one gesture for the user — prefer it when they are at the keyboard.
.glb.gltfplace_smart_itemset_component在创建实体并通过 + 手动组装其组件之前,务必先调用 检查是否已有对应的 Smart Item。这一点尤其适用于:
create_entityset_componentsearch_catalog- 灯光 —— 目录中有聚光灯和点光源 Smart Item(分类为 ),它们捆绑了真实的 GLB 模型、预配置的
lights组件,以及内置的开启/关闭/切换动作。手动创建LightSource实体会缺少可视化模型、编辑器集成和动作连线。LightSource - 交互家具 —— 门、椅子、平台、箱子、按钮、拉杆等。
- 媒体 —— 屏幕、图片展示器、NFT 画框。
- 触发器 —— 触发区域、点击触发器。分类中恰好有一个名为 "Trigger Area" 的条目(
utils),这是一个基于脚本的物品:用户可以放置并调整大小的不可见盒子或球体,带有一个控件,可以向 AI 助手输入框预填描述进入/离开时应触发什么动作的提示。旧的非脚本同名物品(e9fa0eab-44de-4efe-af77-a71171a1a73f)和过渡标签 "Trigger Area (Script)" 均已在 creator-hub1ab2733f-1782-4521-9eda-6aa8ad684277版本中移除——不要搜索这两个。e43441b5
place_smart_itemset_component- 下载物品的 GLB 文件,并将 解析为真实的磁盘路径(例如
asset-packs::Placeholder)。assets/asset-packs/spotlight/spotlight.glb - 设置 、
asset-packs::Script和asset-packs::Actions组件,使物品在 Creator Hub UI 中正常工作,并支持可配置的动作和触发器。inspector::Config - 自动在 中注册实体。
inspector::Nodes
仅当目录中没有符合要求的物品时才手动构建。
用户已有的媒体文件:告诉他们从本地资源选项卡拖到视口即可。 自 creator-hub 版本起,这是最快的方式,它会生成一个指向用户文件的目录物品,而不是一个裸组件——因此生成的实体具有与手动放置的物品相同的组件集和基础视图 :
062ed0a2inspector::Config| 拖放的文件 | 生成的物品 | 被重定向的内容 |
|---|---|---|
| Image( | |
| Ambient Sound - Forest Birds( | |
| Video Screen( | |
实体会以去掉扩展名的文件名命名,并与现有名称去重,导入时会跳过模板自身的占位媒体文件。 / 仍会作为普通模型拖入。你可以通过工具复现此过程(用相同的资产 ID 调用 ,然后 设置上述字段),但对用户来说拖放是一步操作——当用户在键盘前时优先推荐这种方式。
.glb.gltfplace_smart_itemset_componentTool catalog
工具目录
Names as registered on the server ().
creator-hubpackages/creator-hub/main/src/modules/scene-mcp.ts| Group | Tool | What it does |
|---|---|---|
| Read | | scene.json metadata (name, parcels, base, spawn points), SDK version, dependencies. Use it for Step 0 bounds. |
| Read | | Roster of authored entities: id, name, kind, world transform, component list, GLTF src, Smart-Item flag. Truncated to the first 200 entities. |
| Read | | Every component value on one entity, by id or Name. Call it to learn a component's exact shape before |
| Read | | Entities currently selected in the editor. Resolve "this" / "the selected one" with it before acting. |
| Read | | Live budget (triangles, entities, bodies, materials, textures) vs per-scene limits, plus entities out of bounds. |
| Read | | Image of the editor viewport (no preview needed). |
| Mutate | | New entity, optional |
| Mutate | | Deletes an entity and its children. |
| Mutate | | Reparents (world position preserved). |
| Mutate | | Create or update a component. |
| Mutate | | Removes a component by name. |
| Assets | | Search the Creator Hub asset-packs catalog by name/category/tag. Despite the name it covers static items as well as Smart Items. Omit |
| Assets | | Place a catalog item by |
| Scripts | | Adds an |
| Settings | | Read / change scene.json fields (name, description, categories, tags, age rating, spawn points, skybox, terrain, |
| Preview | | Start / poll / stop the scene in the Decentraland Explorer with its MCP server on. |
| Preview | | While a preview runs, the Explorer's runtime tools ( |
| Chat | | Blocks on a question shown in the Creator Hub chat. Only meaningful inside the embedded assistant. |
以下是在 服务器上注册的名称(源码位于 )。
creator-hubpackages/creator-hub/main/src/modules/scene-mcp.ts| 分组 | 工具 | 功能说明 |
|---|---|---|
| 读取 | | scene.json 元数据(名称、地块、基点、出生点)、SDK 版本、依赖项。用于第 0 步的边界计算。 |
| 读取 | | 已创作实体的名册:ID、名称、类型、世界变换、组件列表、GLTF 源、Smart Item 标记。最多返回前 200 个实体。 |
| 读取 | | 单个实体的所有组件值,可通过 ID 或名称查询。在调用 |
| 读取 | | 编辑器中当前选中的实体。在执行操作前用它来解析“这个”/“选中的那个”等指代。 |
| 读取 | | 实时资源使用量(三角形、实体、刚体、材质、纹理)与单场景限制的对比,以及超出边界的实体。 |
| 读取 | | 编辑器视口的截图(无需启动预览)。 |
| 修改 | | 创建新实体,可选 |
| 修改 | | 删除实体及其所有子实体。 |
| 修改 | | 重新设置父级(保持世界位置不变)。 |
| 修改 | | 创建或更新组件。 |
| 修改 | | 按名称删除组件。 |
| 资源 | | 按名称/分类/标签搜索 Creator Hub 资源包目录。尽管名称如此,它同时覆盖静态物品和 Smart Item。省略 |
| 资源 | | 按 |
| 脚本 | | 添加一个指向文件的 |
| 设置 | | 读取/修改 scene.json 字段(名称、描述、分类、标签、年龄分级、出生点、天空盒、地形、 |
| 预览 | | 在 Decentraland Explorer 中启动/轮询/停止场景,并开启其 MCP 服务器。 |
| 预览 | | 预览运行时,Explorer 的运行时工具( |
| 聊天 | | 阻塞等待,直到用户回答 Creator Hub 聊天中显示的问题。仅在嵌入式助手中有效。 |
Workflow
工作流
Read before you write. for parcels (compute bounds exactly as in the composites skill Step 0 — the tools do not stop you from placing entities outside the scene, and is a weaker safety net than it looks — see the Bevy-renderer gotcha below). to see what exists and avoid duplicate names. whenever the user's request refers to what they have selected.
get_project_infoget_scene_metricsscene_stateget_selectionAdding a model.
- Catalog item → then
search_catalog. Files land inplace_smart_itemautomatically.assets/asset-packs/<pkg>/ - Architecture (rooms, corridors, doorways, anything the avatar walks through or into) → size the envelope for the third-person camera before placing; realistic dimensions read cramped in-world. The dimensions are in add-3d-models → "RULE: Scale interiors up for the third-person camera".
- Model the user already has, or one you authored → put the GLB under (see the add-3d-models skill for Blender authoring and the bounding-box audit), then
assets/Models/(with acreate_entity),nameset_component(Transform), and{position:{x,y,z}, rotation:{x,y,z,w}, scale:{x,y,z}}set_component(core::GltfContainer— mask rules and the animation/collider checks from add-3d-models still apply; add{src, visibleMeshesCollisionMask, invisibleMeshesCollisionMask}when the GLB has clips).core::Animator - Lights → with category
search_catalogto find Spotlight and Point Light Smart Items, thenlights. These include the light model,place_smart_item, and toggle actions. Only create a bareLightSourceentity manually when you need an invisible light source or non-standard parameters -- see lighting-environment for the fullLightSourceAPI and the Smart Item rule.LightSource - Behaviour on it → a Smart Item if one fits (first), otherwise write a script under
search_catalogandassets/Scripts/(rules in script-components), or reference the entity by name fromattach_scriptcode (src/).engine.getEntityOrNullByName
Component shapes. validates against the real schema. Before your first write of a component type, on any entity that already has it — or read its entry in the composites format catalog. For , params are positional inside (see script-components); prefer and let the editor build the layout.
set_componententity_detailasset-packs::Scriptlayoutattach_scriptAfter writing. Read-after-write is safe while the data layer is alive — the server waits for the autosave before returning from a mutation, so a following is fresh. It stops being safe the moment that process dies (next rule), which is why the check below is on disk and not on a tool answer. Check when you added geometry. shows the result without a preview; + when you need the running scene (walk, click, logs, FPS). The iteration loop, camera framing, and performance references in the unity-explorer-mcp skill apply to the tools unchanged — skip that skill's Setup section (no , no bind gate) because the tools arrive through the server. When done, leave the camera in third person and if you launched it only to check.
scene_stateget_scene_metricseditor_screenshotlaunch_previewexplorer_*explorer_*claude mcp addcreator-hubstop_previewMistakes. Undo is the user's — tell them what to undo, or / back to the previous value. Never "repair" a mistake by editing .
remove_entityset_componentmain.composite先读后写。 调用 获取地块信息(边界计算方式与 composites 技能第 0 步完全相同——工具不会阻止你将实体放置在场景外,而且 的安全保障比看起来要弱——参见下文 Bevy 渲染器的注意事项)。调用 查看现有实体,避免名称重复。当用户的请求涉及他们选中的内容时,调用 。
get_project_infoget_scene_metricsscene_stateget_selection添加模型。
- 目录物品 → 先 ,再
search_catalog。文件会自动保存到place_smart_item目录。assets/asset-packs/<pkg>/ - 建筑结构(房间、走廊、门口,以及任何化身可以穿过或进入的物体)→ 放置前先根据第三人称相机调整尺寸;现实中的尺寸在游戏中会显得狭窄。尺寸标准参见 add-3d-models → “规则:为第三人称相机放大室内空间”。
- 用户已有的模型,或你创作的模型 → 将 GLB 文件放到 目录下(Blender 创作和边界盒检查参见 add-3d-models 技能),然后调用
assets/Models/(指定create_entity)、name设置set_component(Transform),以及{position:{x,y,z}, rotation:{x,y,z,w}, scale:{x,y,z}}设置set_component(core::GltfContainer—— 掩码规则以及 add-3d-models 中的动画/碰撞体检查仍然适用;如果 GLB 包含动画片段,添加{src, visibleMeshesCollisionMask, invisibleMeshesCollisionMask})。core::Animator - 灯光 → 用分类 调用
lights找到聚光灯和点光源 Smart Item,然后search_catalog。这些物品包含灯光模型、place_smart_item和切换动作。仅当你需要不可见光源或非标准参数时,才手动创建裸LightSource实体——完整的LightSourceAPI 和 Smart Item 规则参见 lighting-environment。LightSource - 添加行为 → 如果有合适的 Smart Item 就用(先 ),否则在
search_catalog下编写脚本并调用assets/Scripts/(规则参见 script-components),或者在attach_script代码中通过名称引用实体(src/)。engine.getEntityOrNullByName
组件结构。
set_componententity_detailasset-packs::Scriptlayoutattach_script写入之后。
在数据层正常运行时,写后读是安全的——服务器在修改操作返回前会等待自动保存完成,因此后续的 是最新的。一旦该进程死亡,写后读就不再安全(下一条规则),这就是为什么下面的检查是基于磁盘而不是工具返回值的原因。添加几何体后检查 。 无需预览即可显示结果;当你需要运行中的场景时(行走、点击、日志、FPS),使用 + 。unity-explorer-mcp 技能中的迭代循环、相机取景和性能参考完全适用于 工具——跳过该技能的设置部分(无需 ,无需绑定门槛),因为这些工具是通过 服务器提供的。完成后,如果只是为了检查而启动预览,将相机保持在第三人称视角并调用 。
scene_stateget_scene_metricseditor_screenshotlaunch_previewexplorer_*explorer_*claude mcp addcreator-hubstop_preview错误处理。
撤销是用户的权限——告诉他们要撤销什么,或者用 / 恢复到之前的值。绝对不要通过编辑 来“修复”错误。
remove_entityset_componentmain.compositeRULE — confirm a batch landed on disk; the data layer can die silently
规则 —— 确认批量修改已写入磁盘;数据层可能静默死亡
The thing that holds the editor's engine and writes is the @dcl/inspector data layer, and under the Bevy renderer it runs in a separate child process — logged by the app as (assembled in ; the port is ephemeral, the binary is the scene's ). Under the Babylon renderer the same data layer runs inside the inspector iframe instead. Either way the Electron main process never writes the composite — it only reads it.
assets/scene/main.composite[UtilityProcess] Running "sdk-commands start --port <n> --no-browser --no-client --data-layer"main/src/modules/bevy-realm.tsnode_modules/@dcl/sdk-commandsWhen that data layer dies, the MCP server in the Electron app stays up and keeps answering every call as if nothing were wrong. Nothing in a tool result tells you the scene stopped changing.
So after every batch of mutations, check the file, not the tool: 's modification time must have advanced (/). An unchanged mtime across a batch means the edits exist only in a process that is gone.
assets/scene/main.compositels -lstatbash
stat -f '%m %N' "assets/scene/main.composite" # macOS; coreutils: stat -c '%Y %n'powershell
(Get-Item "assets\scene\main.composite").LastWriteTime # Windows (PowerShell)Observed symptoms of a dead data layer (2026-10-08 session; check these when the mtime is stale):
- ,
set_component,create_entityand friends all still return success.place_smart_item - /
scene_statekeep returning the pre-crash values — a read-back "confirming" your write is confirming the old snapshot.entity_detail - returns a blank image.
editor_screenshot - returned all zeros with an empty
get_scene_metrics— but do not use that as the tell — under the Bevy renderer those fields are hardcoded zeros anyway (see Gotchas). The mtime check is the reliable one.entitiesOutOfBoundaries
Recovery is the user's, and your in-memory edits are lost. There is no tool that restarts the data layer. Stop writing, look at the Creator Hub main log (macOS: ; Windows: ) for an line, tell the creator to close and reopen the scene in the Creator Hub, then re-apply every mutation made since the crash — compare against the composite on disk to find where the truth stops.
~/Library/Logs/creator-hub/main.log%APPDATA%\creator-hub\logs\main.logExiting "sdk-commands start … --data-layer" … exit code=1Observed crash, for recognition only — not a claim about the only way it fails: inside ( → → → ), immediately after a call that rewrote with range-valued () positions, and shortly after six calls. Treat range spawn points as a suspect, not a proven cause; if you hit it, report it via report-sdk-issue.
TypeError: Cannot read properties of undefined (reading 'deserialize')node_modules/@dcl/inspector/dist/tooling-entrypoint.jsObject.deserializeupdateFromCrdtreceiveMessagesupdateset_scene_settingsspawnPoints[min, max]place_smart_item承载编辑器引擎并写入 的是 @dcl/inspector 数据层,在 Bevy 渲染器下,它运行在一个独立的子进程中——应用日志中显示为 (代码位于 ;端口是临时的,二进制文件是场景自身的 )。在 Babylon 渲染器下,同一数据层运行在编辑器的 iframe 中。无论哪种方式,Electron 主进程都不会写入 composite 文件——它只会读取。
assets/scene/main.composite[UtilityProcess] Running "sdk-commands start --port <n> --no-browser --no-client --data-layer"main/src/modules/bevy-realm.tsnode_modules/@dcl/sdk-commands当数据层死亡时,Electron 应用中的 MCP 服务器仍会正常运行,并且会继续响应所有调用,仿佛一切正常。工具返回结果中没有任何迹象表明场景已停止更新。
因此,每完成一批修改后,要检查文件而不是工具: 的修改时间必须更新(用 / 查看)。如果一批修改后 mtime 没有变化,说明这些修改只存在于已经死亡的进程中。
assets/scene/main.compositels -lstatbash
stat -f '%m %N' "assets/scene/main.composite" # macOS; coreutils: stat -c '%Y %n'powershell
(Get-Item "assets\scene\main.composite").LastWriteTime # Windows (PowerShell)数据层死亡的已观察到的症状(2026-10-08 会话;当 mtime 未更新时检查这些):
- 、
set_component、create_entity等工具仍然返回成功。place_smart_item - /
scene_state持续返回崩溃前的值——读回的“确认”写入成功的结果实际上是旧快照。entity_detail - 返回空白图像。
editor_screenshot - 返回全零值,且
get_scene_metrics为空——但不要以此作为判断依据——因为在 Bevy 渲染器下这些字段本来就是硬编码的零(参见注意事项)。mtime 检查才是可靠的。entitiesOutOfBoundaries
恢复操作需要用户执行,你内存中的修改将会丢失。 没有工具可以重启数据层。停止写入操作,查看 Creator Hub 主日志(macOS:;Windows:),查找 这样的行,告诉创作者在 Creator Hub 中关闭并重新打开场景,然后重新应用崩溃以来的所有修改——与磁盘上的 composite 文件对比,找出哪些修改是真实存在的。
~/Library/Logs/creator-hub/main.log%APPDATA%\creator-hub\logs\main.logExiting "sdk-commands start … --data-layer" … exit code=1观察到的崩溃案例,仅用于识别——不代表这是唯一的失败方式: 中出现 (调用链: → → → ),发生在调用 用范围值()位置重写 之后,且紧随六次 调用之后。将范围出生点视为可疑原因,而非已证实的原因;如果你遇到此问题,请通过 report-sdk-issue 上报。
node_modules/@dcl/inspector/dist/tooling-entrypoint.jsTypeError: Cannot read properties of undefined (reading 'deserialize')Object.deserializeupdateFromCrdtreceiveMessagesupdateset_scene_settings[min, max]spawnPointsplace_smart_itemPreview lifecycle — stop_preview
does not close the Explorer
stop_preview预览生命周期 —— stop_preview
不会关闭 Explorer
stop_previewstop_previewmain/src/modules/explorer-gateway.tstreeKillsdk-commands start --explorer-alpha --hub … --mcp --mcp-port <n>[UtilityProcess] Killing process "…"{ok: true}open decentraland://…preview_statusrunningchild.alive()Why the next launch then fails — verified parts first: each grabs a fresh ephemeral MCP port () and passes it as , and the desktop Explorer is single-instance, so a second launch's deep link is handed to the window already open. The inference (not read off the Explorer source) is that the open window keeps its MCP on the old port and never binds the new one. Either way, after ~45 s of retries the Hub returns:
launch_preview[Gateway] launching preview … with MCP on :53880--mcp-portThe preview launched but its MCP server never answered. The Explorer may still be starting, or this build has no MCP support. (TypeError: fetch failed)
and — note — that failure path also kills the dev server it just started, leaving the Explorer orphaned on a dead realm. Observed 2026-10-08: two launches in a row reproduced it. (Related: can block up to 90 s polling an Explorer that is up but not ready, so a long hang there is not a crash.)
preview_statusRule — before , check both the tool and the OS:
launch_previewbash
pgrep -fl '[M]acOS/Explorer' # the Explorer app itself
pgrep -fl '[d]cl_watchdog' # its watchdog, from /Applications/Decentraland.appKeep the brackets in these patterns. / match against every process's full command line, and many agent shell tools run commands as , so a plain pattern also matches the wrapper shell: the check reports a live Explorer that isn't there, and kills the shell running it. still matches the real process, but never the command text itself.
pgrep -fpkill -fbash -c "<command>"pkill[d]cl_watchdogpreview_statuslaunch_previewbash
pkill -f '[d]cl_watchdog'; pkill -f '[D]ecentraland.app/Contents/MacOS/Explorer'
for i in $(seq 1 30); do pgrep -f '[M]acOS/Explorer' >/dev/null || break; sleep 1; done # wait up to 30 sOn Windows the Explorer is and the watchdog . In PowerShell (matching by process name, so the check never matches the shell running it):
Decentraland.exedcl_watchdog.exepowershell
Get-Process Decentraland, dcl_watchdog -ErrorAction SilentlyContinue # is either alive?
Stop-Process -Name dcl_watchdog -Force -ErrorAction SilentlyContinue # watchdog first: it reacts to a non-zero Explorer exit
Stop-Process -Name Decentraland -Force -ErrorAction SilentlyContinue
Wait-Process -Name Decentraland -Timeout 30 -ErrorAction SilentlyContinue # confirm it exitedConnected first try on both attempts after that. Prefer reusing a healthy running preview (hot reload + ) over restarting — only kill when it is stale or the MCP never answered. When the user owns that Explorer window, ask before killing it.
explorer_reload_sceneA re-baked GLB can keep rendering its old contents in a running preview. Not the dev server's doing: 7.30.1 re-walks the project on every content request, serves current bytes , versions each file's id by , and runs a chokidar watcher the Hub never disables — so the staleness is downstream, in the Explorer's own asset cache. Observed 2026-10-08: GLBs added or renamed after were missing in-world until (one case) or a full preview restart (another), and a GLB overwritten in place under the same name kept showing the old mesh. hot reload is unaffected. Practical rule: after re-baking a model, export it under a new file name and repoint — that is the form that reloaded reliably; otherwise and, if the old mesh persists, restart the preview. (Symptom: the mesh you just exported is absent or visibly stale while shows no load error. Also check — an ignored path is never served at all.)
@dcl/sdk-commandsno-cachemtimelaunch_previewexplorer_reload_scenesrc/GltfContainer.srcexplorer_reload_sceneexplorer_get_scene_logs.dclignorestop_previewmain/src/modules/explorer-gateway.tstreeKillsdk-commands start --explorer-alpha --hub … --mcp --mcp-port <n>[UtilityProcess] Killing process "…"{ok: true}open decentraland://…preview_statusrunningchild.alive()为什么下一次启动会失败——先讲已验证的部分:每次 都会获取一个新的临时 MCP 端口(日志:)并将其作为 参数传入,而桌面版 Explorer 是单实例的,因此第二次启动的深度链接会被交给已经打开的窗口。推断(未从 Explorer 源码中确认)是:已打开的窗口会保持其 MCP 在旧端口上,永远不会绑定新端口。无论哪种情况,经过约 45 秒的重试后,Hub 会返回:
launch_preview[Gateway] launching preview … with MCP on :53880--mcp-port预览已启动,但其 MCP 服务器从未响应。Explorer 可能仍在启动,或者此版本不支持 MCP。(TypeError: fetch failed)
并且——注意——这个失败路径也会杀死它刚刚启动的开发服务器,导致 Explorer 孤立在一个已死亡的领域上。2026-10-08 观察到:连续两次启动均可复现此问题。(相关: 轮询已启动但未就绪的 Explorer 时可能阻塞长达 90 秒,因此长时间挂起并不一定是崩溃。)
preview_status规则 —— 在调用 之前,同时检查工具和操作系统:
launch_previewbash
pgrep -fl '[M]acOS/Explorer' # the Explorer app itself
pgrep -fl '[d]cl_watchdog' # its watchdog, from /Applications/Decentraland.app这些模式中的括号要保留。 / 会匹配每个进程的完整命令行,而许多 Agent shell 工具以 的形式运行命令,因此普通模式也会匹配包装 shell:检查会误报存在实际并不存在的 Explorer,而 会杀死运行命令的 shell。 仍然会匹配真实进程,但永远不会匹配命令文本本身。
pgrep -fpkill -fbash -c "<command>"pkill[d]cl_watchdogpreview_statuslaunch_previewbash
pkill -f '[d]cl_watchdog'; pkill -f '[D]ecentraland.app/Contents/MacOS/Explorer'
for i in $(seq 1 30); do pgrep -f '[M]acOS/Explorer' >/dev/null || break; sleep 1; done # wait up to 30 s在 Windows 上,Explorer 是 ,看门狗是 。在 PowerShell 中(按进程名匹配,因此检查永远不会匹配运行命令的 shell):
Decentraland.exedcl_watchdog.exepowershell
Get-Process Decentraland, dcl_watchdog -ErrorAction SilentlyContinue # is either alive?
Stop-Process -Name dcl_watchdog -Force -ErrorAction SilentlyContinue # watchdog first: it reacts to a non-zero Explorer exit
Stop-Process -Name Decentraland -Force -ErrorAction SilentlyContinue
Wait-Process -Name Decentraland -Timeout 30 -ErrorAction SilentlyContinue # confirm it exited之后两次尝试都一次连接成功。优先复用健康运行的预览(热重载 + ),而不是重启——仅当预览陈旧或 MCP 从未响应时才杀死。如果 Explorer 窗口是用户主动打开的,请先询问再杀死。
explorer_reload_scene重新烘焙的 GLB 在运行的预览中可能仍渲染旧内容。 这不是开发服务器的问题: 7.30.1 版本在每次内容请求时都会重新遍历项目,以 方式提供当前字节,通过 为每个文件的 ID 生成版本号,并且运行着一个 Hub 从未禁用的 chokidar 监听器——因此内容陈旧的问题发生在下游,即 Explorer 自身的资源缓存中。2026-10-08 观察到:在 之后添加或重命名的 GLB 在场景中缺失,直到调用 (一个案例)或完全重启预览(另一个案例)才出现;而原地覆盖同名的 GLB 会一直显示旧网格。 的热重载不受影响。实用规则:重新烘焙模型后,以新文件名导出,并重新设置 ——这是可靠重载的方式;否则调用 ,如果旧网格仍然存在,就重启预览。(症状:你刚导出的网格缺失或明显过时,但 没有显示加载错误。还要检查 ——被忽略的路径根本不会被提供。)
@dcl/sdk-commandsno-cachemtimelaunch_previewexplorer_reload_scenesrc/GltfContainer.srcexplorer_reload_sceneexplorer_get_scene_logs.dclignoreWhere the skills come from
技能来源
How these skills reach the agent depends on which of the two setups above you are in.
Inside the Creator Hub's AI assistant the app installs them — never hand-copy them. The installer lives in :
packages/creator-hub/main/src/modules/skills.ts- It downloads main into a per-user cache (keyed on the upstream commit SHA plus the app version, swapped atomically, tolerant of being offline).
decentraland/sdk-skills - It symlinks that cache into the open scene as and
.claude/skills. Links the app created are added to a.agents/skills. If the user already has a real.gitignoredirectory, it links each skill in individually and skips names the user already owns.skills
In that setup, do not copy skill directories into the scene and do not tell the user to: a hand-placed copy shadows the managed symlink and then silently goes stale; the app is the updater.
From an external client (Claude Code CLI or VS Code extension, Cursor, Codex, Claude Desktop, …) the skills are the user's to install. The MCP snippet only connects the tools; it does not bring the skills along. Two cases:
-
If the Creator Hub currently has the scene open, the app-managed/
.claude/skillssymlinks already exist in the scene folder, so a Claude Code session started in that folder picks them up. Do not duplicate them..agents/skills -
Otherwise (a different working directory, the scene not open in the Creator Hub, or a client that reads skills from elsewhere), install them the normal way, from the scene folder or the user's skills root:bash
npx skills add decentraland/sdk-skills --allRe-run the same command to update;only refreshes skills already present and misses newly added ones. See the repo README for per-skill installs.npx skills update
Four skills are deliberately denylisted inside the Creator Hub agent: , , , . The Creator Hub owns scaffolding and publishing through its own UI, and it is SDK7-only. The installer handles them in two ways:
create-scenedeploy-scenedeploy-worldsmigrate-sdk6-to-sdk7- A denylisted skill that has supporting files (,
create-scene) ships without itsmigrate-sdk6-to-sdk7— itsSKILL.mdstay resolvable from other skills' relative paths, but the skill itself can never trigger.references/ - A denylisted skill whose directory holds nothing but (
SKILL.md,deploy-scene) is skipped entirely.deploy-worlds
If a user inside the Creator Hub asks to scaffold a project or publish, point them at the app's own flow rather than trying to load or reconstruct those skills. A manual install from an external client is not denylisted: all four skills are available there.
npx skills add这些技能如何到达 Agent,取决于你处于上述哪种设置中。
在 Creator Hub 的 AI 助手中,应用会自动安装它们——绝对不要手动复制。 安装程序位于 :
packages/creator-hub/main/src/modules/skills.ts- 它会将 的 main 分支下载到用户级缓存中(缓存键为上游提交 SHA 加上应用版本,原子交换,支持离线)。
decentraland/sdk-skills - 它会将该缓存符号链接到打开的场景中,路径为 和
.claude/skills。应用创建的链接会被添加到.agents/skills中。如果用户已经有一个真实的.gitignore目录,它会逐个链接每个技能,并跳过用户已有的名称。skills
在这种设置下,不要将技能目录复制到场景中,也不要告诉用户这样做:手动放置的副本会遮蔽受管理的符号链接,然后静默过时;更新由应用负责。
从外部客户端(Claude Code CLI 或 VS Code 扩展、Cursor、Codex、Claude Desktop 等)使用时,技能需要用户自行安装。 MCP 片段仅连接工具,不会附带技能。分两种情况:
-
如果 Creator Hub 当前打开了该场景,那么场景文件夹中已经存在应用管理的/
.claude/skills符号链接,因此在该文件夹中启动的 Claude Code 会话会自动拾取它们。不要重复安装。.agents/skills -
否则(工作目录不同、Creator Hub 未打开该场景,或者客户端从其他位置读取技能),从场景文件夹或用户的技能根目录按常规方式安装:bash
npx skills add decentraland/sdk-skills --all
重新运行相同命令即可更新; 仅刷新已存在的技能,会遗漏新增的技能。单技能安装参见仓库 README。
npx skills updateCreator Hub Agent 中有四个技能被故意列入黑名单: 、、、。Creator Hub 通过自身 UI 负责项目脚手架和发布,且仅支持 SDK7。安装程序以两种方式处理它们:
create-scenedeploy-scenedeploy-worldsmigrate-sdk6-to-sdk7- 有支持文件的黑名单技能(、
create-scene)会不带migrate-sdk6-to-sdk7发布——其SKILL.md目录仍可通过其他技能的相对路径解析,但技能本身永远不会触发。references/ - 目录中只有 的黑名单技能(
SKILL.md、deploy-scene)会被完全跳过。deploy-worlds
如果 Creator Hub 内的用户要求创建项目脚手架或发布,请指引他们使用应用自身的流程,而不是尝试加载或重建这些技能。从外部客户端手动执行 安装不受黑名单限制:四个技能在那里都可用。
npx skills addGotchas
注意事项
- URL and token rotate on every Creator Hub launch. A config that worked yesterday gives or
ECONNREFUSEDtoday; the fix is re-copying the snippet from Settings, not retrying.401 - One open project at a time. The server operates on the scene open in the single editor window. Mutation tools answer when the user is on the scene list.
No editor window is open. - Disk-read tools may say from an external client even though the scene is visibly open: as of the initial release (creator-hub
No scene is open., PR #1499) the project directory is bound to217e2f9f/get_project_info/scene_statewhen the embedded assistant runs a turn. Everything routed through the editor (entity_detail,get_selection,get_scene_metrics, all mutations,get_scene_settings) works regardless. Workaround: readplace_smart_itemandscene.jsonfrom disk read-only for the roster, then mutate through the tools.assets/scene/main.composite - Read tools trail the engine by one autosave (~100 ms). The mutation tools already wait it out; only matters if the user is dragging things while you read.
- caps at 200 entities. For big scenes filter by name via
scene_stateor read the composite from disk.entity_detail - Skill denylist inside the Creator Hub. The app links into the scene as
decentraland/sdk-skills/.claude/skills, but drops the.agents/skillsofSKILL.md,create-scene,deploy-scene, anddeploy-worlds: scaffolding, publishing, and SDK6 migration are the app's own flows there. Their reference files still resolve for cross-links.migrate-sdk6-to-sdk7 - The Explorer preview checkbox is a different server. Enable MCP Server lives in the Play Options popover (the dropdown arrow on the editor header's Play button), in the flyout that opens when you hover the Desktop Client row. It launches the Explorer with its own MCP on port 8123 (the unity-explorer-mcp skill). The Creator Hub MCP described here is the editor's server; when it is connected, use its
--mcpinstead of that checkbox.launch_preview - One Ctrl+Z = one of your operations, not one component write. Since creator-hub a whole synchronous change burst commits as a single undo transaction (the old 200-operation batch cap used to split a big change across several entries, so one Ctrl+Z left orphaned entities behind). A multi-entity op — placing a composite Smart Item, a scripted item with children — is now one entry, and undoing an add removes the entity from the Bevy viewport too. Still describe your changes to the user in the units they will undo them in.
fdc384b5 - Scene audio can be muted in the editor, but only under Bevy. The viewport toolbar has a speaker toggle (Mute scene audio / Unmute scene audio) that forwards every /
AudioSourceto the renderer at volume 0; the state survives a reload. It is absent under the Babylon renderer, which does not play scene audio at all. So "I can't hear the sound you added" is not evidence the component is wrong — check the renderer and the toggle first, and note that an authoredAudioStreamis not what the Bevy viewport is playing while mute is on.volume - reports nothing useful under the Bevy renderer. Verified in
get_scene_metrics:packages/inspector/src/lib/renderer/bevy/BevyRenderer.tsreturnsgetSceneMetrics()and{triangles: 0, bodies: 0, materials: 0, textures: 0}returnsgetEntitiesOutsideLayout(), both hardcoded ("No renderer to introspect yet — report zeros"). The limits are still real, and[]is derived from the Nodes tree rather than the renderer, but all-zero content metrics and an emptyentitiesmean "Bevy", not "empty scene" and not "problem" — do not read a budget or an out-of-bounds verdict out of them. Under Babylon they are real:entitiesOutOfBoundariestests each entity's bounding mesh against the layout, so it does catch oversized geometry there. For a trustworthy budget either way,computeEntitiesOutsideLayoutand uselaunch_preview.explorer_get_scene_content_stats asset-packs::Placeholderneeds a resolved file path, not a template variable. The catalog stores paths withsrcas a template; setting that string literally via{assetPath}/model.glbproduces an invisible or broken gizmo because the engine cannot resolve the variable.set_componentresolves the path automatically (e.g. toplace_smart_item). If you must setassets/asset-packs/spotlight/spotlight.glbmanually, use the real on-disk path to the GLB file.Placeholder
- 每次 Creator Hub 启动都会更换 URL 和令牌。 昨天还能用的配置今天可能返回 或
ECONNREFUSED;解决方法是从设置中重新复制片段,而不是重试。401 - 一次只能打开一个项目。 服务器仅对单个编辑器窗口中打开的场景进行操作。当用户在场景列表页面时,修改工具会返回 。
No editor window is open. - 外部客户端调用磁盘读取工具可能返回 ,即使场景明显已打开:在初始版本中(creator-hub
No scene is open.,PR #1499),只有当嵌入式助手运行一轮对话时,项目目录才会绑定到217e2f9f/get_project_info/scene_state。所有通过编辑器路由的操作(entity_detail、get_selection、get_scene_metrics、所有修改操作、get_scene_settings)都正常工作。解决方法:从磁盘只读读取place_smart_item和scene.json来获取实体名册,然后通过工具进行修改。assets/scene/main.composite - 读取工具比引擎滞后一次自动保存(约 100 毫秒)。修改工具已经会等待这段时间;只有当用户在你读取的同时拖动对象时才会有影响。
- 最多返回 200 个实体。 对于大型场景,通过
scene_state按名称过滤,或者从磁盘读取 composite 文件。entity_detail - Creator Hub 内的技能黑名单。 应用会将 链接到场景中的
decentraland/sdk-skills/.claude/skills,但会移除.agents/skills、create-scene、deploy-scene和deploy-worlds的migrate-sdk6-to-sdk7:脚手架、发布和 SDK6 迁移都是应用自身的流程。它们的参考文件仍可通过交叉链接解析。SKILL.md - Explorer 的 预览复选框是另一个服务器。 启用 MCP 服务器 选项位于播放选项弹出框中(编辑器标题栏播放按钮的下拉箭头),当你悬停在桌面客户端行时会显示该弹出框。它会启动 Explorer,并在 8123 端口运行其自己的 MCP(参见 unity-explorer-mcp 技能)。本文描述的 Creator Hub MCP 是编辑器的服务器;当连接到它时,请使用其
--mcp而不是那个复选框。launch_preview - 一次 Ctrl+Z = 你的一个操作,而不是一次组件写入。 自 creator-hub 版本起,一整批同步更改会作为单个撤销事务提交(旧的 200 操作批量限制会将大的更改拆分到多个条目中,因此一次 Ctrl+Z 会留下孤立的实体)。多实体操作——放置一个复合 Smart Item、一个带子项的脚本化物品——现在是一个条目,撤销添加操作也会从 Bevy 视口中移除实体。仍然要以用户撤销的单位向他们描述你的更改。
fdc384b5 - 编辑器中可以静音场景音频,但仅在 Bevy 渲染器下有效。 视口工具栏有一个扬声器切换按钮(静音场景音频 / 取消静音场景音频),它会将所有 /
AudioSource以音量 0 转发给渲染器;该状态在重载后仍然保留。Babylon 渲染器下没有此功能,因为它根本不播放场景音频。因此“我听不到你添加的声音”并不代表组件有问题——先检查渲染器和切换按钮,注意当静音开启时,Bevy 视口播放的音量并不是你设置的AudioStream值。volume - 在 Bevy 渲染器下返回的内容没有实际用处。 已在
get_scene_metrics中验证:packages/inspector/src/lib/renderer/bevy/BevyRenderer.ts返回getSceneMetrics(),{triangles: 0, bodies: 0, materials: 0, textures: 0}返回getEntitiesOutsideLayout(),两者都是硬编码的(“暂无渲染器可内省——返回零”)。限制仍然是真实的,[]是从节点树而非渲染器派生的,但全零的内容指标和空的entities意味着“使用 Bevy 渲染器”,而不是“空场景”或“有问题”——不要从中解读资源预算或越界判定。在 Babylon 下这些值是真实的:entitiesOutOfBoundaries会将每个实体的边界网格与布局进行对比,因此确实能检测到超大几何体。无论哪种渲染器,要获得可靠的预算数据,请启动预览并使用computeEntitiesOutsideLayout。explorer_get_scene_content_stats - 的
asset-packs::Placeholder需要解析后的文件路径,而不是模板变量。 目录中存储的路径使用src作为模板;通过{assetPath}/model.glb直接设置该字符串会导致不可见或损坏的小控件,因为引擎无法解析该变量。set_component会自动解析路径(例如解析为place_smart_item)。如果你必须手动设置assets/asset-packs/spotlight/spotlight.glb,请使用 GLB 文件的真实磁盘路径。Placeholder