# MML ProStudio > Build and host live MML (Metaverse Markup Language) scenes for Otherside's Swamp and Nexus: a code and 3D editor, an always-on live server with one shareable wss:// link per scene, asset tools with a 1M-triangle budget, live-show tools (Stage Remote, Game Remote, DJ Booth), a knowledge bank, and an MCP server any AI model can use. Units are metres, degrees and milliseconds. Scripts run on the server (shared clock). Every save keeps a version. ## Docs - [overview](https://mmlprostudio.com/docs/overview.md) - [mml reference](https://mmlprostudio.com/docs/mml-reference.md) - [cavekit](https://mmlprostudio.com/docs/cavekit.md) - [otherside rules](https://mmlprostudio.com/docs/otherside-rules.md) - [limits](https://mmlprostudio.com/docs/limits.md) - [export](https://mmlprostudio.com/docs/export.md) - [workflow](https://mmlprostudio.com/docs/workflow.md) - [mcp](https://mmlprostudio.com/docs/mcp.md) - [api](https://mmlprostudio.com/docs/api.md) - [faq](https://mmlprostudio.com/docs/faq.md) ## For agents - [MCP server card](https://mmlprostudio.com/.well-known/mcp/server-card.json): endpoint https://mmlprostudio.com/functions/mcp (key from the AI Connect page), 34 tools. - [Agent Skills](https://mmlprostudio.com/.well-known/agent-skills/index.json): SKILL.md workflows for building a scene, importing a model and running a live show. - [Everything in one file](https://mmlprostudio.com/llms-full.txt) ## Optional - [Knowledge bank (live)](https://mmlprostudio.com/knowledge) – tested facts about Otherside, with evidence status. - [Help](https://mmlprostudio.com/help) – the human version of these docs. --- # MML ProStudio MML ProStudio (https://mmlprostudio.com) builds and hosts live MML (Metaverse Markup Language) scenes for Otherside's Swamp and Nexus. One link per scene (`wss:///`), always on, the same scene for every player: scripts run on the server, so everyone sees the same thing. What it offers: - A code editor with MML autocomplete, lint and a checker, and a 3D visual editor (gizmos, multi-select, align, levels, ground snap). - An always-on live server with per-scene start/stop/restart, player counts, joins and leaves, diagnostics and player data. - Asset tools: GLB inspector (triangles, textures, size, bounds), a 1,000,000-triangle budget per project, an optimizer for low-end clients (Draco + lighter textures), community and free assets. - Live-show tools: Stage Remote (characters, cues, sound, screens), Game Remote, a DJ Booth that drives in-world speakers and a stage screen. - A knowledge bank of what is known to work in Otherside, with evidence status. - An MCP server so any AI model can read, build, check, preview, start and stop scenes (see [MCP for AI agents](https://mmlprostudio.com/docs/mcp.md)). ## Pages | Path | Page | Who | What it is for | |---|---|---|---| | `/` | Home | everyone | Live player count, links to every tool. | | `/create` | Create | member | Paste MML and get a live wss:// link in seconds. | | `/scenes` | Scenes | member | Every scene you own: start, stop, restart one or many (checkboxes, Stop all, Restart all), copy links, open the editor. | | `/editor/:id` | Editor | member | Code editor (MML autocomplete, lint, checker), 3D visual editor (gizmos, multi-select, align, levels), versions, export optimizer, console, live preview. | | `/projects` | Projects | member | Groups of scenes with handoff notes for AI sessions; import/export bundles, backups. | | `/assets` | My Assets | member | Your uploaded GLB models, images, sounds and videos, with https links to use in scenes. | | `/free-assets` | Free Assets | everyone | Community models anyone can use; submit your own (validated). | | `/remote` | Stage Remote | member | Run a live show in a scene: characters, cues, sound, screens, guidance. | | `/game-remote` | Game Remote | member | Host a game in a scene: setups, keys, runs. | | `/dj` | DJ Booth | member | Two decks, crossfader, EQ, FX, hot cues, loops, waveform; drives in-world speakers and a stage screen. | | `/knowledge` | Knowledge | everyone | What is known to work (or break) in Otherside's Swamp and Nexus, with evidence status. | | `/help` | Help | everyone | Getting started, limits, export, Otherside rules, MML element reference, CaveKit, FAQ, AI connection. | | `/ai` | AI Connect | owner | The MCP connection for Claude, ChatGPT, Claude Code, Cursor and any other model: link, on/off, rotate, activity. | | `/view?url=wss://...` | Viewer | everyone | Open any live scene link in the browser with proper lighting (orbit or fly). | | `/join` | Join | everyone | Enter an invite code or ask to join. | Members sign in and see only their own scenes, assets and projects. The site owner sees his own. ## Links for agents - `https://mmlprostudio.com/llms.txt` – this index. `https://mmlprostudio.com/llms-full.txt` – every doc in one file. - `https://mmlprostudio.com/docs/.md` – Markdown pages: mml-reference, cavekit, otherside-rules, limits, export, mcp, api, workflow, faq. - `https://mmlprostudio.com/.well-known/ai-catalog.json` → MCP server card. `https://mmlprostudio.com/.well-known/agent-skills/index.json` → Agent Skills. --- # MML element reference MML ELEMENT REFERENCE (units: metres, degrees, milliseconds) Shared on visual elements: id, class, x y z, rx ry rz, sx sy sz, visible, collide (default true), collision-interval, onclick, oncollisionstart/oncollisionmove/oncollisionend, socket (attach to a bone of a parent m-character). - m-group: container; transforms apply to children. - m-cube: width height depth (1), color, opacity. m-sphere: radius (0.5). m-cylinder: radius (0.5), height (1). m-plane: width height (a vertical plane; rx="-90" makes a floor). - m-model: src (https .glb), anim (animation .glb), anim-loop, anim-enabled, anim-start-time, anim-pause-time. - m-character: like m-model but for rigged avatars; child parts attach to bones. - m-light: type (point|spotlight), color, intensity, distance (0 = infinite), angle (spotlight), enabled. Otherside worlds are already lit: never add general/fill/sun lights. Only local lights with distance 3-10 m and intensity about 5-10 (tested: two unlimited lights at 30 and 15 washed a whole scene out in the Swamp). Prefer emissive for glow. - m-label: content, width, height, font-size (24), font-color, color (background, must be solid), alignment (left|center|right), padding, emissive. - m-image: src, width/height (one is enough, the other follows the aspect ratio), opacity, emissive. - m-video: src, width, height, loop, enabled, volume, start-time, pause-time, emissive. Keep volume at 0.5 or lower. - m-audio: src, loop, loop-duration, volume, cone-angle, cone-falloff-angle, start-time, pause-time, enabled. SAFE SOUND: volume 0.5 or lower (never above 0.8). Everyone in the world instance hears it, so keep it local: for looping/long sounds add an m-position-probe (range 10-15 m) that sets volume only while someone is near and 0 when they leave. Audio files should be normalised to about -23 LUFS. - m-frame: src (another wss:// or https MML document), load-range, unload-range, min-x..max-z bounds. Embed one scene in another. - m-prompt: message, placeholder, prefill; onprompt gives event.detail.value (text the player typed). Put a clickable child (e.g. a cube) inside. - m-link: href (opens a web page). - m-interaction: range (5), prompt, in-focus (default true: only while the player looks at it), line-of-sight (default false), priority (default 1; the LOWER number is shown first in MML); oninteract fires when a player uses it. Native ODK interactables are a different system (highest priority wins); see mml_guide targets. - m-position-probe: range, interval; events positionenter / positionmove / positionleave with event.detail.connectionId and positions. - m-chat-probe: range; onchat gives the chat message and connectionId. - m-attr-anim: attr, start, end, duration (1000), loop (default true), ping-pong, ping-pong-delay, easing, start-time, pause-time. Place it inside the element it animates. Runs on the shared clock, so it's the smoothest way to move things. - m-attr-lerp: attr (list or "all"), duration, easing. Smooths every later change of those attributes. The Cave server turns these into shared-clock m-attr-anim glides automatically. Events in scripts: element.addEventListener("click", (e) => e.detail.connectionId); window.addEventListener("connected"/"disconnected", (e) => e.detail.connectionId). ## Characters and avatars CHARACTERS AND AVATARS - Structure: with child parts. Use generate kind=character to build one. - Otherside avatar specs (from Otherside's avatar docs): rigged to the UE5 Mannequin skeleton, max 4 bone influences per vertex, GLB, up to 50,000 triangles, textures up to 2048x2048, 1-2 m tall, under 20 MB (under 10 MB recommended), PBR maps (base colour, normal in OpenGL Y+, packed ORM, emissive). At most 12 meshes per character, attachments included. - Otherside plays its own standard animation set on avatars, so animations in the MML are ignored for avatars. NPC-style characters placed in a scene (m-model with anim) do play their animation. - Common sockets: head, neck_01, spine_03, spine_02, pelvis, hand_r, hand_l, lowerarm_r/l, upperarm_r/l, thigh_r/l, calf_r/l, foot_r/l. - Use m-model (not m-character) for statues, props and NPCs that don't need player bones. ## Building patterns BUILDING PATTERNS - Dungeons: generate kind=dungeon (seeded rooms + corridors, merged walls, torches, spawn and exit pads). Change seed for a new layout; same seed gives the same layout. Add doors, traps and loot as separate elements with ids, then script them. - Mazes: generate kind=maze. Rooms/houses: kind=room. Stairs: kind=stairs (spiral:true for towers). Rings of pillars, fences, rows of seats: kind=array with mode circle|grid|line and your own html snippet. - Signs and UI: kind=sign, or m-label with a solid background. - Doors: an m-cube with onclick that CaveKit.moveTo's it up or sideways; save the state with CaveKit.save. - Buttons and triggers: clickable cubes (clicks worked in one Swamp test, X01). m-position-probe (area detection) and m-interaction ("Press E" prompt) are on Otherside's not-supported-yet list and each failed in one Swamp test (X07, X04), so use them only as extras next to a click control. Collision pads (collision-interval) are not tested yet (X08). - Keep every generated block in its own so it can be moved, found and replaced later. - To combine scenes, use m-frame src="wss:///" or paste generated groups into one scene. - Positions: y is up; the ground is y=0. A 1.8 m avatar needs doorways at least 2.2 m tall and 1.2 m wide. --- # CaveKit (server scripting) CAVEKIT (added by the Cave server to the top of every live scene) - CaveKit.now(): document time in ms, the clock every player shares. - CaveKit.moveTo(el, {x: 1, ry: 90}, ms, easing): glide attributes smoothly (atomic m-attr-anim swap, no stutter). - CaveKit.spin(el, "ry", degreesPerSecond): endless smooth rotation. CaveKit.stop(el, attrs?): freeze where it is. CaveKit.valueOf(el, attr): current animated value. - CaveKit.every(ms, fn) / CaveKit.at(time, fn): timers aligned to document time. - CaveKit.players (Set of connection ids), CaveKit.onJoin(fn), CaveKit.onLeave(fn). - CaveKit.save(key, value) / CaveKit.load(key, fallback): JSON game state that survives restarts (up to 20 keys, 18,000 characters each as JSON). Use for scores, leaderboards, door states. - CaveKit.log(type, data): shows up in live_status (and https:////lab.json). Use it to debug and to record events. Example: a scoreboard --- # What works in Otherside (Swamp and Nexus) OTHERSIDE RULES (Swamp and Nexus) - Tag support is narrower than the MML spec and differs by target: read mml_guide targets. It lists what Otherside documents and what this site's tests observed, with dates. - Paste the wss:/// link into the world to place a live scene. - See-through label backgrounds (rgba with alpha < 1) render invisible: use solid colours. - Assets must be https. Use .glb with embedded textures; .gltf with separate textures shows white. - cast-shadows is ignored. - Rapid scripted updates (intervals under ~200 ms) stutter for players; use m-attr-anim / CaveKit.moveTo. - Riding moving objects (one tester, Swamp, 27 Sep 2026 UTC): an animated m-cube platform carried the avatar (W08, Ride Lab lanes A, C, D, E); a GLB model floor on the same animation did not (Ride Lab lane B). Build decks and platforms from m-cubes. Nexus untested. - Registering static MML links and placing objects needs the right world permissions (the user has MML permissions in the Swamp and Nexus). ## Tag support by target Tag support is narrower than the MML spec and differs by target. Read the live knowledge bank (https://mmlprostudio.com/knowledge, or the MCP tool `knowledge`) before using m-interaction, m-prompt, m-audio, m-link, the probes or m-attr-lerp, and say what is documented versus observed (test and date). --- # Limits and budgets PERFORMANCE BUDGET - Fewer elements = faster loading for everyone. Merge walls/floors into long cubes (the generators already do). Aim for a few hundred to a couple of thousand elements per scene. - Reuse the same model URL many times rather than many different models; players download each file once. - Keep models small (under ~5 MB each; avatars under 10 MB) and textures at 2048 px or less. - Point lights are expensive: a handful per area, not one per torch in a long corridor. - Animate with m-attr-anim (sent once, played on every client) instead of scripts that change attributes many times per second. - Avoid fetch() in hot paths; the scene waits on it. - check_mml flags common problems. | Limit | Value | |---|---| | Triangles per project | 1,000,000 (models, avatars and shapes combined; single assets under 150,000) | | Avatars | GLB on the UE5 Mannequin skeleton, up to 50,000 triangles, textures up to 2048 px, 1–2 m tall, under 20 MB, at most 12 meshes | | Models | https .glb with textures inside; aim under ~5 MB each, textures 2048 px or less | | Scene size | up to 3 MB of scene code; elements in the low thousands; split big worlds with m-frame | | Script updates | changes faster than every ~200 ms stutter; use m-attr-anim or CaveKit.moveTo | | Saved game state | CaveKit.save: up to 20 keys per scene, 100 KB each | --- # Export optimization EXPORT OPTIMIZATION (so every player sees everything, even on Low graphics) - The site's Export tab (editor → Export) makes optimized copies of every model: duplicate data merged, unused data removed, vertices welded, animation keys thinned, Draco geometry compression, textures resized to power-of-two sizes (max 2048 px; 1024 in the Low-end profile), opaque colour textures as JPEG, normal/ORM/transparent textures as PNG. Originals stay untouched; "Use originals" swaps back. - Profiles: otherside (default, safe for the Swamp/Nexus and browsers), low (1024 px textures, fastest load), web (meshopt + quantization + WebP, browsers only; not for Otherside). - Formats come from knowledge entries with a format_key. Marked works from documentation (not yet tested in-world by this site): Draco, JPEG/PNG, skinned animation. Untested: meshopt, quantization, KTX2, WebP, material extensions. When an in-world test shows one works, save it with record_test_result; the optimizer starts using it only after the result is reviewed and applied to the knowledge bank. - Low settings in Otherside (Unreal scalability): shorter view distance culls small far objects; lower texture quality uses smaller mips. Keep important things bigger than ~15 cm, labels at font-size 24+, and put far areas behind m-frame load-range. - Tools: optimization_report (status of each model), apply_optimized_assets (swap in copies that already exist). Optimizing itself runs in the browser (Export tab, Quick Create, uploads), not in the MCP. --- # Workflow for an AI session WORKFLOW FOR AN AI SESSION 1. start_here → see projects and scenes. 2. open_project (or ask the user which project) → read notes. 3. get_scene / live_status → understand the current state. 4. Make changes: generate / update_scene with edits / create_scene. 5. check_mml, then save. 6. Share the wss:// link and the browser preview link. 7. save_project with a handoff note. - Undo: list_versions + restore_version. - The user also edits in the site's Pro Editor (code + visual 3D editor); the editor notices saves from AI and offers to load them. - If a tool errors, read the message: it says what to fix. ## The standing instructions (what the site tells Claude and ChatGPT) - At the start of every chat, call start_here. Then open the project I name with open_project (or ask me which one, suggesting the most recent). - Before writing MML, read the mml_guide topics you need (elements, cavekit, targets, otherside, avatars, building, performance). - Read a scene with get_scene before changing it. Change it with update_scene using small exact edits; use append for generated blocks; replace the whole source only when rebuilding. - Run check_mml on anything new or changed and fix errors before saving. - Use generate for dungeons, mazes, rooms, stairs, arrays (rings, grids, rows), characters and signs instead of writing hundreds of elements by hand. Use list_prefabs and list_assets for my own parts and models. - Use preview_mml to try ideas without saving. - For builds I want to watch: call live_preview first, then build piece by piece with build_step (one piece per call). After every step read user_guidance and follow it; if paused, stop and wait for me. Give me the page_url so I can open the live view beside the chat. - Keep a whole project under 1,000,000 triangles; results show the count. - Before handing over a finished scene, call optimization_report. Use apply_optimized_assets when optimized copies exist; otherwise ask the user to click "Optimize all models" in the editor's Export tab (Draco + lighter textures, so models load fast and show on Low graphics). - After creating or changing a scene, give me its wss:// link (for the Swamp or Nexus) and the browser preview link. - Every save keeps a version. If something goes wrong, use list_versions and restore_version. - When I say "wrap up", or before the chat ends, call save_project with a short dated handoff note: what changed, what's broken, what's next. - Tag support differs by target. Before using m-interaction, m-prompt, m-audio, m-link, the probes or m-attr-lerp, read mml_guide targets: Otherside's published list marks most of these as not supported yet, and in single Swamp tests (Sep 2026) clicks on shapes worked while m-interaction, m-prompt, the probes and chat failed (provisional: one tester, one test each). Tell me which facts are documented and which were observed (test and date). Don't say a tag works in the Swamp or the Nexus without a dated test. ## Live builds LIVE BUILD (the user watches and steers) 1. live_preview {slug}: shows a live 3D preview inside the chat (Claude and ChatGPT render it inline) and returns page_url for a full-page live view the user can open beside the chat (e.g. in the ChatGPT or Claude browser panel). 2. build_step {slug, title, append|edits}: one piece per call. Good steps: "ground and walls", "doorways", "torches and lighting", "treasure room", "door script". Each step saves a version (the user can undo it), updates the preview for the user within 2 seconds, and returns triangles, check results and user_guidance. 3. Read user_guidance after every step. It may point at an element (about_element.id / markup): change that element. If paused is true, don't change anything until the user resumes; call get_guidance to check. 4. Narrate briefly in chat what each step did and what comes next, so the user can redirect you. 5. Finish with check_mml, the wss:// link, and save_project with a handoff note. --- # MCP for AI agents The site runs a Model Context Protocol server (Streamable HTTP, stateless, JSON responses; protocol versions 2025-03-26 to 2025-06-18) at: https://mmlprostudio.com/functions/mcp **Authentication.** The site owner gets the link, with its key, on the AI Connect page (https://mmlprostudio.com/ai). Pass the key as `?key=…` in the URL or as `Authorization: Bearer …`. Without the right key the endpoint answers 404 (the key is the only credential, so keep it out of logs). The owner can rotate it or switch the connection off at any time. There is no OAuth; agents that need a per-user connection use a member's key when that ships (see roadmap). **Discovery.** `GET https://mmlprostudio.com/functions/mcp?card=1` returns the public server card (no key needed); `https://mmlprostudio.com/.well-known/ai-catalog.json` and `https://mmlprostudio.com/.well-known/mcp/server-card.json` carry the same. **How to work.** Call `start_here` first in every chat. Read before you write (`get_scene` before `update_scene`), check before you save (`check_mml`), prefer small edits, and save a handoff note with `save_project` before you stop. Every save keeps a version; `restore_version` undoes. Errors come back as tool results with `isError: true` and a message that says what to fix. Results are JSON; big texts are paged (`offset`, `max_chars`). ## Tools (34) | Tool | Writes | What it does | |---|---|---| | `start_here` | no | Call this first in every new chat. Returns the projects (with their latest handoff note), recent scenes, the live server status, and how to continue. No input needed. | | `mml_guide` | no | Reference for writing MML that works in Otherside's Swamp and Nexus. Topics: overview, elements (every tag and attribute), cavekit (server runtime: smooth motion, timers, players, saved state), targets (which tags each Otherside target supports: documented vs observed in tests, and m-interaction vs ODK priority), otherside (platform rules), avatars (characters, sockets, specs), building (dungeons, doors, triggers, patterns), performance, live (watch-and-guide builds with live_preview and build_step), export (optimizing models for fast loading and low graphics settings), workflow. | | `list_scenes` | no | List the user's scenes (slug, name, live, size, players online, links). Optional search text matches name, slug and description. | | `get_scene` | no | Read a scene's MML source by slug, with its links and a check summary. Long sources come in pages: pass offset (character index) to read the next page. | | `check_mml` | no | Check MML for problems in Otherside (unclosed tags, see-through labels, http or .gltf assets, stutter-causing scripts, wrong clock). Pass source, or a slug to check a saved scene. | | `live_status` | no | What's happening on the live server: which scenes run, players online, and for one scene (slug) its connections, recent events and script logs (CaveKit.log and console output). Use it to debug. | | `optimization_report` | no | How export-ready a scene's models are: size, triangles, whether each uses an optimized copy, and which formats the optimizer will use (chosen from the knowledge bank: Draco + JPEG/PNG + power-of-two textures ≤2048 for Otherside by default). The site's Export tab does the optimizing (it runs in the browser); apply_optimized_assets swaps in copies that already exist. | | `apply_optimized_assets` | yes | Swap every model in a scene for its optimized copy when one already exists (made in the Export tab or for another scene with the same recipe). Keeps the old source as a version, saves, and updates the live scene. | | `scene_insights` | no | What real players do, from the Cave server's telemetry (last 7 days): visits, unique/returning players, median stay, how visits end (dropped = crash/freeze/disconnect), latency, interactions, update traffic per player, script errors. With a slug: that scene's health score (0-100) and the fixes that would help most. Without: the overview, every active scene's score, and the automatic settings the site chose (export profile). Check this before optimizing or redesigning a scene. | | `test_suite` | no | The site's Otherside test suite (one live scene per file format, compression, interaction, movement, sync, lighting and stress case). Returns every module with its wss:// link, what to check, and results so far: saved verdicts per world (Swamp/Nexus), plus live in-world data (visits, load time from the blue button, button verdicts, quick disconnects that may be crashes, script errors). Use it to see what's proven and what still needs testing. | | `record_test_result` | yes | Save a result the user reports for a test-suite module (e.g. 'T04 is white in the Swamp on Low'). Saving a result never changes the knowledge bank or export switches: knowledge changes need a review first (update_knowledge is accepted but ignored). | | `list_versions` | no | Saved versions of a scene, newest first (id, note, size, date). Use with get_version or restore_version. | | `get_version` | no | Read the source of one saved version (from list_versions). | | `list_assets` | no | Files the user uploaded (GLB models, images, audio, video) with their public https URLs, for use in src attributes. | | `list_prefabs` | no | The user's saved reusable MML pieces (characters, props, rooms, effects) with their markup, ready to paste into a scene. | | `generate` | no | Generate ready-to-use MML (does not save). kinds: ${Object.entries(GENERATORS).map(([k, g]: [string, any]) => | | `list_projects` | no | All projects with their scenes and when they were last worked on. | | `open_project` | no | Resume a project: returns its goal, full notes (including handoff notes from earlier chats), its scenes with links and check summaries, and recent AI activity. Pass the project id or name. | | `knowledge` | no | What has been tested to work, break or partly work in the Swamp, the Nexus and ODK worlds, plus limits and best practices (status: works, broken, partial, untested, rule). Follow this over general MML knowledge. Filter by search text, tag (e.g. m-audio), status or world. | | `list_free_assets` | no | Free models, images and sounds anyone can use (https, cross-origin friendly), with triangle counts, size in metres and a ready MML tag for each. | | `get_guidance` | no | Read what the user said while watching the live build (messages, objects they pointed at) and whether they paused you. Call between build steps; build_step and update_scene also include it. | | `build_step` | yes | Add or change ONE piece of a scene while the user watches (e.g. 'floor and walls', then 'torches', then 'treasure room'). Use append for new MML or edits for exact find/replace. Saves a version first (so the user can undo the step), updates the live preview, and returns the triangle count and any guidance the user sent. If the user paused you, it refuses: wait for them. | | `record_finding` | yes | Paused: knowledge-bank changes now need a review, so this saves nothing and changes nothing. To keep what the user found, save it as a test result with record_test_result (module, world, verdict, notes) and tell the user the knowledge bank changes only after a review. | | `create_scene` | yes | Create a new scene from MML and (by default) start it on the live server. Returns the wss:// link for the Swamp or Nexus. Optionally adds it to a project. | | `update_scene` | yes | Change a saved scene. Use ONE of: edits (list of exact find/replace pairs, preferred for small changes), append (MML added at the end, e.g. from generate), or source (replace everything). The previous source is kept as a version first. Returns the check summary. | | `restore_version` | yes | Put a saved version back as the scene's current source (the current source is kept as a version first, so this can be undone too). | | `set_scene_live` | yes | Start (live: true) or stop (live: false) a scene on the live server. Stopping disconnects players from it; the scene stays saved. | | `set_scenes_live` | yes | Start, stop or restart many scenes in one call (the Scenes page's Stop all / Restart all). action: start \| stop \| restart. slugs: the scenes; or all: true for every one of the user's scenes. Restart = stop, wait until the server has dropped them (up to 45 s), start again: everyone in them is disconnected for a few seconds and the scenes load fresh from their files (saved state stays). | | `restart_scene` | yes | Restart one scene from its starting position: stop it, wait until the live server has dropped it (up to 45 s), start it again. Everyone in it is disconnected for a few seconds; saved state (scores, verdicts) stays. For a changed scene this is not needed: saving hot-reloads it with players connected. | | `delete_scene` | yes | Delete a scene for good: it is stopped first (players disconnected, the link stops answering), then the record is removed. Its saved versions are kept. Ask the user before calling this; pass confirm_slug equal to the slug to show you did. | | `search_docs` | no | Search the site's documentation for agents (MML reference, CaveKit, Otherside rules, limits, export, workflow, the MCP tools, FAQ) and the knowledge bank. Returns the matching passages with their doc URLs. Use it when you are unsure how something works here. | | `preview_mml` | yes | Run MML as a temporary scene on the live server without saving it (expires after 15 idle minutes). Returns a browser preview link and a temporary wss:// link. | | `save_project` | yes | Create or update a project. Use append_note for a dated handoff note (what changed, decisions, next steps) so a new chat can continue; notes replaces all notes. add_scenes/remove_scenes manage which scenes belong to it. Omit project to create a new one (name required). | | `save_prefab` | yes | Save a reusable MML piece (character, prop, room, effect) to the user's prefab library, so it can be placed again from the site's editor or by any AI chat. Saving with an existing name updates it. | Guide topics for `mml_guide`: overview, elements, cavekit, targets, otherside, avatars, building, performance, live, export, workflow. ## Server instructions (sent on initialize) You are connected to MML ProStudio (www.mmlprostudio.com), CaveMan's studio for building live MML (Metaverse Markup Language) scenes that run in Otherside's Swamp and Nexus. How to work: 1. In every new chat, call start_here first. It lists the projects, recent scenes and the live server, and tells you how to pick up where the last chat stopped. 2. Working on a project? Call open_project to read its notes and scenes. Before you stop, or when the user changes direction, call save_project with a short handoff note (what changed, what's next), so the next chat can continue. 3. Read before you write. Use get_scene before update_scene. Prefer small edits (update_scene with edits) over resending a whole scene. Every save keeps a version, so restore_version can undo. 4. Check before saving: run check_mml on new or changed MML and fix errors first. 5. Use generate for dungeons, mazes, rooms, stairs, arrays, characters and signs instead of writing hundreds of cubes by hand. Use list_prefabs, list_assets and list_free_assets for ready-made parts and models. 8. LIVE BUILDS: when the user wants to watch or guide a build (or any build bigger than a few objects), call live_preview first (it shows a live 3D view in the chat and gives page_url, a full-page live view for a side browser). Then build piece by piece with build_step: one meaningful piece per call (floor, walls, lighting, props, scripts), each with a short title. Every result includes user_guidance (what the user said or pointed at) and paused; follow the guidance before the next step, and if paused, stop and wait. Keep an eye on the triangle count in each result. 9. The knowledge tool holds what has been tested to work (or break) in the Swamp/Nexus. Follow it over general MML knowledge. When the user reports a test result from Otherside, save it with record_test_result; the knowledge bank changes only after a review. 11. PLAYER DATA: scene_insights shows what real players do (visits, drops/crashes, stay time, latency, interactions, update traffic) and each scene's health score with fixes. Use it before optimizing or redesigning, and after changes to see if they helped. The site also picks the default export profile from this data automatically, plus per-scene budgets (Otherside profile: textures up to 2048 px, up to 8 lights, up to 3000 elements; Low-end profile: 1024 px, 4 lights, 1500 elements). Build new scenes within the current budget. Players' graphics settings (Low/Medium/High/Epic) come from the report buttons in test scenes. 10. EXPORTS: before sharing a finished scene's wss:// link, call optimization_report. Models should use optimized copies (Draco geometry, power-of-two textures ≤2048, JPEG colour/PNG normal maps) so they load fast and still appear on the lowest graphics settings. Use apply_optimized_assets when copies exist; otherwise tell the user to click 'Optimize all models' in the editor's Export tab. Only formats marked works in the knowledge bank are used for Otherside. 6. Use preview_mml to try something without saving. It returns a browser link and a temporary wss:// link. 7. Give the user the wss:// link after creating a scene. That link is what they paste into the Swamp or Nexus. Rules for MML in the Swamp and Nexus (tag support is narrower than the MML spec and differs by target: read mml_guide targets before using m-interaction, m-prompt, m-audio, m-link, the probes or m-attr-lerp, and say what is documented vs observed): - Scripts run on the server. Use the shared document clock (document.timeline.currentTime or CaveKit.now()), never Date.now(), for anything players see. - Move things with m-attr-anim or CaveKit.moveTo/spin, not setInterval loops under 200 ms (they stutter). - m-attr-anim loops forever unless loop="false". - Label backgrounds must be solid colours (see-through label backgrounds render invisible). - Models must be https .glb files with textures packed inside (.gltf shows white). - Keep scenes lean: merge walls into long cubes, reuse models, keep total elements in the low thousands. - Keep a whole project under 1,000,000 triangles (all models, avatars and shapes combined). Tool results report the scene's triangle count; single assets should stay under 150,000. Call mml_guide for the full element reference, CaveKit, avatars, building patterns and performance. ## Connecting - **Claude (claude.ai, desktop, Code):** add a custom connector / MCP server with the URL from AI Connect (the key is in the URL). - **ChatGPT:** developer mode → add the MCP server URL; approve writes when asked. - **Cursor, Windsurf, Gemini CLI and others:** `{"mcpServers": {"mml-prostudio": {"url": "https://mmlprostudio.com/functions/mcp?key=…"}}}`. - **Plain HTTP:** POST JSON-RPC 2.0 (`initialize`, `tools/list`, `tools/call`) with `Content-Type: application/json`; batches of up to 20. --- # Public HTTP endpoints Besides the MCP server, these answer without a key: | Endpoint | What it returns | |---|---| | `GET https://mmlprostudio.com/functions/serveMML?slug=` | A static copy of a scene's MML (each player would run their own copy; the live `wss://` link is the shared one). | | `GET https:///` | Server status: scene and player totals (no names). | | `GET https:///status?slugs=a,b` | Players per scene, for the links asked about. | | `GET https:///telemetry.json` | Server health history and totals. | | `POST https:///sync` | Ask the server to pull the latest scene list now (rate-limited; otherwise it polls every ~15 s). | | `GET https://mmlprostudio.com/functions/mcp?card=1` | The MCP server card. | The live server's host is in every wss:// link (for example `wss:///`). --- # Common problems - **My label is invisible.** Its background colour is see-through. Use a solid colour such as #111827. - **My model shows up white.** It is a .gltf with separate textures, or the host blocks loading. Export a .glb with textures packed inside and host it on https. - **Players slide off my moving platform.** Otherside does not carry avatars on moving MML objects yet. Keep platforms still while people stand on them. - **Things stutter or jump.** A script changes positions too often. Use m-attr-anim or CaveKit.moveTo for smooth moves everyone sees the same way. - **How do I stop, start or restart a scene?** Scenes page → the server panel: Stop / Start / Restart beside each scene; tick several and use the bar, or Stop all / Restart all. From an agent: `set_scene_live` / `restart_scene` / `set_scenes_live`. - **How do I undo a change?** Editor → Versions → restore any earlier save (AI edits are versions too), or `restore_version`. - **How do I make a door?** Give a cube an id, listen for click in a script, CaveKit.moveTo it; CaveKit.save the state so it survives restarts.