StudyPilot MCP Server
README.md
# š StudyPilot AI
**A secure, full-stack multi-agent study assistant** ā paste your notes, get a quiz, get graded, and track your progress over time. Built for the **Google Ć Kaggle AI Agents: Intensive Vibe Coding Capstone Project** (Freestyle Track).



---
## šÆ What It Does
StudyPilot AI turns raw study notes into a full learning loop:
1. **Paste or upload your notes** in the Study Lab
2. An **agent pipeline** sanitizes the input, extracts key facts, and generates a quiz
3. **Take the quiz** ā questions are built directly from real sentences in your notes
4. **Get graded instantly**, with explanations that quote your original notes back to you
5. **Track your progress** over time on the Dashboard, with full history of every attempt
Runs **completely offline** in high-fidelity Simulation Mode ā no API key required. Optionally connect a free Gemini API key for live LLM-powered generation.
---
## š¼ļø Screenshots
> *(Add your dashboard, quiz, and feedback screenshots here)*
| Dashboard | Quiz Session | Feedback Hub |
|---|---|---|
|  |  |  |
---
## š§ Multi-Agent Architecture
StudyPilot AI is built on an **ADK-style multi-agent system**, where each agent has a single clear responsibility and hands off to the next:
```
User Notes
ā
ā¼
āāāāāāāāāāāāāāāāāāāāāāā
ā Notes Extractor ā ā validates, sanitizes, extracts key terms & facts
ā Agent ā
āāāāāāāāāāā¬āāāāāāāāāāāāā
ā¼
āāāāāāāāāāāāāāāāāāāāāāā
ā Quiz Generator ā ā builds fact-based questions from real note content
ā Agent ā
āāāāāāāāāāā¬āāāāāāāāāāāāā
ā¼
āāāāāāāāāāāāāāāāāāāāāāā
ā Grader / Feedback ā ā scores answers, explains mistakes using source text
ā Agent ā
āāāāāāāāāāā¬āāāāāāāāāāāāā
ā¼
āāāāāāāāāāāāāāāāāāāāāāā
ā Progress Tracker ā ā logs attempts, tracks trends, flags weak topics
ā Agent ā
āāāāāāāāāāāāāāāāāāāāāāā
```
### Key Concepts Demonstrated
| Concept | Implementation |
|---|---|
| **Multi-Agent System (ADK)** | `BaseAgent` class + 4 specialized sub-agents coordinating in a pipeline |
| **MCP Server** | `mcp_server.py` exposes agent capabilities (`extract_notes`, `generate_quiz`, `grade_answers`) as MCP tools over JSON-RPC |
| **Security Features** | `safety_filter.py` ā input size validation, prompt-injection heuristics, HTML/script sanitization before any content reaches an agent |
| **Agent Skills** | Reusable skill modules (`safety_filter`, `db_store`) declared and used across agents |
| **Deployability** | Single-command local deployment via Flask, `localhost:3000` |
---
## š ļø Tech Stack
- **Backend:** Python, Flask
- **Frontend:** HTML, CSS, vanilla JS, Chart.js
- **Data Storage:** Lightweight JSON file store (`db.json`)
- **AI Integration:** Optional Google Gemini API (`google-genai`), with full offline simulation fallback
- **Protocol:** Model Context Protocol (MCP) server for agent tool exposure
---
## š Getting Started
### Prerequisites
- Python 3.9+
- pip
### Installation
```bash
git clone https://github.com/Anchal-Verma04/studypilot-ai.git
cd studypilot-ai
pip install -r requirements.txt
```
### Run the app
```bash
python src/server.py
```
Then open your browser at:
```
http://localhost:3000
```
That's it ā no API key needed. The app runs fully offline in **Simulation Mode**.
### (Optional) Enable live Gemini AI
1. Get a free API key at [aistudio.google.com/apikey](https://aistudio.google.com/apikey)
2. Copy `.env.example` to `.env`
3. Add your key:
```
GEMINI_API_KEY=your_key_here
```
4. Restart the server
---
## š Project Structure
```
studypilot-ai/
āāā src/
ā āāā agents/
ā ā āāā base_agent.py
ā ā āāā notes_extractor_agent.py
ā ā āāā quiz_generator_agent.py
ā ā āāā grader_agent.py
ā ā āāā progress_tracker_agent.py
ā āāā skills/
ā ā āāā safety_filter.py
ā ā āāā db_store.py
ā āāā public/
ā ā āāā index.html
ā ā āāā styles.css
ā ā āāā app.js
ā āāā mcp_server.py
ā āāā server.py
ā āāā test_agents.py
āāā db.json
āāā requirements.txt
āāā .env.example
āāā README.md
```
---
## š Security Notes
- All user-submitted notes pass through **size validation** and **prompt-injection heuristics** before reaching any agent
- Content is **HTML-sanitized** to prevent script injection in the UI
- No credentials are hardcoded ā API keys are loaded from a local `.env` file (never committed to version control)
---
## š About This Project
Built as the capstone project for Google & Kaggle's **5-Day AI Agents: Intensive Vibe Coding Course** (Freestyle Track), demonstrating multi-agent orchestration, MCP server design, agent skills, and security-conscious agent architecture ā developed using **Antigravity IDE**.
---
## š License
MIT License ā free to use, modify, and learn from.
This server cannot be deployed
Maintenance
ActivityStale
ResponsivenessNo issues