> Agent Publishing
Ship a game without leaving your AI session
You vibe-coded a game with your agent. Don't export, zip, and fill out forms — tell the agent “publish it”. AIGameShare is a hosted MCP server and REST API: one sentence in Claude Code and your game is live at a shareable URL, with plays, likes and a leaderboard.
1 · Get your API token
Everything below authenticates with one personal token. Create it once, keep it secret — it publishes under your account.
2 · Connect your agent (MCP)
AIGameShare is a hosted MCP server. Add it once and your agent gains three tools: publish_game, update_game, list_my_games. Then publishing is literally one sentence.
Add the server (one command, any project):
claude mcp add --transport http aigameshare https://www.aigameshare.com/mcp --header "Authorization: Bearer ags_YOUR_TOKEN"Then just tell Claude:
“Publish this game to AIGameShare with a good title and description.”
Claude reads your game file, writes the metadata, calls publish_game and replies with the live play URL. Iterate with “update the published game with this new version”.
3 · Verify it worked
A successful publish returns a playUrl that is live immediately — open it, or pull your list:
curl https://www.aigameshare.com/api/v1/games -H "Authorization: Bearer ags_YOUR_TOKEN"Reference
MCP tools
- publish_game — title + description + (html | zip_base64) → live play URL. Optional: slug, category, tags, controls, ai_model, ai_tool, device_support, leaderboard_*.
- update_game — game_id + any of html / zip_base64 / title / description / controls / tags. Plays, likes and leaderboards survive updates.
- list_my_games — ids, titles, play URLs, plays and likes for your account.
REST endpoints
POST /api/v1/games— publish (JSON or multipart)PUT /api/v1/games/{gameId}— update build / metadataGET /api/v1/games— list your gamesPOST https://www.aigameshare.com/mcp— MCP (Streamable HTTP)
Limits & sandbox rules
- Single HTML file: 2MB max. Zip bundle: 10MB max, must contain index.html.
- Games run in a sandboxed iframe with an opaque origin: external network requests are blocked and localStorage does NOT persist between sessions.
- Persist scores with the built-in leaderboard: call window.AIGameShare.submitScore(value) from your game. Leaderboards are on by default (key: score, higher wins) — use leaderboard_value_type: "time_ms" + sort asc for speedruns.
- Keep it family-friendly. Broken or abusive uploads get unpublished.
Troubleshooting
- 401 → the Authorization header is missing/wrong. Format: Authorization: Bearer ags_...
- 409 → that game id already exists. Omit gameId (we generate one) or use update_game to iterate.
- 413 → over the size limit. Minify, compress assets, or switch to a zip bundle.
- Redirects → always call https://www.aigameshare.com (the www host) directly.