QusaiiSaleem/scenario-asset-mcp-public
If you are the rightful owner of scenario-asset-mcp-public and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
A Model Context Protocol (MCP) server for Unity game asset generation using Scenario.gg AI, designed for seamless integration with MCP clients like Claude Desktop, smithery-playground, and other MCP-compatible tools.
Scenario Asset MCP Server
A Model Context Protocol (MCP) server for Unity game asset generation using Scenario.gg AI, designed for seamless integration with MCP clients like Claude Desktop, smithery-playground, and other MCP-compatible tools.
๐ฎ What This Does
This MCP server provides 10 comprehensive tools for generating Unity-ready game assets:
- Characters: Heroes, NPCs, enemies with multiple art styles
- Environments: Backgrounds, landscapes, interiors, skyboxes
- Props & Objects: Weapons, collectibles, furniture, vehicles
- UI Elements: Buttons, panels, frames with 9-slice support
- Textures: PBR materials, seamless textures, surface maps
- Icons: UI icons, logos, symbols with multiple sizes
- Asset Management: Search, retrieve, and manage generated assets
โจ Key Features
- ๐ MCP Protocol Compliant: Works with any MCP client
- ๐จ Unity-Optimized: PNG+Alpha, proper import settings, organized folders
- โก Performance Focused: WebGL/Mobile optimized, <300ms response times
- ๐ก๏ธ Production Ready: Rate limiting, security headers, error handling
- ๐ฑ Multi-Platform: Supports various art styles and target platforms
- ๐ Batch Processing: Generate multiple variations in one request
๐ Quick Start
Prerequisites
- Cloudflare Workers account
- Scenario.gg API account
- Supabase account (for asset storage)
- Wrangler CLI
1. Clone and Setup
git clone https://github.com/yourusername/scenario-asset-mcp.git
cd scenario-asset-mcp
2. Install Dependencies
npm install
# or
yarn install
3. Configure Environment
# Copy example environment file
cp wrangler.toml.example wrangler.toml
# Set your secrets
wrangler secret put SCENARIO_API_KEY
wrangler secret put SCENARIO_API_SECRET
wrangler secret put SUPABASE_URL
wrangler secret put SUPABASE_ANON_KEY
wrangler secret put SUPABASE_SERVICE_ROLE_KEY
4. Deploy
wrangler deploy
Your MCP server will be available at: https://your-worker-name.your-subdomain.workers.dev
๐ง Configuration
Required Secrets
Set these using wrangler secret put <SECRET_NAME>
:
Secret | Description | Example |
---|---|---|
SCENARIO_API_KEY | Your Scenario.gg API key | sk_live_... |
SCENARIO_API_SECRET | Your Scenario.gg API secret | sk_secret_... |
SUPABASE_URL | Your Supabase project URL | https://xyz.supabase.co |
SUPABASE_ANON_KEY | Supabase anonymous key | eyJ... |
SUPABASE_SERVICE_ROLE_KEY | Supabase service role key | eyJ... |
Optional Configuration
Edit wrangler.toml
to customize:
[vars]
ENVIRONMENT = "production"
LOG_LEVEL = "info"
MAX_CONCURRENT_REQUESTS = "20"
RATE_LIMIT_MAX_REQUESTS = "100"
RATE_LIMIT_WINDOW_MS = "60000"
๐ ๏ธ Available Tools
Asset Generation Tools
generate_characters
Generate character sprites for your Unity game.
{
"name": "generate_characters",
"arguments": {
"prompt": "medieval knight with silver armor",
"character_type": "hero",
"art_style": "cartoon",
"num_variations": 2,
"tags": ["fantasy", "armor"]
}
}
generate_environments
Create backgrounds and environment assets.
{
"name": "generate_environments",
"arguments": {
"prompt": "desert oasis with palm trees",
"environment_type": "background",
"art_style": "realistic",
"time_of_day": "sunset",
"resolution": "wide"
}
}
generate_props_objects
Generate game objects like weapons, collectibles, furniture.
{
"name": "generate_props_objects",
"arguments": {
"prompt": "golden sword with gemstones",
"object_type": "weapon",
"rarity": "legendary",
"transparency": true
}
}
generate_ui_system
Create UI elements with 9-slice support.
{
"name": "generate_ui_system",
"arguments": {
"prompt": "futuristic blue button with glow",
"ui_type": "button",
"ui_style": "sci-fi",
"state_variants": true,
"nine_slice": true
}
}
generate_textures_materials
Generate PBR textures and materials.
{
"name": "generate_textures_materials",
"arguments": {
"prompt": "weathered stone brick wall",
"texture_type": "complete_pbr",
"material_type": "stone",
"seamless": true
}
}
generate_icons_symbols
Create icons and symbols for UI.
{
"name": "generate_icons_symbols",
"arguments": {
"prompt": "health potion icon with red liquid",
"icon_type": "ui_icon",
"icon_style": "filled",
"size_variants": true
}
}
Asset Management Tools
search_assets
Search previously generated assets.
{
"name": "search_assets",
"arguments": {
"type": "character",
"tags": ["fantasy"],
"limit": 10
}
}
get_asset_details
Get detailed information about an asset.
{
"name": "get_asset_details",
"arguments": {
"asset_id": "uuid-here"
}
}
list_scenario_models
List available AI models.
{
"name": "list_scenario_models",
"arguments": {}
}
delete_asset
Delete an asset (use with caution).
{
"name": "delete_asset",
"arguments": {
"asset_id": "uuid-here",
"confirm": true
}
}
๐ MCP Client Integration
Claude Desktop
Add to your claude_desktop_config.json
:
{
"mcpServers": {
"scenario-assets": {
"command": "npx",
"args": [
"@modelcontextprotocol/server-fetch",
"https://your-worker.workers.dev/mcp"
]
}
}
}
Smithery Playground
Connect directly using the server URL:
https://your-worker.workers.dev/mcp
Other MCP Clients
Use the standard MCP endpoints:
- MCP Protocol:
POST /mcp
- Server Discovery:
GET /
- Health Check:
GET /health
- Streaming:
GET /mcp/stream
๐๏ธ Architecture
Technology Stack
- Runtime: Cloudflare Workers (Edge computing)
- Protocol: MCP (Model Context Protocol) JSON-RPC 2.0
- AI Generation: Scenario.gg API
- Storage: Supabase (PostgreSQL + File Storage)
- Format: Unity-optimized PNG+Alpha assets
Request Flow
MCP Client โ Cloudflare Worker โ Scenario API โ Asset Generation
โ
Supabase Storage โ Unity Import โ Asset Processing
Performance Features
- Edge Computing: Global CDN with <50ms latency
- Concurrent Processing: Up to 20 parallel requests
- Smart Caching: Asset metadata and model listings
- Rate Limiting: 100 requests/minute per client
- Timeout Management: 30s default, 120s for generation
๐งช Testing
Local Development
# Install dependencies
npm install
# Start local development server
wrangler dev
# Test endpoints
curl http://localhost:8787/health
Testing MCP Protocol
# Test initialization
curl -X POST http://localhost:8787/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{}},"id":1}'
# Test tools list
curl -X POST http://localhost:8787/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"tools/list","id":2}'
Unity Integration Testing
- Generate test assets using the MCP tools
- Import into Unity project
- Verify PNG+Alpha format and transparency
- Test sprite pivot points and physics shapes
- Validate performance on target platform
๐ Documentation
API Reference
Unity Integration
๐ค Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature
- Commit changes:
git commit -m 'Add amazing feature'
- Push to branch:
git push origin feature/amazing-feature
- Open a Pull Request
Development Guidelines
- Follow the existing code style
- Add tests for new features
- Update documentation
- Ensure Unity compatibility
- Test with multiple MCP clients
๐ License
This project is licensed under the MIT License - see the file for details.
๐ Support
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: Wiki
๐ Acknowledgments
- Model Context Protocol for the excellent protocol specification
- Scenario.gg for the powerful AI generation API
- Cloudflare Workers for the serverless platform
- Unity Technologies for the game engine integration
๐ Roadmap
- Resource system for asset templates
- Prompt system for common generation patterns
- Batch generation workflows
- Unity Editor plugin
- Asset versioning and history
- Collaborative asset sharing
- Custom model training integration
Made with โค๏ธ for Unity game developers using AI-powered asset generation