MCP Minigame Creation
The Optimove MCP exposes the Minigames creation engine as Model Context Protocol (MCP) actions — the same connection that powers campaign analytics, segment exploration, and promotion creation.
Any Optimove client with Minigames enabled can point an MCP-compatible AI client — such as Claude, ChatGPT, Gemini, Cursor, or VS Code — at https://mcp.optimove.net/mcp and generate, preview, iterate on, and publish fully playable minigames into their Minigames library. You describe the game in natural language; the AI generates the complete HTML game, deploys a preview, and returns a live URL. There are no templates to conform to, no visual-editor constraints, and no hand-coded game logic required.
Prerequisites
- An Optimove account with Minigames enabled
- An MCP-compatible AI client connected to the Optimove MCP server — see the Optimove MCP Connector reference
- No additional setup:
create_mini_gameandsave_mini_gameare part of your MCP toolset once the connector is authenticated
How It Works
The minigame actions follow a preview-then-publish model. Nothing is permanently published until you call save_mini_game.
- Connect your AI client to the Optimove MCP server at
https://mcp.optimove.net/mcp - Prompt the client — for example: "Create a football-themed scratch card with our brand colors."
- The AI generates a complete, self-contained HTML game with the SDK embedded
- The AI calls
create_mini_game, which returns a live preview URL in seconds - Open the URL and play the game
- Prompt for changes — the AI regenerates and the same preview URL updates automatically
- When the game is ready, the AI calls
save_mini_gameto publish it to your Minigames library - Attach the published game to any campaign and activate it in Optimove
Same hour, same preview slotThe AI updates the same preview URL on every iteration within the same hour — no duplicate previews are created — until you call
save_mini_game. After the hour resets, a new slot is created automatically. Pass the previouspreview_idexplicitly if you want to keep editing across the hour boundary.
Publishing a game with
save_mini_gameadds it to your library, but does not activate or send anything to customers. Attaching a game to a campaign and activating that campaign is always a separate, human action in Optimove.
Try It
Paste the following prompt into Claude, Cursor, or any MCP-connected client to generate your first game:
Use the Optimove MCP to create a mobile-responsive scratch card game with a football
theme. Use green and white as the primary colors, add a satisfying reveal animation,
and use the SDK to handle prize display. Show me a live preview link.The AI handles the rest: game logic, HTML, CSS, SDK integration, and preview deployment.
Example: Memory Challenge
A card-flip memory game is a pure-skill mechanic that is universally understood and works for any brand in any vertical. Swap what appears on the cards and it adapts: product shots for retail, player faces for sports, destinations for travel, or abstract brand patterns for finance and telco.
The prompt
Create a card-flip memory game. 4x4 grid of 8 pairs — use brand icons as the card faces.
Cards flip with a smooth 3D animation. 60-second timer: Gold prize for finishing under
20s, Silver under 40s, Bronze under 60s. Wrong flips shake and flip back. Correct matches
lock with a green glow. Show the earned prize on completion and call the SDK. Mobile-first.What the AI builds
The board
-
A 4x4 CSS grid with cards sized in
vwunits, so it fits any screen -
CSS
rotateY(180deg)withperspectivefor a true 3D flip -
Wrong pair: shake animation plus auto-flip back after 800ms
-
Correct match: green pulse glow, cards lock face-up
The prize system -
A countdown timer that shifts green → amber → red as time runs out
-
Gold / Silver / Bronze tiers based on completion speed
-
Game completion triggers the SDK and the campaign prize flow
-
A time-out ends with a retry prompt — no dead ends
Prompt to live preview URL: about 60 secondsWant a 6x6 hard mode, a leaderboard, or different prize tiers? That is one follow-up prompt.
What the AI Controls
Because the AI generates the complete HTML, it has full control over every aspect of the game — there are no templates to conform to and no visual-editor constraints:
- Game mechanic — any type, from scratch cards to platformers
- Visual design — brand colors, fonts, layout, and animations
- Difficulty and scoring — fully configurable logic
- Particle effects and transitions
- Sound design via the Web Audio API
- Prize display and winner screens
- SDK event hooks —
context.prize,finish(), and callbacks - Mobile and desktop responsiveness
The MCP Actions
The explore (mini-games focus), create_mini_game, and save_mini_game actions are part of your existing Optimove MCP connection. No additional setup is required — once the connector is authenticated, they appear in your client's toolset.
explore — mini-games focus
explore — mini-games focusSearches and retrieves games from the Minigames library. Behavior depends on whether you pass mini_game_id.
List mode (no mini_game_id)
mini_game_id)| Parameter | Required | Description |
|---|---|---|
search | No | Filter by title. Partial names match — "Snake" matches "Snake Game", "Snake Classic", and similar. |
fuzzy | No | Set to true to tolerate typos and misspellings. Off by default. |
offset | No | Pagination start index. Use next_offset from the previous response to page forward. |
Returns: { id, title, cdn_url } per game. cdn_url is a direct browser link to the published game.
Detail mode (mini_game_id=<id>)
mini_game_id=<id>)| Parameter | Required | Description |
|---|---|---|
mini_game_id | Yes | The id from a list response. Fetches the full game HTML from the CDN. |
Returns: id, title, cdn_url, and html — the complete source code, ready to modify and pass back to create_mini_game.
create_mini_game
create_mini_gameGenerates or updates a minigame in preview mode and returns a live playable URL. Nothing is permanently published until you call save_mini_game.
| Parameter | Required | Description |
|---|---|---|
game_code | Yes | Complete, self-contained HTML with embedded CSS, the SDK script, and game logic. |
name | No | Display name. Auto-generated if omitted (Game_YYYYMMDD_HHMMSS). |
preview_id | No | Pass to explicitly update a previous session's game. Omit to use the automatic same-hour slot. |
Returns: preview_id, play_url, has_sdk, is_update.
Example
{
"game_code": "<!DOCTYPE html><html>...</html>",
"name": "Football Scratch Card"
}{
"preview_id": "prev_a1b2c3",
"play_url": "https://play.adact.me/preview/prev_a1b2c3",
"has_sdk": true,
"is_update": false
}save_mini_game
save_mini_gamePermanently publishes a previewed game to your Minigames library.
| Parameter | Required | Description |
|---|---|---|
preview_id | Yes | The preview_id returned by create_mini_game. |
name | No | Final display name for the published game. |
Result: The game appears in your Minigames library, ready to attach to any campaign.
Example
{
"preview_id": "prev_a1b2c3",
"name": "Football Scratch Card"
}Game Code Requirements — Technical Spec
The HTML passed to create_mini_game must be a complete, self-contained document:
<!DOCTYPE html>declaration<html>,<head>, and<body>tags, all properly closed- A
<style>block containing all CSS — no external stylesheets - The SDK
<script>placed before the game logic — see the SDK reference for the embed snippet and available methods (context.prize,finish(), event callbacks) - Mobile-responsive layout using relative units (
vw,vh,%,rem) — no fixed pixels - A complete implementation — no TODOs, placeholders, or incomplete logic
- No external library dependencies unless explicitly requested
For the SDK embed snippet, prize context, and event callbacks, see the SDK reference.
Part of the Full Optimove MCP
These minigame actions belong to the Builder category of the Optimove MCP. Like the other Builder tools, they create assets in your tenant that become available to attach to a campaign — they do not message customers or activate anything on their own.
Because the broader MCP exposes campaigns, segments, promotions, and platform analytics in the same connection, a single AI session can run fully end to end:
- Look up available customer segments
- Generate a branded minigame and preview it with
create_mini_game - Create a Target Group
- Draft a campaign
- Publish the game with
save_mini_game
For the full transport, safety model, authentication, and tool catalog, see the Optimove MCP Connector reference.