Heist Escape MCP
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Heist Escape MCPStart a new heist session and share the QR code for the operator"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Heist Escape MCP
A showable cooperative escape-room ARG/heist game with big-screen stage, QR lobby, and role-specific experiences. Built as a remote MCP server on Cloudflare Workers with a light-themed demo client.
๐ญ Stage Mode: Click "Start Demo" โ QR codes appear โ Examiner (agent) copies MCP config โ Operator (human) joins on phone โ Cooperative heist begins!
Theme: Bright, welcoming museum heist (not dark/cyberpunk)
Duration: 5-10 minutes (pitch path) | 30-45 minutes (full game)
Roles: Examiner (Agent) + Operator (Human)
Rooms: 5 interconnected spaces
Puzzles: 4 code-based puzzles with progressive hints
๐ฏ Quick Demo
Production (GitHub Pages)
๐ Launch Stage
Replace with your URL after deployment. See DEPLOY.md for setup.
Local Development
# Terminal 1: Start MCP Server
cd packages/mcp-server && npm run seed && npm run dev
# Terminal 2: Start Demo Client
cd apps/demo-client && npm run dev
# Open: http://localhost:3000
# Click "Start Demo" and follow the flowRelated MCP server: Escape Room MCP
๐ฏ Features
MCP Server (Cloudflare Workers)
10 MCP Tools for cooperative gameplay
Durable Objects for session state (strong consistency)
D1 Database for static game content (rooms, objects, puzzles)
Shared inventory across all players
Action log for team coordination
Progressive hints per room
Three.js Demo Client
Light-themed 3D dioramas (bright rooms, soft lighting)
Raycast interaction (click objects to examine)
CSS2D UI overlays (inventory, action log, examine panel)
Real-time state sync via MCP tools
Emissive pulses on interactable objects
Game Content
5 rooms: Museum Lobby โ Gallery A โ Archives โ Vault Access โ The Vault
18 interactable objects (desks, drawers, paintings, keypads, diamond)
4 code puzzles (key finding, catalog access, 4-digit vault code)
Red herrings and multi-stage puzzles
Complete solution guide (docs only, not in client bundle)
๐๏ธ Architecture
heist-escape-mcp/
โโโ packages/
โ โโโ mcp-server/ # Cloudflare Worker + DO + D1
โ โโโ src/
โ โ โโโ index.ts # Worker entry point
โ โ โโโ mcp.ts # McpAgent with 10 tools
โ โ โโโ game-session.ts # Durable Object
โ โ โโโ types.ts # TypeScript definitions
โ โโโ schema.sql # D1 database schema
โ โโโ seed.sql # Game content (rooms, objects, puzzles)
โ โโโ wrangler.jsonc # Worker config
โโโ apps/
โ โโโ demo-client/ # Vite + three.js client
โ โโโ src/
โ โ โโโ main.ts # Entry point
โ โ โโโ mcp-client.ts # MCP tool wrapper
โ โ โโโ scene-manager.ts # 3D scene builder
โ โโโ index.html # Light-themed UI
โ โโโ vite.config.ts
โโโ docs/
โ โโโ SOLUTION_GUIDE.md # Complete walkthrough (spoilers!)
โ โโโ DEMO_SCRIPT.md # 5-10 minute pitch script
โโโ README.md๐ Quick Start
Prerequisites
Node.js 18+
npm or pnpm
Wrangler CLI (
npm install -g wrangler)Cloudflare account (for deployment)
1. Install Dependencies
npm install2. Seed Database
cd packages/mcp-server
npm run seedThis creates the D1 database locally and populates it with:
5 rooms with descriptions
18 interactable objects
4 puzzles with hashed solutions
Progressive hints (3 per room)
3. Start MCP Server
cd packages/mcp-server
npm run devServer runs at http://localhost:8787/mcp
4. Start Demo Client (Optional)
cd apps/demo-client
npm run devClient runs at http://localhost:3000
5. Play the Game
Option A: MCP Clients (Recommended)
The server exposes a real MCP endpoint at /mcp using Streamable HTTP transport. Connect any MCP client:
MCP Inspector (easiest for testing):
npx @modelcontextprotocol/inspector@latest
# Open http://localhost:5173
# Connect to: http://localhost:8787/mcpClaude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"heist-escape": {
"command": "npx",
"args": ["mcp-remote", "http://localhost:8787/mcp"]
}
}
}Restart Claude Desktop after updating config.
Cursor (Settings โ Features โ Model Context Protocol):
{
"mcpServers": {
"heist-escape": {
"command": "npx",
"args": ["mcp-remote", "http://localhost:8787/mcp"]
}
}
}mcp-remote CLI:
npx mcp-remote http://localhost:8787/mcpOption B: Browser Client (Three.js Demo)
Open
http://localhost:3000Enter session ID:
heist-alphaEnter your player name
Select role (optional):
examineroroperatorClick Join Heist
Click objects in the 3D scene to interact
Option C: Direct HTTP API (for testing)
Option D: Two MCP Agents (Best for Cooperative Demo)
Launch two MCP-enabled agents (Claude Desktop, Cursor, etc.) with the server connected:
{
"mcpServers": {
"heist-escape": {
"command": "npx",
"args": ["mcp-remote", "http://localhost:8787/mcp"]
}
}
}Both agents join the same session and cooperate!
๐ฎ MCP Tools
Session Management
join_session โ Join or create a game session
Params:
sessionId,playerName,role?Returns: Welcome message + current state
get_state โ Get full session state
Params:
sessionIdReturns: Room, players, inventory, unlocks, hints used
get_recent_actions โ View action log
Params:
sessionId,limit?Returns: Recent player actions for coordination
Exploration
look_around โ Survey current room
Params:
sessionId,playerIdReturns: Room description, visible objects, exits
examine_object โ Inspect an object closely
Params:
sessionId,playerId,objectNameReturns: Detailed description, hidden clues, hints
Interaction
use_item โ Take or use an item/object
Params:
sessionId,playerId,itemName,action,target?Actions:
take,use,open,unlock,press,pullReturns: Result, inventory updates, unlocked doors
open_drawer โ Open a specific drawer
Params:
sessionId,playerId,drawerIdReturns: Drawer contents or lock status
enter_code โ Enter a code/number
Params:
sessionId,playerId,code,target?Returns: Success/failure, unlocked content
Team Coordination
get_inventory โ View shared team inventory
Params:
sessionIdReturns: All items collected by any player
get_hints โ Request progressive hints
Params:
sessionId,playerId,roomId?Returns: Incremental hints (subtle โ direct)
๐ฏ Cooperative Design
Shared State
Inventory is team-wide: if Alice picks up a key, Bob can use it
Action log shows all player moves in real-time
Door unlocks persist for all players
Puzzle solutions are validated server-side only
Roles (Optional)
Examiner: Focuses on reading documents, examining objects
Operator: Focuses on opening drawers, entering codes
Both roles can use all tools; roles are soft suggestions
Keep Talking Beat
Example: One player finds part of a code on a document, verbally shares it with the teammate who's at the keypad. Requires communication!
๐งฉ Game Walkthrough (No Spoilers)
Pitch Path (5-10 minutes)
Room 1 (Lobby): Find Gallery A key, discover first vault digit
Room 2 (Gallery): Find second vault digit, unlock Archives
Tease Room 3+: Setup for catalog puzzle and final vault access
Full Game (30-45 minutes)
Room 3 (Archives): Solve catalog puzzle, find third digit
Room 4 (Vault Access): Assemble 4-digit code, unlock vault
Room 5 (Vault): Claim the Sunburst Diamond, heist complete!
For complete solutions, see docs/SOLUTION_GUIDE.md (spoilers!)
๐ฆ Deployment
Deploy MCP Server to Cloudflare
cd packages/mcp-server
# Create D1 database (first time only)
wrangler d1 create heist-db
# Copy database_id to wrangler.jsonc
# Seed remote database
npm run seed:remote
# Deploy Worker
npm run deployYour MCP server will be at:
https://heist-escape-mcp.<your-account>.workers.dev/mcpConnect Remote MCP Server
Claude Desktop:
{
"mcpServers": {
"heist-escape": {
"command": "npx",
"args": ["mcp-remote", "https://heist-escape-mcp.<your-account>.workers.dev/mcp"]
}
}
}Cursor / MCP Inspector:
https://heist-escape-mcp.<your-account>.workers.dev/mcpBuild Demo Client
cd apps/demo-client
npm run buildStatic files in dist/ can be deployed to:
Cloudflare Pages
Vercel
Netlify
Any static host
Update vite.config.ts proxy to point to your deployed MCP server.
๐จ Design Principles
Light Theme (NOT Dark)
Rooms: Bright, welcoming, professional museum spaces
Lighting: Soft ambient + warm accents + cool highlights
UI: Light backgrounds, dark text, clean sans-serif
Materials: Marble, brass, glass, warm wood tones
Atmosphere: Calm, elegant, sophisticated (not tense/dark)
Puzzle Philosophy
Fair ARG: All clues discoverable through exploration
No pixel hunting: Objects clearly described and hinted
Progressive hints: 3 levels per room (subtle โ direct)
Server-side validation: No puzzle solutions in client code
Red herrings: Atmospheric objects that don't hold clues
Accessibility
Clear object descriptions
Interaction hints on examine
Progressive hint system
Action log for team coordination
No time pressure
๐งช Testing
Local Development
# Terminal 1: MCP Server
cd packages/mcp-server
npm run seed && npm run dev
# Terminal 2: Demo Client
cd apps/demo-client
npm run dev
# Terminal 3: MCP Inspector
npx @modelcontextprotocol/inspector@latestTest Scenarios
Solo Play: One agent completes Rooms 1-2
Cooperative Play: Two agents join same session, share items
Concurrent Sessions: Two separate sessions running simultaneously
State Persistence: Disconnect and rejoin (state preserved)
Invalid Codes: Enter wrong vault code (should fail gracefully)
Demo Script
See docs/DEMO_SCRIPT.md for a complete 5-10 minute demo walkthrough with expected outputs.
๐ง Configuration
Environment Variables (Optional)
None required for local development. For production:
D1 database binding configured in
wrangler.jsoncDurable Objects automatically provisioned
Customization
Add rooms: Extend
seed.sqlwith new room dataAdd objects: Insert into
objectstable, updateSceneManagerAdd puzzles: Insert into
puzzlestable with solution hashAdjust difficulty: Modify hint text, add/remove clues
๐ Documentation
SOLUTION_GUIDE.md โ Complete walkthrough with all puzzle solutions
DEMO_SCRIPT.md โ 5-10 minute live demo script with expected outputs
ARCHITECTURE.md โ Technical architecture deep-dive (future)
๐ Troubleshooting
MCP Server Won't Start
Check wrangler installed:
wrangler --versionRun database seed:
npm run seedCheck port 8787 not in use
Database Empty
Run
npm run seedinpackages/mcp-serverCheck for SQL errors in terminal output
Verify D1 database created:
wrangler d1 list
Objects Not Interactable
Use exact object names from
look_aroundoutputNames are case-sensitive and use hyphens (e.g.,
reception-desk)Check current room with
get_state
Shared State Not Syncing
Both players must use identical
sessionIdDurable Object ensures strong consistency
Check action log:
get_recent_actions
Three.js Client Issues
Check MCP server running:
curl http://localhost:8787/Verify proxy config in
vite.config.tsOpen browser console for errors
๐ค Contributing
This is a demo project showcasing:
Cloudflare Workers + Durable Objects + D1
Remote MCP server architecture
Cooperative stateful gameplay
Light-themed three.js client
Feel free to:
Add more rooms and puzzles
Enhance 3D visualizations
Improve UI/UX
Add sound effects and music
Create new game modes (competitive, time trial, etc.)
๐ License
MIT License - See LICENSE file for details
๐ Learning Resources
Cloudflare
MCP
Three.js
๐ Acknowledgments
Built with:
Inspired by:
Classic escape room games
ARG (Alternate Reality Game) design
Cooperative puzzle-solving experiences
"Keep Talking and Nobody Explodes" asymmetric cooperation
Ready to pull off the heist of the century? ๐
npm install
cd packages/mcp-server && npm run seed && npm run devThen follow the DEMO_SCRIPT.md for your first playthrough!
This server cannot be deployed
Maintenance
Related MCP Connectors
Real-time collaborative whiteboard โ AI agents and humans edit the same board live over MCP.
Shared long-term memory vault for AI agents with 20 MCP tools.
MCP server teaching AI agents to implement TideCloak: auth, E2EE, IGA, security analysis
Cross-tool persistent memory and context for AI assistants over MCP.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceEnables AI agents to communicate, coordinate, and collaborate on complex tasks through a local MCP server.10 npm8ISC
- AlicenseAqualityCmaintenanceAn MCP server that turns any LLM into an escape room player.10MIT
- FlicenseNot gradedqualityBmaintenanceMCP server enabling AI agents to participate as first-class citizens in a shared community square, with tools for handshake, context sharing, activity execution, and observable narrative.-
- AlicenseNot gradedqualityAmaintenanceMulti-agent context sharing, memory, and status coordination via 10 MCP tools.MIT