GameFoundry

GameFoundry MCP

Publish AI-built games straight from your agent

Your MCP endpoint

Add it as a custom connector in Claude, ChatGPT, Claude Code, Cursor, VS Code or Codex. Step-by-step setup for each is just below.

https://www.gamefoundry.net/api/mcp

Publishing-only connector

Just want to host and publish games? This endpoint has the upload, update, publish, leaderboard, game code and credits tools, without the asset generators. Same account, same sign-in, same credits.

https://www.gamefoundry.net/api/mcp/publish

Connect once. Then ask your agent to build your game with our AI tools, upload it as a private draft, preview it in the browser, and submit it to the public gallery when you're happy - all without leaving your agent.

Setup - 3 minutesConnect your agent: one-click for Claude and ChatGPT, a token for command line clients.
  1. Set a public handle at /dashboard/account. This is what appears on your creations. Skipping this step leaves uploads failing with a friendly error until you set one.
  2. Connect your MCP client: open yours below and follow its steps.
  3. In your agent, say: “Upload this game to GameFoundry as a draft.” Then preview the URL. When you're happy, say “Submit it.”

Easiest: OAuth (Claude Desktop, ChatGPT, claude.ai)

The one-click setup. No tokens to copy, no config file to edit. A browser tab opens, you approve, done.

Claude Desktop / claude.ai
  1. Open Settings → Connectors → Add custom connector.
  2. Paste the endpoint: https://www.gamefoundry.net/api/mcp
  3. Click Connect. A browser tab opens.
  4. Sign in to GameFoundry if needed, then click Allow on the consent page. You are connected.

Disconnect any time from /dashboard/connected-clients.

ChatGPT
  1. In ChatGPT, add a Custom Connector from the Connectors settings.
  2. Paste the endpoint: https://www.gamefoundry.net/api/mcp
  3. Approve the OAuth consent when the browser opens.

Command line clients: personal access token

Claude Code, Cursor, VS Code and other CLI / config-driven clients use a bearer token. Mint one at /dashboard/api-tokens (shown once, copy it), then paste it into one of the snippets below where marked gf_mcp_REPLACE_ME.

Claude Code

Run once from your terminal:

claude mcp add --transport http gamefoundry https://www.gamefoundry.net/api/mcp \
  --header "Authorization: Bearer gf_mcp_REPLACE_ME"

Then verify with /mcp inside Claude Code.

Cursor

Add this to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "gamefoundry": {
      "type": "http",
      "url": "https://www.gamefoundry.net/api/mcp",
      "headers": {
        "Authorization": "Bearer gf_mcp_REPLACE_ME"
      }
    }
  }
}
VS Code (with MCP)

Add this to .vscode/mcp.json in your project:

{
  "servers": {
    "gamefoundry": {
      "type": "http",
      "url": "https://www.gamefoundry.net/api/mcp",
      "headers": {
        "Authorization": "Bearer gf_mcp_REPLACE_ME"
      }
    }
  }
}

Don't commit the token. Keep it in a private settings file or an environment variable.

Things worth askingExample requests to try once you're connected.

“Upload the HTML in game.html to GameFoundry as a draft. Title it ‘Cyber Runner’.”

“I fixed the jump physics - update the draft with the new HTML.”

“Make the player jump higher in ‘Cyber Runner’ and patch the game on GameFoundry.”

“Submit ‘Cyber Runner’ to the public gallery.”

“List my GameFoundry creations and show me their statuses.”

How the flow worksDraft, preview, review, publish: what happens at each step.

The GameFoundry MCP flow

Your agent

Claude Code, Cursor, VS Code, Codex, Claude Desktop.

Upload

Agent calls upload_game. Stored as a private draft.

Preview & iterate

Play the private URL. Ask the agent to fix things — no re-publish.

Publish

submit_game → human review → live on the Creations gallery.

  1. 1. Upload

    Your agent calls upload_game. GameFoundry stores the HTML and returns a preview URL. The URL only renders for you (signed in as the owner) - nobody else can see the game yet, and it's not on the public gallery.

  2. 2. Preview & iterate

    Open the preview URL in a browser. Play the game. Ask your agent to fix things - it calls update_game with the new HTML, or patch_game with just the changes (much faster for big games). No moderation while it's a draft. Repeat until it works.

  3. 3. Submit for review

    When you're happy, ask your agent to submit. It calls submit_game, the game goes into human review, and a GameFoundry moderator approves it. Once approved it appears on /creations for everyone.

  4. 4. Later

    Push updates any time - update_game or patch_game on a live game saves a private staged update, and the live version stays up until a moderator approves it. Take it off the gallery with unpublish_game to keep iterating. Remove it entirely with delete_game.

