{
  "$schema": "https://modelcontextprotocol.io/schemas/server-card.json",
  "name": "io.mmlprostudio/mml-prostudio",
  "title": "MML ProStudio",
  "description": "Build, check, preview, start and stop live MML scenes for Otherside's Swamp and Nexus; projects with handoff notes; assets, prefabs, knowledge bank, live preview widget.",
  "version": "1.1.0",
  "website_url": "https://mmlprostudio.com",
  "documentation_url": "https://mmlprostudio.com/docs/mcp.md",
  "remotes": [
    {
      "type": "streamable-http",
      "url": "https://mmlprostudio.com/functions/mcp",
      "authentication": {
        "type": "api_key",
        "in": "query",
        "name": "key",
        "alternative": "Authorization: Bearer <key>",
        "how_to_get": "https://mmlprostudio.com/ai (site owner)"
      }
    }
  ],
  "capabilities": {
    "tools": true,
    "resources": true,
    "prompts": false,
    "ui": true
  },
  "protocol_versions": [
    "2025-03-26",
    "2025-06-18"
  ],
  "tools": [
    {
      "name": "start_here",
      "title": "Start here (new chat)",
      "read_only": true,
      "description": "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."
    },
    {
      "name": "mml_guide",
      "title": "MML guide",
      "read_only": true,
      "description": "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."
    },
    {
      "name": "list_scenes",
      "title": "List scenes",
      "read_only": true,
      "description": "List the user's scenes (slug, name, live, size, players online, links). Optional search text matches name, slug and description."
    },
    {
      "name": "get_scene",
      "title": "Read a scene",
      "read_only": true,
      "description": "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."
    },
    {
      "name": "check_mml",
      "title": "Check MML",
      "read_only": true,
      "description": "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."
    },
    {
      "name": "live_status",
      "title": "Live status",
      "read_only": true,
      "description": "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."
    },
    {
      "name": "optimization_report",
      "title": "Export optimization report",
      "read_only": true,
      "description": "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."
    },
    {
      "name": "apply_optimized_assets",
      "title": "Use optimized models",
      "read_only": false,
      "description": "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."
    },
    {
      "name": "scene_insights",
      "title": "Player data & scene health",
      "read_only": true,
      "description": "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."
    },
    {
      "name": "test_suite",
      "title": "Otherside test suite results",
      "read_only": true,
      "description": "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."
    },
    {
      "name": "record_test_result",
      "title": "Record a test result",
      "read_only": false,
      "description": "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)."
    },
    {
      "name": "list_versions",
      "title": "List versions",
      "read_only": true,
      "description": "Saved versions of a scene, newest first (id, note, size, date). Use with get_version or restore_version."
    },
    {
      "name": "get_version",
      "title": "Read a version",
      "read_only": true,
      "description": "Read the source of one saved version (from list_versions)."
    },
    {
      "name": "list_assets",
      "title": "List assets",
      "read_only": true,
      "description": "Files the user uploaded (GLB models, images, audio, video) with their public https URLs, for use in src attributes."
    },
    {
      "name": "list_prefabs",
      "title": "List prefabs",
      "read_only": true,
      "description": "The user's saved reusable MML pieces (characters, props, rooms, effects) with their markup, ready to paste into a scene."
    },
    {
      "name": "generate",
      "title": "Generate MML",
      "read_only": true,
      "description": "Generate ready-to-use MML (does not save). kinds: ${Object.entries(GENERATORS).map(([k, g]: [string, any]) =>"
    },
    {
      "name": "list_projects",
      "title": "List projects",
      "read_only": true,
      "description": "All projects with their scenes and when they were last worked on."
    },
    {
      "name": "open_project",
      "title": "Open project (resume)",
      "read_only": true,
      "description": "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."
    },
    {
      "name": "knowledge",
      "title": "Knowledge bank (what works in Otherside)",
      "read_only": true,
      "description": "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."
    },
    {
      "name": "list_free_assets",
      "title": "List free assets",
      "read_only": true,
      "description": "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."
    },
    {
      "name": "get_guidance",
      "title": "Get the user's guidance",
      "read_only": true,
      "description": "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."
    },
    {
      "name": "build_step",
      "title": "Build step (live)",
      "read_only": false,
      "description": "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."
    },
    {
      "name": "record_finding",
      "title": "Record a finding (knowledge bank)",
      "read_only": false,
      "description": "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."
    },
    {
      "name": "create_scene",
      "title": "Create scene",
      "read_only": false,
      "description": "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."
    },
    {
      "name": "update_scene",
      "title": "Update scene",
      "read_only": false,
      "description": "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."
    },
    {
      "name": "restore_version",
      "title": "Restore version",
      "read_only": false,
      "description": "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)."
    },
    {
      "name": "set_scene_live",
      "title": "Start or stop a scene",
      "read_only": false,
      "description": "Start (live: true) or stop (live: false) a scene on the live server. Stopping disconnects players from it; the scene stays saved."
    },
    {
      "name": "set_scenes_live",
      "title": "Start, stop or restart several scenes",
      "read_only": false,
      "description": "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)."
    },
    {
      "name": "restart_scene",
      "title": "Restart a scene",
      "read_only": false,
      "description": "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."
    },
    {
      "name": "delete_scene",
      "title": "Delete a scene",
      "read_only": false,
      "description": "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."
    },
    {
      "name": "search_docs",
      "title": "Search the docs",
      "read_only": true,
      "description": "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."
    },
    {
      "name": "preview_mml",
      "title": "Preview MML (temporary)",
      "read_only": false,
      "description": "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."
    },
    {
      "name": "save_project",
      "title": "Save project / handoff note",
      "read_only": false,
      "description": "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)."
    },
    {
      "name": "save_prefab",
      "title": "Save prefab",
      "read_only": false,
      "description": "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."
    }
  ],
  "instructions_url": "https://mmlprostudio.com/docs/workflow.md",
  "llms_txt": "https://mmlprostudio.com/llms.txt",
  "skills": "https://mmlprostudio.com/.well-known/agent-skills/index.json"
}
