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 on Create.
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 on Create.
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 on Create.
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 on Create, 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 Create. Your project folder is the source: keep your own backup (or put it on GitHub). A scene project (project.json) also opens in Build.
MCP tools
read_guide | Reads the platform guide, the engine guide or the API reference, by topic or heading. |
new_game | Starts a folder from a kit or a template. |
list_kits | The kits a game starts from: a complete engine game for each kind. |
api_lookup | The engine’s API in a few lines: a signature, what it does, an example. |
recipe | Short, tested code for a kind of game or a feature. |
search_assets | Models, sprites, materials and sounds from the engine’s library. |
check | Looks through the files for common mistakes, and runs an engine game’s tests and simulated matches. |
screenshot | A picture of the game a few seconds into a match, or a poster. |
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. |
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] --kit <kit> | Starts a game from a kit (--list shows them), or --template <name> from a Build template. |
dev [dir] | Deploys to a local platform, then again on every change. |
check [dir] | Before a deploy: common mistakes, and an engine game’s tests and simulated matches. |
shot [dir] | A picture of the game to look at. |
posters [dir] | Draws an engine game’s store art. |
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. |
init [dir] | Sets a folder up for Onceworlds: onceworlds.json, the GitHub workflow, AGENTS.md. |
api <name> | Looks the engine’s API up. |
recipe [name] | Short, tested code for common games and features. |
guide [topic] | Reads a topic of the engine guide. |