0xDocs 0x.limo

Docs / Getting started

Build with an AI agent

Coming

Give 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

  1. Sign in once. Add stats to the scopes if you want the agent to read your games' play counts:

    sh
    npx 0x login --scopes hosting,listings,scripts,stats

    Without --scopes you get the usual token (hosting, listings, scripts).

  2. Add the server to your agent, from your game's folder:

    sh
    claude mcp add 0x -- npx 0x mcp

    Other clients: run the command npx 0x mcp over stdio, in your project folder.

    In CI, or with a different token, set ZEROX_TOKEN (or ZEROX_PUBLISH_TOKEN) and ZEROX_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

toolwhat it doeschanges something public
docs_search, docs_readthe 0x docs, offline, matching the CLI's versionno
project_inita starter game (three.js, Phaser, Babylon.js, canvas)no (local files)
config_check0x.config.json as the service checks it: id, dist, csp origins and permissions, the listing and its artno
dev_start, dev_stop0x dev: the local site with the swarm and the multiplayer dev service; returns the URLno
publisha new immutable version on 0x hosting, with its play URL; dry_run lists the files firstyes (confirm: true)
versions_listyour sites and their versionsno
csp_reportswhat your sites' Content-Security-Policy blockedno
listing_submitsend the store listing for review; dry_run shows it firstyes (confirm: true)
listing_statuswhere your submissions standno
review_issuesthe reviewers' issues, or one threadno
review_replyanswer an issueyes (confirm: true)
script_validatepack a 0x script package without uploadingno
script_publishsign and upload it for reviewyes (confirm: true)
stats_ownyour 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: dir arguments are relative to where 0x mcp runs.
  • 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_own is anonymous counts, never per player.

#Publish token scopes

A publish token reaches only the route families in its scopes:

scopereaches
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.