Help Center/Code & engines
Publishing games from Claude, Cursor and other AI agents (MCP)
Ship games straight from your AI coding agent to GameFoundry using the Model Context Protocol.
GameFoundry exposes a Model Context Protocol (MCP) endpoint at https://www.gamefoundry.net/api/mcp. Any AI agent that speaks MCP - Claude Desktop, Claude Code, ChatGPT, Cursor, VS Code with MCP support, and Codex among them - can connect once and then publish games on your behalf without switching to a browser.
The typical flow is upload as a private draft, preview the game in your browser, ask your agent to iterate on it, then submit for review. Every MCP-uploaded game is reviewed by a human moderator before it goes live on the public /creations gallery.
Setup takes a few minutes. Claude Desktop and ChatGPT use OAuth: paste the endpoint URL into their custom-connector dialog and click Connect. Claude Code, Cursor and VS Code use a personal access token you mint at /dashboard/api-tokens and drop into a one-line config.
Copy-paste config snippets for every supported client, plus a full walkthrough of the tool set, live at /mcp.
Large games: upload_game takes the HTML inline, which suits files up to about 60 KB. For bigger games call start_game_upload, send the file in roughly 40 KB pieces with upload_game_chunk, then call finish_game_upload (new draft) or update_game with the upload_id (existing game). Chunks travel over the MCP connection itself, so this works even from agent sandboxes with no internet access. If your agent's environment can reach www.gamefoundry.net it can PUT the whole file to the returned upload_url instead. An upload stays open for 2 hours; call start_game_upload with renew_upload_id to extend it without losing the pieces already sent.
Small changes: patch_game sends only edits, each a find text and its replacement, applied to the game's latest version (the staged update, if a live game has one). Every find must match exactly once, or set all to replace every match; if any edit doesn't apply, nothing is saved. Pass base_sha256 to make sure you're editing the version you think, and keep the html_sha256 it returns for the next patch.
Tip
Ask your agent in plain English: "Upload this game to GameFoundry as a draft titled X." When you are happy with the preview, say "submit it" and a moderator takes it from there.