使用说明
ICGL MCP Server
Instant Core Gameplay Loop Generator - Automatically generate complete Roblox game systems from 6 simple inputs.
🚀 Project Status
Current Phase: Phase 1 - Deployment
Status: ✅ Production Ready
Last Updated: January 25, 2026
✅ Completed
- [x] Core MCP server implementation
- [x] All 14 critical bugs fixed (See BUG_FIX_SUMMARY.md)
- [x] All 5 genre tests passing
- [x] Web API wrapper created
- [x] Deployment configuration ready
🎯 Next Steps
- Deploy to Railway/Heroku (See DEPLOYMENT_GUIDE.md)
- Build Roblox Studio Plugin (See IMPLEMENTATION_ROADMAP.md)
👉 New to this project? Start here: START_HERE.md
What It Does
Transforms your game concept into ready-to-use Lua scripts in seconds:
- ✅ Core gameplay loop with state management
- ✅ Progression system (Linear/Exponential/Prestige)
- ✅ Reward distribution with multipliers
- ✅ Session management with AFK detection
- ✅ Player action handling with cooldowns
Genre-agnostic • Deterministic • Production-ready
Quick Start
1. Define Your Game
Create a JSON object with 6 fields:
{
"genre": "Simulator",
"coreAction": "Clicking",
"objective": "Unlock new zones",
"progressionStyle": "Exponential",
"sessionLength": "Short",
"playerCount": "Small Multiplayer"
}
2. Generate Scripts
Option A: Using Python directly
from server import handle_request
payload = {
"genre": "RPG",
"coreAction": "Fighting",
"objective": "Defeat dungeon bosses",
"progressionStyle": "Prestige",
"sessionLength": "Long",
"playerCount": "Solo"
}
result = handle_request(payload)
print(result)
Option B: Run the test examples
python run_tests.py
3. Use the Generated Scripts
The output contains 5 ready-to-use Lua files:
CoreLoop.lua- Main game loop and state machineProgression.lua- XP/leveling systemRewards.lua- Reward calculation and distributionSessionManager.lua- Session timing and player managementPlayerActions.lua- Action handlers with cooldowns
Copy these scripts directly into your Roblox Studio project.
Input Fields
| Field | Type | Options | Description |
|---|---|---|---|
genre |
string | Any | Your game type (e.g., "Simulator", "RPG", "Tycoon") |
coreAction |
string | Any | Main player action (e.g., "Clicking", "Fighting", "Building") |
objective |
string | Any | Primary goal (e.g., "Unlock zones", "Defeat bosses") |
progressionStyle |
enum | Linear, Exponential, Prestige |
How difficulty scales |
sessionLength |
enum | Short, Medium, Long |
Target play duration |
playerCount |
enum | Solo, Small Multiplayer, Massive Multiplayer |
Player capacity |
Output Structure
{
"metadata": {
"skill": "core_gameplay_loop",
"version": "1.0",
"generatedAt": "2026-01-20T05:38:12.885216+00:00",
"inputHash": "28fcfda02..."
},
"normalizedInput": { ... },
"scripts": {
"CoreLoop.lua": "...",
"Progression.lua": "...",
"Rewards.lua": "...",
"SessionManager.lua": "...",
"PlayerActions.lua": "..."
},
"config": {
"progressionRate": 1.5,
"rewardMultiplier": 1.25,
"sessionTargetMinutes": 7.5,
"playerScaleFactor": 5.0
}
}
Examples
Tycoon Game
{
"genre": "Tycoon",
"coreAction": "Purchasing",
"objective": "Build the biggest empire",
"progressionStyle": "Exponential",
"sessionLength": "Medium",
"playerCount": "Small Multiplayer"
}
Battle Royale
{
"genre": "Battle Royale",
"coreAction": "Surviving",
"objective": "Be the last player standing",
"progressionStyle": "Linear",
"sessionLength": "Short",
"playerCount": "Massive Multiplayer"
}
Idle Clicker
{
"genre": "Clicker",
"coreAction": "Clicking",
"objective": "Reach maximum upgrades",
"progressionStyle": "Prestige",
"sessionLength": "Long",
"playerCount": "Solo"
}
How It Works
- Validation - Ensures all required fields are present and valid
- Normalization - Standardizes input format (capitalization, sentence case)
- Configuration - Calculates optimal rates and multipliers based on inputs
- Generation - Creates customized Lua scripts with your game's parameters
- Output - Returns complete package with metadata and deterministic hash
Same inputs always produce identical outputs (except timestamps).
File Structure
icgl-mcp-server/
├── server.py # Main MCP handler
├── validator.py # Input validation
├── normalizer.py # Input normalization
├── formatter.py # Output formatting and config builder
├── generator.py # Lua script generation
├── run_tests.py # Test runner
├── test_inputs.json # Example inputs
├── spec.md # Full technical specification
└── README.md # This file
Requirements
- Python 3.7+
- No external dependencies
Error Handling
Invalid inputs return an error response:
{
"error": "InvalidInput",
"message": "Missing required fields: genre, objective"
}
Next Steps
- Modify
test_inputs.jsonwith your game concept - Run
python run_tests.pyto see the generated output - Copy the Lua scripts from the output
- Paste them into Roblox Studio
- Customize the placeholder functions (marked with comments)
Technical Details
For complete specifications, constraints, and versioning rules, see spec.md.
Version: 1.0
License: MIT
Author: ICGL Team