Spaces:
Sleeping
Sleeping
Commit
ยท
196685d
1
Parent(s):
d26d845
Add real MCP server integration + docs
Browse files- Enable mcp_server=True in Gradio launch() for actual MCP endpoint
- Update requirements.txt with gradio[mcp] dependency
- Document MCP server endpoint in README
- Add audience selection docs to README
MCP endpoint: http://localhost:7860/gradio_api/mcp/
๐ค Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- README.md +32 -4
- app.py +1 -0
- requirements.txt +1 -1
README.md
CHANGED
|
@@ -31,18 +31,46 @@ Explainor is an AI agent that takes any topic you want to learn about and explai
|
|
| 31 |
|
| 32 |
1. **Enter a topic** - Anything from "Quantum Computing" to "How do volcanoes work?"
|
| 33 |
2. **Choose a persona** - Pick your favorite character
|
| 34 |
-
3. **
|
|
|
|
| 35 |
- ๐ Researches your topic using web search
|
| 36 |
-
-
|
| 37 |
-
-
|
| 38 |
- ๐ Reads it aloud with a matching voice!
|
| 39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
## ๐ Tech Stack
|
| 41 |
|
|
|
|
| 42 |
- **LLM**: [Nebius AI](https://nebius.com) - Llama 3.3 70B for intelligent explanations
|
| 43 |
- **TTS**: [ElevenLabs](https://elevenlabs.io) - Realistic voice synthesis with character-matched voices
|
| 44 |
- **Web Search**: DuckDuckGo API for topic research
|
| 45 |
-
- **Frontend**: [Gradio](https://gradio.app)
|
| 46 |
- **Deployment**: [Modal](https://modal.com) - Serverless infrastructure
|
| 47 |
|
| 48 |
## ๐ป Local Development
|
|
|
|
| 31 |
|
| 32 |
1. **Enter a topic** - Anything from "Quantum Computing" to "How do volcanoes work?"
|
| 33 |
2. **Choose a persona** - Pick your favorite character
|
| 34 |
+
3. **Choose your audience** - Who are you explaining to?
|
| 35 |
+
4. **Watch the magic** - The AI agent:
|
| 36 |
- ๐ Researches your topic using web search
|
| 37 |
+
- ๐ Extracts key facts from sources
|
| 38 |
+
- ๐ญ Transforms the explanation into the character's voice
|
| 39 |
- ๐ Reads it aloud with a matching voice!
|
| 40 |
|
| 41 |
+
## ๐ค Who's Listening?
|
| 42 |
+
|
| 43 |
+
Make the explanation even more tailored by choosing your audience:
|
| 44 |
+
|
| 45 |
+
| Audience | Effect |
|
| 46 |
+
|----------|--------|
|
| 47 |
+
| ๐ค Just me | Standard explanation |
|
| 48 |
+
| ๐ต My confused grandmother | Extra simple, patient |
|
| 49 |
+
| ๐ค A skeptical robot | Logical, evidence-based |
|
| 50 |
+
| ๐ฝ An alien visiting Earth | Explain Earth concepts |
|
| 51 |
+
| ๐ง A zombie | Very short, simple words |
|
| 52 |
+
| ๐ฆ A very smart fox | Clever, quick |
|
| 53 |
+
| ๐ A stressed CEO | Bottom-line focused |
|
| 54 |
+
| ๐ฎ A distracted gamer | Keep it engaging |
|
| 55 |
+
|
| 56 |
+
## ๐ MCP Server Integration
|
| 57 |
+
|
| 58 |
+
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.
|
| 59 |
+
|
| 60 |
+
**MCP Endpoint:** `http://localhost:7860/gradio_api/mcp/`
|
| 61 |
+
|
| 62 |
+
This means:
|
| 63 |
+
- Other AI agents can use Explainor as a tool
|
| 64 |
+
- Enables agent-to-agent communication
|
| 65 |
+
- Part of the growing MCP ecosystem
|
| 66 |
+
|
| 67 |
## ๐ Tech Stack
|
| 68 |
|
| 69 |
+
- **MCP**: Model Context Protocol - App exposes itself as an MCP server
|
| 70 |
- **LLM**: [Nebius AI](https://nebius.com) - Llama 3.3 70B for intelligent explanations
|
| 71 |
- **TTS**: [ElevenLabs](https://elevenlabs.io) - Realistic voice synthesis with character-matched voices
|
| 72 |
- **Web Search**: DuckDuckGo API for topic research
|
| 73 |
+
- **Frontend**: [Gradio](https://gradio.app) with MCP integration
|
| 74 |
- **Deployment**: [Modal](https://modal.com) - Serverless infrastructure
|
| 75 |
|
| 76 |
## ๐ป Local Development
|
app.py
CHANGED
|
@@ -301,4 +301,5 @@ if __name__ == "__main__":
|
|
| 301 |
server_port=7860,
|
| 302 |
share=False,
|
| 303 |
css=CUSTOM_CSS,
|
|
|
|
| 304 |
)
|
|
|
|
| 301 |
server_port=7860,
|
| 302 |
share=False,
|
| 303 |
css=CUSTOM_CSS,
|
| 304 |
+
mcp_server=True, # Enable MCP server - exposes this app as an MCP tool!
|
| 305 |
)
|
requirements.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
gradio>=5.0.0
|
| 2 |
elevenlabs>=1.0.0
|
| 3 |
openai>=1.0.0
|
| 4 |
httpx>=0.25.0
|
|
|
|
| 1 |
+
gradio[mcp]>=5.0.0
|
| 2 |
elevenlabs>=1.0.0
|
| 3 |
openai>=1.0.0
|
| 4 |
httpx>=0.25.0
|