Build with an AI agent
ComingGive Claude Code, Cursor or any MCP client the 0x tools - the 0x docs offline, config checks, the dev server, publishing, the store, review issues and your games' play counts - with your own publish token.
The 0x CLI is also an MCP server. Start it with 0x mcp, and an AI coding agent (Claude
Code, Cursor or any MCP client) can build, ship and maintain
your game on 0x. It uses your own publish token, the one 0x login saves, so the agent can
do what you could do with the CLI and nothing more.
Coming
0x mcp ships with @0xlimo/cli 0.1.8. The stats scope needs the 0x release that comes with it.
#Set it up
Sign in once. Add
statsto the scopes if you want the agent to read your games' play counts:npx 0x login --scopes hosting,listings,scripts,statsWithout
--scopesyou get the usual token (hosting, listings, scripts).Add the server to your agent, from your game's folder:
claude mcp add 0x -- npx 0x mcpOther clients: run the command
npx 0x mcpover stdio, in your project folder.In CI, or with a different token, set
ZEROX_TOKEN(orZEROX_PUBLISH_TOKEN) andZEROX_API.
New games from 0x init include an AGENTS.md (and a CLAUDE.md pointing to it). It tells an
agent the game's commands, 0x.config.json and how to add these tools. 0x publish never uploads
those two files.
#Tools
| tool | what it does | changes something public |
|---|---|---|
docs_search, docs_read | the 0x docs, offline, matching the CLI's version | no |
project_init | a starter game (three.js, Phaser, Babylon.js, canvas) | no (local files) |
config_check | 0x.config.json as the service checks it: id, dist, csp origins and permissions, the listing and its art | no |
dev_start, dev_stop | 0x dev: the local site with the swarm and the multiplayer dev service; returns the URL | no |
publish | a new immutable version on 0x hosting, with its play URL; dry_run lists the files first | yes (confirm: true) |
versions_list | your sites and their versions | no |
csp_reports | what your sites' Content-Security-Policy blocked | no |
listing_submit | send the store listing for review; dry_run shows it first | yes (confirm: true) |
listing_status | where your submissions stand | no |
review_issues | the reviewers' issues, or one thread | no |
review_reply | answer an issue | yes (confirm: true) |
script_validate | pack a 0x script package without uploading | no |
script_publish | sign and upload it for review | yes (confirm: true) |
stats_own | your games, or one game's play counts (plays and time per day, mode, source, link ref, country) | no (needs the stats scope) |
The four tools that change something public refuse to run until the agent passes
confirm: true. Good clients show you the call first. Read-only tools are marked readOnlyHint
and the others destructiveHint, so a client can ask you before running them.
#What the agent can't do
- Anything outside your project folder:
dirarguments are relative to where0x mcpruns. - Anything of another developer: their sites, listings, issues and stats answer 404 or 403.
- Sign in as you, change your account, mint more tokens, move money or reach 0x's admin tools. A publish token can't do any of that.
- Read players:
stats_ownis anonymous counts, never per player.
#Publish token scopes
A publish token reaches only the route families in its scopes:
| scope | reaches |
|---|---|
hosting | /v1/hosting (sites, versions, CSP reports; not minting tokens) |
listings | /v1/listings (submissions, review issues and replies, art uploads) |
scripts | /v1/scriptbus/packages (0x script packages) |
stats | /v1/dev/games, /v1/dev/stats (your own games' play counts), opt-in |
A token minted without scopes, including every token made before scopes existed, keeps exactly
hosting, listings and scripts. A call outside a token's scopes answers 403 with
needs_scope. See Accounts for tokens and the REST reference.
