MCP ExplorerExplorer

Gradio Mcp Hackathon

@castlebbson 10 days ago
5ย MIT
FreeCommunity
AI Systems
Our participation to the 2025 Gradio Agent MCP Hackathon

Overview

What is Gradio Mcp Hackathon

gradio-mcp-hackathon is a project developed for the 2025 Gradio Agent MCP Hackathon, aimed at creating a 3D scene generator that transforms player biographies into personalized 3D environments using LLM-powered analysis and generation models.

Use cases

Use cases include generating unique 3D environments for video games based on player profiles, creating immersive experiences in educational games, and developing personalized content for virtual reality applications.

How to use

To use gradio-mcp-hackathon, set up the prerequisites including Python 3.8+, an Anthropic API key, a Modal account, and Godot Engine 4.4+. Follow the installation instructions to run the Gradio interface, input player biographies, and generate 3D assets for integration into a game environment.

Key features

Key features include AI-powered analysis of player biographies, high-quality 3D asset generation using FLUX + Trellis, an interactive web interface for real-time generation, integration with Godot for immersive visualization, support for Model Context Protocol, and an optimized pipeline for fast generation.

Where to use

gradio-mcp-hackathon can be used in the gaming industry, particularly for creating personalized gaming experiences, virtual environments, and interactive storytelling.

Content

๐ŸŽฎ 3D Scene Asset Generator

Our participation to the 2025 Gradio Agent MCP Hackathon

Transform player biographies into personalized 3D environments using LLM-powered analysis and 3D asset generation models pipelines.

๐ŸŒŸ Project Overview

This hackathon project creates a 3D scene generator that analyzes player biographies and automatically generates personalized 3D environments. By combining the power of LLM analysis with generation models (FLUX + Trellis), we create unique, contextual 3D assets that reflect each playerโ€™s personality, interests, and background.

โœจ Key Features

  • ๐Ÿค– AI-Powered Analysis: LLM analyzes player biographies to understand personality and interests
  • ๐ŸŽจ 3D Generation: FLUX + Trellis pipeline generates high-quality, contextual 3D assets
  • ๐ŸŒ Interactive Web Interface: Gradio interface with real-time generation and examples
  • ๐ŸŽฎ 3D Game Integration: Godot game client that connects to MCP server for immersive 3D environment visualization
  • ๐Ÿ”ง MCP Integration: Supports Model Context Protocol for enhanced interactions
  • โšก Optimized Pipeline: Uses GGUF quantization and LoRA models for fast, efficient generation
  • ๐Ÿ“ฑ User-Friendly: Simple input โ†’ AI analysis โ†’ 3D asset generation โ†’ game environment workflow

๐Ÿ—๏ธ Architecture

MCP Hackaton-3

Thank you to gokaygokay for the GGUF

Technology Stack

  • Frontend: Gradio with custom CSS styling
  • Game Client: Godot Engine 4.4 for 3D environment visualization
  • AI Analysis: Anthropic Claude Sonnet 4
  • 3D Generation: FLUX + Trellis on Modal
  • MCP Protocol: Model Context Protocol for client-server communication
  • Output Format: GLB (3D models compatible with most engines)

๐Ÿš€ Quick Start

Prerequisites

  • Python 3.8+
  • Anthropic API key
  • Modal account
  • Godot Engine 4.4+ (for game client)
  • mcptools CLI (for MCP communication)

Installation

  1. Clone the repository

    git clone https://github.com/castlebbs/gradio-mcp-hackathon.git
    cd gradio-mcp-hackathon
    
  2. Set up the Gradio application

    cd gradio
    pip install -r requirements.txt
    
  3. Configure API keys

    export ANTHROPIC_API_KEY="your-anthropic-api-key"
    
  4. Set up Modal

    modal setup
    
  5. Deploy the Modal function

    cd ../modal
    modal deploy flux-trellis-GGUF-text-to-3d.py
    
  6. Run the application

    cd ../gradio
    python app.py
    
  7. Set up the Godot game client

