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.
Ask for a game
It reads the guide, starts a folder and builds the game in it.
Play each draft
After every change it pushes a draft. It shows up in your Library, playable with the menu and multiplayer.
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.
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_guide | Reads the platform guide, the SDK helpers’ reference, or the engine’s guide and API reference, by topic or heading. |
new_game | Starts 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. |
check | Before a deploy: the mistakes games ship with, each with its fix (and an engine game’s tests and simulated matches). |
screenshot | A picture of the game to look at, or its first minute on one sheet. |
serve | An address to play the game in your own browser, offline. |
deploy_preview | Pushes a draft for you to play. |
playtest | Plays the draft as several guests in a browser on your computer and reports what broke. |
game_status | The errors your plays of the newest draft hit. |
list_games | Your games. |
list_kits | Engine games: the kits, complete engine games to read for their plumbing. |
api_lookup | Engine games: the engine’s API in a few lines, a signature, what it does, an example. |
recipe | Engine games: short, tested code for a kind of game or a feature. |
search_assets | Engine games: models, sprites, materials and sounds from the engine’s library. |
Commands
Run them with npx @onceworlds/cli <command>.
login | Connects this computer to your account (you approve a code in the browser). |
mcp | Runs 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. |