What your agent can doEvery generation and publishing tool, with prices.

Two groups: generation tools that turn prompts into assets, and publishing tools that push a game to your public /creations gallery. Everything is scoped to the user who minted the token - an agent never sees another user's creations or spends anyone else's credits.

Generation tools

Credit-costed. Every call debits your monthly balance (or your pack balance if monthly is exhausted). Provider failures refund automatically. Call get_credits_balance first if you're not sure the user has room.

  • generate_browser_game - prompt → complete self-contained HTML5 game. Built by Claude Opus (default Claude Opus 5.5). tier: "quick" (500 cr, single pass) or tier: "full" (1,450 cr, three-pass design → skeleton → implement, Indie+ only, default). Other Opus versions cost more; see list_pricing. If your agent can write the game itself, upload_game is free. Returns the HTML and a preminted upload_id that chains straight into finish_game_upload for one-shot publish - no re-transmission.
  • generate_sprite - prompt → sprite image (WebP). 50 credits per image × count (1-4). Sizes: square 1024², wide 1024×768, tall 768×1024. Isolated on a plain backdrop so it drops straight into a game. Persisted to R2, URL stays valid.
  • generate_sfx - prompt → sound effect (WAV). 10 credits per take × count (1-4). Duration 1-10 seconds. Best for in-game SFX: jumps, explosions, UI clicks. Returns a job per take; poll get_generation_job for the URL.
  • sprite_create, sprite_animate, sprite_edit + sprite_job_status - Sprite Studio pixel art. Create sprites at 16-128 px (square, tall or wide; 20 cr per image fast, 60 cr best, × count 1-4) or a new pose of your own character (50 cr). Animate into spritesheets: 4-direction walk / walk + idle (48 px), tiny adventurer set (32 px), effect loops (24-96 px) for 150 cr, or a 2-6 frame keyframe pose sequence (attack, hurt, death, jump, cast, custom) at 48-128 px for 50 cr per frame. Edit a sprite from an instruction for 50 cr. Async: each call returns a job_id; sprite_job_status (free) returns the persisted PNGs and spritesheet frame grid. Image inputs must be your own Sprite Studio / AI Sprite outputs or uploads. Failed jobs refund automatically.

Publishing tools

Free to call. Move a game through draft → preview → moderation → public.

  • upload_game - inline HTML (or gzip + base64) → new DRAFT with an owner-only preview URL. Best for games under about 60 KB.
  • start_game_upload + upload_game_chunk + finish_game_upload - for larger games. The agent sends the file in ~40 KB pieces over the MCP connection, so it works even in sandboxes with no outbound internet. Agents that can make HTTP requests can PUT the file to the returned URL instead.
  • patch_game - change a game you already uploaded by sending only find-and-replace edits. Seconds instead of minutes for a big game; nothing is saved unless every edit applies.
  • update_game - replace HTML, title, or description on a draft (applied straight away) or on a published game (saved as a staged update that goes to review while the live version stays up). New HTML can come inline or from an upload_id. You can also upload a new .html build yourself from Your creations.
  • submit_game - run moderation, publish to the public gallery.
  • unpublish_game - take a live game off the gallery, revert to draft state.
  • list_my_games - paginated list of the caller's own creations (drafts + published).
  • get_game_stats - title, status, like count, and share URL for one creation.
  • delete_game - soft deletes one of the caller's creations.

Utility tools (free)

  • list_pricing - full cost sheet: every generation tool, subscription tiers, credit packs. Read this before quoting costs to the user.
  • get_credits_balance - split monthly / pack balance with the next refill date. Perfect to check before an expensive generation.
  • list_my_generations - the user's recent AI generations across every tool, newest first. Cursor-paginated.

Out of credits mid-flow? Every generation tool returns a structured insufficient_credits error with the current balance, the required amount, pack SKUs and a one-click top-up URL.

Rules and limitsRate limits, file size, privacy and moderation.
  • Hourly limits per account, there to catch runaway loops (credits are the real cost control): 60 generations (300 on paid plans), 60 game updates, and 20 new game uploads.
  • Game HTML must fit in 4 MB. Everything must be inline - the embed CSP blocks external network requests except for a pinned three.js CDN.
  • Only PUBLISHED creations are visible to anyone but the owner. Drafts are private; a preview URL sent to someone else returns a 404 unless they're signed in as the owner.
  • Content is moderated for a 13+ audience before it appears in the public gallery.
  • A token acts on behalf of exactly its owner. Revoke it any time from the dashboard - the next agent call fails immediately.
  • The endpoint is stateless HTTP over POST. JSON-RPC 2.0. No SDK - any MCP-compatible client that accepts a bearer token works.