๐Ÿ’ก Usage Example

Web Interface

Input Biography:

โ€œMarcus is a tech enthusiast and gaming streamer who loves mechanical keyboards and collecting vintage arcade games. Heโ€™s also a coffee connoisseur who roasts his own beans and enjoys late-night coding sessions.โ€

Generated 3D Assets:

  • Vintage arcade cabinet with classic game artwork
  • Premium mechanical keyboard with RGB backlighting
  • Professional coffee roasting station with custom setup
  • Gaming chair with LED accents and streaming equipment
  • Retro-futuristic desk lamp with adjustable lighting

Godot Game Client

The Godot game provides an immersive 3D environment where:

  1. Player Input: Enter your biography through the in-game UI
  2. MCP Communication: Game connects to the Gradio MCP server via mcptools
  3. Real-time Generation: 3D assets are generated and sent back to the game
  4. Environment Building: Assets are automatically placed in the 3D scene
  5. Interactive Exploration: Walk around and explore your personalized environment

๐Ÿ“ Project Structure

gradio-mcp-hackathon/
โ”œโ”€โ”€ gradio/                    # Main Gradio application
โ”‚   โ”œโ”€โ”€ app.py                # Core application logic
โ”‚   โ”œโ”€โ”€ requirements.txt      # Python dependencies
โ”‚   โ”œโ”€โ”€ README.md            # Detailed app documentation
โ”‚   โ””โ”€โ”€ images/              # UI assets and examples
โ”œโ”€โ”€ modal/                    # Modal cloud functions
โ”‚   โ”œโ”€โ”€ flux-trellis-GGUF-text-to-3d.py  # 3D generation pipeline
โ”‚   โ””โ”€โ”€ README.md            # Modal setup documentation
โ”œโ”€โ”€ godot/                    # Godot game client
โ”‚   โ”œโ”€โ”€ project.godot        # Godot project configuration
โ”‚   โ”œโ”€โ”€ mcp.sh              # MCP communication script (Unix/macOS)
โ”‚   โ”œโ”€โ”€ mcp.bat             # MCP communication script (Windows)
โ”‚   โ”œโ”€โ”€ scenes/             # Game scenes (main, player, UI)
โ”‚   โ”œโ”€โ”€ scripts/            # GDScript files for game logic
โ”‚   โ”‚   โ”œโ”€โ”€ main.gd         # Main scene controller
โ”‚   โ”‚   โ”œโ”€โ”€ ui.gd           # User interface logic
โ”‚   โ”‚   โ”œโ”€โ”€ mcp.gd          # MCP client communication
โ”‚   โ”‚   โ””โ”€โ”€ 3Dgeneration.gd # 3D asset handling and placement
โ”‚   โ”œโ”€โ”€ assets/             # Generated 3D assets storage
โ”‚   โ””โ”€โ”€ models/             # Base 3D models and textures
โ”œโ”€โ”€ LICENSE                   # MIT License
โ””โ”€โ”€ README.md                # This file

๐Ÿ”ง Technical Details

AI Pipeline

  • Text Analysis: Claude Sonnet processes biographical text to extract personality traits and interests
  • Prompt Generation: AI creates detailed, contextual prompts for 3D asset generation
  • Asset Creation: FLUX + Trellis pipeline generates high-quality 3D models

Optimizations

  • GGUF Quantization: Reduces model size while maintaining quality
  • LoRA Models: Hyper FLUX 8Steps for faster inference, Game Assets LoRA for better 3D results
  • Modal Scaling: Automatic scaling for concurrent requests

๐Ÿ† Hackathon Team

  • castlebbs@ - Gradio, Modal
  • stargarnet@ - Godot
  • zinkenite@ - 3D work

Built with โค๏ธ for the 2025 Gradio Agent MCP Hackathon

Links

Tools

No tools

Comments