explainor / README.md
Emperor555's picture
Add real MCP server integration + docs
196685d
|
raw
history blame
4.64 kB

๐ŸŽญ Explainor

Learn anything through the voice of your favorite characters!

MCP Hackathon Track Category

Tags: mcp-in-action-track-creative


๐ŸŒŸ What is Explainor?

Explainor is an AI agent that takes any topic you want to learn about and explains it through the voice of fun characters! Choose from 6 unique personas:

Persona Style
๐Ÿ‘ถ 5-Year-Old Simple words, excited, curious questions
๐Ÿ‘จโ€๐Ÿณ Gordon Ramsay Intense, food metaphors, "It's RAW!"
๐Ÿดโ€โ˜ ๏ธ Pirate "Arrr!", treasure metaphors, swashbuckling
๐ŸŽญ Shakespeare Dramatic, old English, theatrical
๐Ÿ„ Surfer Dude "Brooo", chill vibes, wave metaphors
๐Ÿง™ Yoda Inverted syntax, wise, Force references

๐ŸŽฌ Demo

[Demo Video Placeholder]

๐Ÿ› ๏ธ How It Works

  1. Enter a topic - Anything from "Quantum Computing" to "How do volcanoes work?"
  2. Choose a persona - Pick your favorite character
  3. Choose your audience - Who are you explaining to?
  4. Watch the magic - The AI agent:
    • ๐Ÿ” Researches your topic using web search
    • ๐Ÿ“‹ Extracts key facts from sources
    • ๐ŸŽญ Transforms the explanation into the character's voice
    • ๐Ÿ”Š Reads it aloud with a matching voice!

๐Ÿ‘ค Who's Listening?

Make the explanation even more tailored by choosing your audience:

Audience Effect
๐Ÿ‘ค Just me Standard explanation
๐Ÿ‘ต My confused grandmother Extra simple, patient
๐Ÿค– A skeptical robot Logical, evidence-based
๐Ÿ‘ฝ An alien visiting Earth Explain Earth concepts
๐ŸงŸ A zombie Very short, simple words
๐ŸฆŠ A very smart fox Clever, quick
๐Ÿ‘” A stressed CEO Bottom-line focused
๐ŸŽฎ A distracted gamer Keep it engaging

๐Ÿ”Œ MCP Server Integration

This app is a real MCP server! When running, it exposes its functionality as tools that other AI agents can call via the Model Context Protocol.

MCP Endpoint: http://localhost:7860/gradio_api/mcp/

This means:

  • Other AI agents can use Explainor as a tool
  • Enables agent-to-agent communication
  • Part of the growing MCP ecosystem

๐Ÿš€ Tech Stack

  • MCP: Model Context Protocol - App exposes itself as an MCP server
  • LLM: Nebius AI - Llama 3.3 70B for intelligent explanations
  • TTS: ElevenLabs - Realistic voice synthesis with character-matched voices
  • Web Search: DuckDuckGo API for topic research
  • Frontend: Gradio with MCP integration
  • Deployment: Modal - Serverless infrastructure

๐Ÿ’ป Local Development

Prerequisites

  • Python 3.11+
  • Nebius API key
  • ElevenLabs API key

Setup

# Clone the repository
git clone https://huggingface.co/spaces/MCP-1st-Birthday/explainor

# Install dependencies
pip install -r requirements.txt

# Set up environment variables
cp .env.example .env
# Edit .env with your API keys

# Run locally
python app.py

Environment Variables

NEBIUS_API_KEY=your_nebius_api_key_here
ELEVENLABS_API_KEY=your_elevenlabs_api_key_here

๐ŸŒ Deployment

Modal Deployment

# Set up Modal secrets
modal secret create nebius-api-key NEBIUS_API_KEY=your_key
modal secret create elevenlabs-api-key ELEVENLABS_API_KEY=your_key

# Deploy
modal deploy modal_app.py

Hugging Face Spaces

This app is designed to run on Hugging Face Spaces with the Gradio SDK.

๐Ÿ“ Project Structure

explainor/
โ”œโ”€โ”€ app.py              # Main Gradio application
โ”œโ”€โ”€ modal_app.py        # Modal deployment config
โ”œโ”€โ”€ requirements.txt    # Python dependencies
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ personas.py     # Persona definitions & voice mappings
โ”‚   โ”œโ”€โ”€ agent.py        # Agent logic & web search
โ”‚   โ””โ”€โ”€ tts.py          # ElevenLabs integration
โ””โ”€โ”€ README.md

๐Ÿ† Hackathon Submission

  • Event: MCP's 1st Birthday Hackathon
  • Track: MCP in Action (Track 2)
  • Category: Creative
  • Team: kaiser-data
  • Sponsor Integration: ElevenLabs for text-to-speech

๐Ÿ“ License

MIT License - Feel free to use and modify!


Made with โค๏ธ for MCP's 1st Birthday Hackathon