Spaces:
Running
A newer version of the Gradio SDK is available:
6.2.0
Dream Game Forge - Project Instructions
Project Overview
Dream Game Forge is an agentic Gradio application for the MCP 1st Birthday Hackathon that analyzes a user's Steam gaming library to discover their ideal game, then generates a playable HTML5 prototype.
CRITICAL: Deadline is November 30, 2025, 11:59 PM UTC (TODAY). Prioritize working features over perfection.
Core Workflow
- User provides Steam ID
- Agent fetches Steam library + playtime data
- Analyzes gaming patterns (what they play vs. what they buy and ignore)
- Cross-references with IGDB for genre/theme data
- Identifies a unique game "gap" tailored to the user
- Generates a mini Game Design Document
- Produces a playable HTML5 Canvas game (single-file, no dependencies)
Hackathon Requirements
- Track: MCP in Action - Creative
- Must include:
- Gradio app interface
- MCP servers as tools (Steam API, IGDB API)
- Autonomous agent behavior with planning and reasoning
- README tag:
mcp-in-action-track-creative - HF Space: https://huggingface.co/spaces/MCP-1st-Birthday/DreamGameForge
Architecture Constraints
Why NOT Claude Agent SDK
The Agent SDK requires global npm install which HuggingFace Spaces don't support. Use raw Anthropic API with manual tool loop instead.
MCP Implementation
Build simple MCP-style servers in tools/ directory. We satisfy the MCP requirement by structuring tools properly, even though we call them via Anthropic API tool interface.
Game Generation
Claude generates complete HTML5 Canvas code directly - no external game engines. Keep games simple (puzzle, clicker, basic platformer) but playable. Display via gradio-iframe component or downloadable HTML file.
File Structure
DreamGameForge/
โโโ app.py # Gradio app + agent loop
โโโ tools/
โ โโโ steam.py # Steam API functions
โ โโโ igdb.py # IGDB API functions
โโโ agent.py # Agentic loop logic
โโโ requirements.txt
โโโ README.md # Must include mcp-in-action-track-creative tag
API Configuration
Required Secrets (set in HF Space settings)
ANTHROPIC_API_KEYSTEAM_API_KEYTWITCH_CLIENT_ID(for IGDB)TWITCH_CLIENT_SECRET(for IGDB)
Steam Web API
Endpoint: https://api.steampowered.com/IPlayerService/GetOwnedGames/v1/
Parameters: key, steamid, include_appinfo=true, include_played_free_games=true
Returns: List of games with appid, name, playtime_forever, playtime_2weeks
Works for public profiles without OAuth.
IGDB API
Endpoint: https://api.igdb.com/v4/games
Headers: Client-ID, Authorization: Bearer {token}
Body: Apicalypse query syntax
Get access token from:
POST https://id.twitch.tv/oauth2/token
Body: client_id, client_secret, grant_type=client_credentials
Example queries:
- Search:
search "Hollow Knight"; fields name,genres.name,themes.name,summary; limit 10; - Filter:
where genres.name = "Platform" & rating > 80; fields name,summary; limit 20;
System Prompt Philosophy
The agent should be decisive and autonomous:
- INVESTIGATE: Fetch Steam library, analyze playtime patterns
- ANALYZE: Cross-reference with IGDB for genres/themes/mechanics
- IDENTIFY THE GAP: What game should exist for this person?
- DESIGN: Write mini Game Design Document
- BUILD: Generate playable HTML5 Canvas prototype
Don't ask for permission - show reasoning and act.
Model Selection
Use claude-sonnet-4-20250514 for the agent loop - balance of quality and speed.
Development Workflow
Local Testing
pip install gradio anthropic httpx python-dotenv
export ANTHROPIC_API_KEY=...
export STEAM_API_KEY=...
export TWITCH_CLIENT_ID=...
export TWITCH_CLIENT_SECRET=...
python app.py
Deployment
git add .
git commit -m "descriptive message"
git push # Pushes to HuggingFace Space automatically
Priority Order (Time-Constrained)
- โ Basic Gradio chat with Claude working
- Steam library fetch tool
- IGDB game details tool
- Agent loop with tools integrated
- System prompt refinement
- Game HTML generation capability
- Game display in Gradio (iframe or download)
- Polish, README, demo video, social post
Quick Wins If Time Runs Out
- Skip IGDB, use only Steam data + Claude's knowledge
- Serve game as downloadable file instead of embedded iframe
- Simpler game format (text adventure vs. canvas game)
- Pre-record demo video even if live version is flaky
Code Style
- Keep functions simple and focused
- Use type hints where practical
- Error handling for API calls (Steam/IGDB may fail)
- Log agent reasoning steps for debugging
Testing
- Test with a real Steam ID (public profile required)
- Verify API keys are working before full agent run
- Test generated HTML games in browser before deployment
- Check HF Space logs if deployment fails
Reference Links
- Space: https://huggingface.co/spaces/MCP-1st-Birthday/DreamGameForge
- Hackathon: https://huggingface.co/MCP-1st-Birthday
- Steam API Docs: https://developer.valvesoftware.com/wiki/Steam_Web_API
- IGDB API Docs: https://api-docs.igdb.com/
- Gradio Docs: https://www.gradio.app/docs