Taos Engine · Modules

Modules

Editor MCP bridge — prompt-driven live editing

Drive the running Taos Engine editor from a Claude Code terminal: create objects, add components, set properties — and watch them appear live in the open editor's viewport. The MCP server joins the editor's collaboration room as a headless peer ("Claude"), so its edits flow through the exact same path human collaborators use (EditorOps applied to the live binder, no scene reload).

Implementation lives in editor/src/mcp/; design notes and milestone status in TODO/editor-mcp-prompt-editing.md.

How it fits together#

Claude Code terminal ──stdio MCP──> taos-editor server (headless collab peer)
                                          │ ws  ws://127.0.0.1:8787/editor
                                          ▼
                                   collab host (Share Project)
                                          │ broadcast ops
                                          ▼
                                   open editor ── live viewport update

The MCP server is not the model — Claude Code is. The server only exposes the editor's capabilities as tools. (The editor's own ai.ts / Anthropic key are unrelated and uninvolved in this flow.)

Quick start#

  1. Open your project in the editor and load the scene you want to edit.
  2. Share Project (the collab host control). This starts the collaboration server on ws://localhost:8787 and the editor joins its own room — that self-join is what makes edits render live. Or enable "Auto-host for Claude (MCP)" in that control once, and the editor shares automatically whenever you open a scene.
  3. Run Claude Code in this repo. It discovers the server via .mcp.json. Approve the taos-editor server when prompted.
  4. Prompt away: "add a PointLight above the Player and set its intensity to 30."

The server connects lazily and retries, so it's fine to start Claude before or after Share Project, or to re-share after a restart.

Pointing at a different scene / port#

The default targets ws://127.0.0.1:8787 and Main.scene. Override via env in .mcp.json (or --url / --scene flags):

JSONC
"env": {
  "TAOS_EDITOR_URL": "ws://127.0.0.1:8787",
  "TAOS_EDITOR_SCENE": "levels/Level1.scene"
}

Run it standalone for debugging: npm --prefix editor run mcp -- --scene Main.scene.

Tools#

Read:

Write (broadcast as EditorOps; applied live in every connected editor):

Lifecycle (filesystem; off the collab path — no editor needs to be running):

These default their project to TAOS_EDITOR_PROJECT (set it in .mcp.json env, or pass projectDir/parentDir explicitly). Richer disk-based templates (geo, Tron) and the full web bundle build remain editor-only for now (they need Electron).

Component schema#

Write tools seed new components from a node-safe catalog, editor/src/mcp/component_schema.gen.json, generated from the renderer's authoritative componentSchema.ts. Regenerate it when components change:

Shell
npm --prefix editor run build:component-schema

(The renderer schema imports the engine + .wgsl, so the generator loads it through Vite SSR — plain Node can't.)

Safety / scope notes#