Deploy with an AI agent

Connect Claude, Codex or any MCP-capable coding agent to OnePrompt and let it package, deploy and describe your game.

In short

  • OnePrompt has an MCP endpoint at https://api.oneprompt.games/mcp. Any coding agent that supports remote MCP servers (Streamable HTTP) can use it.
  • The agent authenticates with an agent token you create in the dashboard. The token's scopes decide what it may do.
  • The agent can create projects, validate and deploy packages, promote and roll back, read logs and analytics, and fill in and submit your game page.
  • Agents can never spend or move money: no top-ups, no featuring purchases, no payouts, and they cannot accept legal terms for you.

Why use an agent

If your game was built with an AI coding agent, the same agent can ship it. Every OnePrompt tool returns structured JSON with stable error codes, a JSON path to the problem and a hint, so the agent can fix issues on its own and try again. You stay in control of anything involving money or legal acceptance, which always needs you in the browser.

Step 1: Create a token for the agent

  1. Go to Dashboard → Agent tokens.
  2. Name the token after the agent, for example "claude-code".
  3. Choose scopes. The defaults (projects:read, projects:write, deployments:write, deployments:promote) cover deploying and editing the game page. Tick analytics:read if the agent should read usage and analytics.
  4. Click Create token and copy it. It is shown only once.

If you want the agent to deploy but not to make anything live, leave out deployments:promote. It can then upload and validate, and you promote in the dashboard.

Step 2: Connect your agent

The endpoint is https://api.oneprompt.games/mcp. Every request must carry the header Authorization: Bearer <your token>.

With Claude Code, for example:

claude mcp add --transport http oneprompt https://api.oneprompt.games/mcp --header "Authorization: Bearer $ONEPROMPT_TOKEN"

For Codex and other agents, add a remote MCP server of the Streamable HTTP type with the same URL and header in that agent's MCP settings. Keep the token in an environment variable or your agent's secret store rather than pasting it into prompts or files you commit.

Step 3: Ask for what you want

A good first request: "Call oneprompt_capabilities, then package the game in ./build for OnePrompt and deploy it to a new project called Star Hopper, promoted. Report the URLs."

The agent will typically:

  1. Call oneprompt_capabilities to learn the package format, limits and your quotas.
  2. Create a project with oneprompt_project_create (or use an existing one).
  3. Write oneprompt.yaml and package the build. Agents that can run commands use the oneprompt CLI for this; the MCP resource oneprompt://spec/package/v1 gives the manifest schema.
  4. Deploy with oneprompt_deploy, or with the step-by-step tools for larger packages.
  5. Fill in the game page with oneprompt_listing_update and oneprompt_listing_media_upload, then submit it with oneprompt_listing_submit.

The tools

Each tool needs a scope on the token. Reads need projects:read; changes need the scope listed.

  • oneprompt_capabilities: runtimes (web only), package schema and limits, your quotas and enabled features. Call it first.
  • oneprompt_project_create (projects:write): creates a project. The link is generated from the name; pass slug only to request a specific one.
  • oneprompt_project_get: state, play URL, PlayServ status and storage quota.
  • oneprompt_package_validate (deployments:write): server-side validation of a package without making it live.
  • oneprompt_upload_begin (deployments:write): reserves quota and returns an upload URL (or multipart part URLs) for an .opkg of an exact size and SHA-256.
  • oneprompt_upload_commit (deployments:write): confirms the upload.
  • oneprompt_deployment_create (deployments:write): starts validation of a committed upload.
  • oneprompt_deployment_get: status, diagnostics and links. Poll no faster than every 2 seconds.
  • oneprompt_deployment_promote (deployments:promote): makes a ready deployment live. Promoting an older ready deployment is a rollback.
  • oneprompt_deploy (deployments:write, plus deployments:promote to promote): upload, validate and, only if promote is explicitly true, promote, in one call.
  • oneprompt_logs_get: the validation timeline of a deployment.
  • oneprompt_usage_get (analytics:read): quota, delivered traffic and a 30-day analytics summary.
  • oneprompt_listing_get: the game page draft, the live version, the review state and the publish checklist with a hint for every missing item.
  • oneprompt_listing_update (projects:write): edits any subset of the game page fields.
  • oneprompt_listing_media_upload (projects:write): uploads an icon, cover, screenshot or logo as base64 (at most 5 MB decoded) and returns its id, or MEDIA_INVALID with exact codes such as COVER_ASPECT.
  • oneprompt_listing_submit (projects:write): submits the page for review, or returns LISTING_INCOMPLETE with the full checklist.

The server also offers three ready-made prompts: package_existing_web_game, deploy_and_verify and diagnose_failed_deployment, and resources with the packaging guides (oneprompt://docs/packaging/web, oneprompt://docs/packaging/unity-web, oneprompt://docs/packaging/godot-web) and your project status (oneprompt://project/{id}/status, oneprompt://project/{id}/deployments).

Small and large packages

oneprompt_deploy and oneprompt_package_validate accept the package inline as base64, up to about 8 MiB. That covers most HTML5 games.

For anything larger (most Unity and Godot builds), the agent should either run the CLI (oneprompt deploy game.opkg --project <id> --promote --json), or use the step-by-step tools: oneprompt_upload_begin, then upload the bytes to the returned URL, then oneprompt_upload_commit, oneprompt_deployment_create, poll oneprompt_deployment_get until the status is ready or failed, and finally oneprompt_deployment_promote.

What a deploy returns

oneprompt_deploy never hides a stage. Its result includes the upload id, the deployment id and the promotion, plus these links:

  • play_url: the game's own address. It serves the public only once the game page is published as an open, free game.
  • preview_url: a 15-minute team preview link that opens the release right away, even while the game is a draft.
  • listing_url: the game page editor in your dashboard.
  • control_room_url and deployment_url.

If you want the agent to verify the release, tell it to open preview_url, not play_url.

Things only you can do

Some steps are deliberately kept in the browser, with you signed in:

  • Accepting terms. The first time your team publishes, enables premium pricing, creates tokens, books featuring, subscribes or sets up payouts, an owner or admin must accept the relevant documents in the "Before you continue" dialog. Until then the API answers LEGAL_ACCEPTANCE_REQUIRED (HTTP 428), and an agent cannot get past it. See Accepting terms.
  • Spending money. Topping up your creator balance and booking featuring need a signed-in browser session of an owner or billing member.
  • Payouts. Setting up Stripe payouts happens in the dashboard.

Some things have REST routes but no MCP tools yet: price changes (GET and POST /v1/projects/{id}/pricing) and invites and access (/v1/projects/{id}/access, /invites). An agent with the project scopes can call those routes with the same token, or you use the dashboard.

Good habits

  • Give each agent its own token, so you can revoke one without breaking the others.
  • Ask the agent to report the deployment id and diagnostics, not just "done".
  • Review what the agent writes on your game page before you submit it. Whatever an agent does with your token counts as if you did it, as the Developer API & AI Agent Terms explain.
  • If a token leaks, revoke it in Dashboard → Agent tokens at once.