Emperor555 Claude commited on
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>

Files changed (3) hide show
  1. README.md +32 -4
  2. app.py +1 -0
  3. 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. **Watch the magic** - The AI agent:
 
35
  - ๐Ÿ” Researches your topic using web search
36
- - ๐Ÿง  Shows its reasoning process
37
- - โœ๏ธ Transforms the explanation into the character's voice
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) - Beautiful, responsive UI
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