Spaces:
Running
A newer version of the Gradio SDK is available:
6.1.0
title: Gnosis Tutor
emoji: π
colorFrom: blue
colorTo: purple
sdk: gradio
sdk_version: 6.0.0
app_file: app.py
pinned: false
license: mit
short_description: AI tutor that parses lectures and creates quizzes
tags:
- mcp-in-action-track-consumer
- mcp-in-action-track-creative
- education
- quiz
- nlp
- llm
π Gnosis Tutor - AI-Powered Learning Platform
Gnosis (Greek: ΞΞ½ΟΟΞ· - Knowledge) is an intelligent tutoring system that transforms lecture slides, research papers, and educational documents into interactive learning experiences. Built with Gradio 6 and MCP (Model Context Protocol) for seamless AI-powered tutoring.
π₯ Demo Video: Check out the demo video in the Welcome tab of the app! The video file (
demo.mp4) is included in this repository and can be viewed directly from the application interface.
π± Social Media: View my LinkedIn post about building Gnosis for the hackathon
π Features
Web Application Features
- π Document Analysis: Upload PDF lecture slides and automatically extract key concepts, topics, and structure
- π― Concept Extraction: AI-powered extraction of programming and CS concepts from educational content
- β Interactive Quiz Generation: Generate multiple-choice quizzes based on extracted concepts with immediate feedback
- π Curriculum Builder: Create structured learning paths with progressive exercises
- π Resource Discovery: Find relevant documentation, tutorials, and learning materials
- π¬ Socratic Tutoring: Get guided learning through questions instead of direct answers
- π€ Multi-LLM Support: Choose from Gemini, OpenAI, Anthropic, or HuggingFace models
MCP Server Integration
- π MCP Server: Connect Gnosis to Cursor IDE or Claude Desktop via SSE/HTTP
- π οΈ Coding Exercises: Generate complete exercise packages with starter code, tests, and hints
- π Code Analysis: Get feedback on your code and understand what you've learned
- π Guided Learning: Socratic method tutoring for programming concepts
π How It Works
Web Application Flow
- Setup: Select your LLM provider and enter your API key in the Welcome tab
- Learn: Chat with Gnosis about what you want to learn, or upload a PDF document
- Extract: AI automatically extracts concepts, topics, and key points from your content
- Practice: Generate interactive quizzes to test your understanding
- Explore: Use curriculum builder, resource search, or Socratic tutoring for deeper learning
MCP Integration Flow
- Connect: Add Gnosis to your
~/.cursor/mcp.jsonor Claude config - Use: Simply ask the AI to generate quizzes, exercises, or learning paths
- Learn: Complete coding exercises with real-time feedback and guidance
π οΈ Technology Stack
- Gradio 6.0: Modern, interactive web interface with built-in MCP server support
- MCP (Model Context Protocol): Enables seamless integration with Cursor IDE and Claude Desktop
- Multi-LLM Support: Gemini, OpenAI, Anthropic, and HuggingFace API integration
- PDF Processing: Document parsing and concept extraction from educational materials
- Python: Core backend with modular architecture for extensibility
π Documentation
Getting Started
- Access the App: Visit the HuggingFace Space
- Watch the Demo: Check out the demo video in the Welcome tab
- Set Up API Key:
- Choose your LLM provider (Gemini recommended for free tier)
- Enter your API key
- Click "Save & Connect"
Using the Web Application
Chat Interface
- Type questions or topics you want to learn about
- Upload PDF documents for automatic concept extraction
- Get instant responses with explanations and examples
Quiz Generation
- Ask "Generate a quiz on [topic]" or use the Quick Actions panel
- Answer questions and get immediate feedback
- Navigate through questions with Previous/Next buttons
- View your score and explanations
Sidebar Features
- Extracted Data: View concepts, topics, and key points from uploaded documents
- MCP Server: Setup instructions for connecting to Cursor or Claude Desktop
- Quick Actions: One-click quiz, curriculum, or resource generation
MCP Server Setup
For Cursor IDE
Add to ~/.cursor/mcp.json:
{
"mcpServers": {
"gnosis": {
"url": "https://mcp-1st-birthday-gnosis.hf.space/gradio_api/mcp/sse"
}
}
}
For Claude Desktop
Add similar configuration to your Claude config file.
Available MCP Tools
generate_quiz: Create quizzes on any topicgenerate_curriculum: Build progressive learning pathsgenerate_exercise: Create coding exercises with testssearch_resources: Find documentation and tutorialsask_guiding_question: Get Socratic tutoring helpanalyze_code: Get feedback on your code
API Endpoints
The app exposes several API endpoints for MCP integration:
submit_chat: Main chat endpointgenerate_quiz: Generate quiz questionsgenerate_curriculum: Create learning curriculumgenerate_exercise: Create coding exercisessearch_resources: Search for learning resourcesask_guiding_question: Get guiding questionsanalyze_code: Analyze student codehandle_quiz_submit: Submit quiz answersnext_question/prev_question: Navigate quiz questionssave_api_key: Save LLM provider API key
π Use Cases
- Students: Transform lecture notes into practice quizzes
- Educators: Quickly generate quiz questions from course materials
- Self-Learners: Create personalized study materials from any educational PDF
- Review Sessions: Generate targeted practice questions for exam preparation
π― Hackathon Submission
This project is submitted to the MCP 1st Birthday Hackathon organized by Hugging Face and Gradio.
Submission Details
- Track: MCP in Action (Consumer & Creative categories)
- Project Name: Gnosis Tutor
- Demo Video: Available in the Welcome tab of the app (
demo.mp4in repository) - Social Media: LinkedIn Post
Key Features Demonstrated
- β Autonomous agent behavior through intelligent document analysis
- β MCP server integration with SSE/HTTP transport
- β Multiple MCP tools for educational purposes
- β Practical educational value for students and learners
- β Beautiful, modern UI with glassmorphism design
- β Multi-LLM provider support
Project Journey
Built in one week as my first hackathon project, learning MCP and Gradio from scratch. The project demonstrates rapid learning and application of new technologies under tight time constraints.
π§ Setup & Installation
Running on HuggingFace Spaces
The app is automatically deployed and runs on HuggingFace Spaces. No setup required!
Running Locally
- Clone the repository:
git clone https://huggingface.co/spaces/MCP-1st-Birthday/Gnosis
cd Gnosis
- Install dependencies:
pip install -r requirements.txt
- Run the application:
python app.py
- Set up API keys (optional, can be set in the UI):
- Set environment variables or use the in-app API key configuration
- Supported providers: Gemini, OpenAI, Anthropic, HuggingFace
Project Structure
Gnosis/
βββ app.py # Main Gradio application
βββ mcp_server.py # MCP server implementation
βββ core/ # Core functionality
β βββ state.py # Global state management
β βββ mcp_client.py # MCP client integration
β βββ helpers.py # Helper functions
βββ handlers/ # Event handlers
β βββ chat_handlers.py # Chat interaction handlers
β βββ quiz_handlers.py # Quiz generation and management
β βββ content_handlers.py # Content extraction handlers
β βββ mcp_handlers.py # MCP tool handlers
βββ ui/ # UI components and styling
β βββ components.py # UI component functions
β βββ styles.css # Custom CSS styling
βββ utils/ # Utility modules
β βββ tutor.py # Core tutoring logic
β βββ quiz_generator.py # Quiz generation
β βββ llm_client.py # LLM client wrapper
βββ demo.mp4 # Demo video (viewable in app)
π License
MIT License - Feel free to use and modify for your own projects!
π License
MIT