Onceworlds
CLI & MCP

CLI & MCP

One package, @onceworlds/cli: commands for a terminal, and the same as MCP tools for your AI tool.

Set it up

1. Log in

npx @onceworlds/cli login

2. Add it to Claude Code

claude mcp add --scope user onceworlds -- npx -y @onceworlds/cli mcp

3. Ask it to make a game. Each draft shows up in your Library.

1. Log in

npx @onceworlds/cli login

2. Add it to Codex

codex mcp add onceworlds -- npx -y @onceworlds/cli mcp

3. Ask it to make a game. Each draft shows up in your Library.

1. Log in

npx @onceworlds/cli login

2. Add this to your tool's MCP settings (Cursor, Windsurf, Gemini CLI, Claude Desktop and more)

{
  "mcpServers": {
    "onceworlds": {
      "command": "npx",
      "args": [
        "-y",
        "@onceworlds/cli",
        "mcp"
      ]
    }
  }
}

VS Code calls the key servers. A tool without MCP can run npx @onceworlds/cli deploy and npx @onceworlds/cli playtest in a terminal instead.

3. Ask it to make a game. Each draft shows up in your Library.

How the MCP works

MCP is how an AI tool learns new abilities. Everything runs on your computer: Onceworlds never calls a model, so it uses your own AI account. It works with Claude Code and Codex, and with other tools that run MCP servers, such as Cursor, Windsurf, Gemini CLI, Claude Desktop and VS Code. A tool without MCP can run the same commands in a terminal.

  1. Ask for a game

    It reads the guide, starts a folder and builds the game in it.

  2. Play each draft

    After every change it pushes a draft. It shows up in your Library, playable with the menu and multiplayer.

  3. Send back what's wrong

    Errors you hit go back to your AI, or copy a note about what should change from the draft's page.

  4. Publish

    You click Publish and choose who can play.

The connection can only push drafts of your own games, never publish, and you can disconnect it on Upload. Your project folder is the source: keep your own backup (or put it on GitHub). Every draft also opens in Build.

MCP tools

read_guideReads the platform guide, the SDK helpers’ reference, or the engine’s guide and API reference, by topic or heading.
new_gameStarts a folder: a game on canvas, three.js, PixiJS or Phaser with the platform wired in, or an engine project, a kit or a template.
checkBefore a deploy: the mistakes games ship with, each with its fix (and an engine game’s tests and simulated matches).
screenshotA picture of the game to look at, or its first minute on one sheet.
serveAn address to play the game in your own browser, offline.
deploy_previewPushes a draft for you to play.
playtestPlays the draft as several guests in a browser on your computer and reports what broke.
game_statusThe errors your plays of the newest draft hit.
list_gamesYour games.
list_kitsEngine games: the kits, complete engine games to read for their plumbing.
api_lookupEngine games: the engine’s API in a few lines, a signature, what it does, an example.
recipeEngine games: short, tested code for a kind of game or a feature.
search_assetsEngine games: models, sprites, materials and sounds from the engine’s library.

Commands

Run them with npx @onceworlds/cli <command>.

loginConnects this computer to your account (you approve a code in the browser).
mcpRuns as an MCP server for your AI tool.
new [dir]Starts a game: --stack canvas, three, pixi or phaser (canvas by default) with the platform wired in; --engine for an engine project, --kit or --template to start from one (--list shows them).
init [dir]Sets a folder up for Onceworlds: onceworlds.json, the GitHub workflow, AGENTS.md.
serve [dir]Plays the game in your own browser on this computer, offline.
shot [dir]A picture of the game to look at; --story: its first minute on one sheet.
check [dir]Before a deploy: the mistakes games ship with (and an engine game’s tests and simulated matches).
doctor [dir]Looks for what games often ship with (--fix writes How to play).
deploy [dir]Uploads the game: from GitHub Actions it goes live; from your computer it’s a draft.
playtest [dir]Plays your latest draft in a headless browser as several guests.
dev [dir]Deploys to a local platform, then again on every change.
posters [dir]Engine games: draws the store art.
api <name>Engine games: looks the engine’s API up.
recipe [name]Engine games: short, tested code for common games and features.
guide [topic]Engine games: reads a topic of the engine guide.