GameFoundry MCP
Publish AI-built games straight from your agent
Connect Claude Code, Cursor, VS Code, Codex, or Claude Desktop to GameFoundry once. Then ask your agent to upload your game - it lands as a private draft with a preview URL, you test it in the browser, and when you're happy you tell your agent to submit it to the public gallery.
How the flow works
- 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. Preview & iterate
Open the preview URL in a browser. Play the game. Ask your agent to fix things - it calls
update_gamewith the new HTML, no moderation, no re-publish. Repeat until it works. - 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/creationsfor everyone. - 4. Later
Push updates any time -
update_gameon a live game re-runs moderation. Take it off the gallery withunpublish_gameto keep iterating. Remove it entirely withdelete_game.
What your agent can do
Seven tools. Everything is scoped to the user who minted the token - an agent never sees another user's creations.
upload_game- a complete HTML document → new DRAFT creation + owner-only preview URL. Not public. No moderation.update_game- replace HTML, title, or description on a draft (skips moderation) or on a published game (re-runs moderation).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.
Setup - 3 minutes
- 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.
- Connect your MCP client using one of the paths below.
- 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
- Open Settings → Connectors → Add custom connector.
- Paste the endpoint:
https://www.gamefoundry.net/api/mcp - Click Connect. A browser tab opens.
- Sign in to GameFoundry if needed, then click Allow on the consent page. You are connected.
Disconnect any time from /dashboard/connected-clients.
ChatGPT
- In ChatGPT, add a Custom Connector from the Connectors settings.
- Paste the endpoint:
https://www.gamefoundry.net/api/mcp - 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 asking
“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.”
“Submit ‘Cyber Runner’ to the public gallery.”
“List my GameFoundry creations and show me their statuses.”
Rules and limits
- 10 writes per hour per token (uploads, updates). Enough for iterating by hand, low enough to catch a runaway loop.
- Game HTML must fit in ~1.5 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.