Student MCP Server

Student MCP Server

Enables an AI assistant to help students by providing tools for math calculations, attendance tracking, marks analysis, reading PDF notes, searching lecture notes, and checking college regulations.

Category
Visit Server

README

šŸŽ“ AI-Powered Student Assistant (Model Context Protocol + Groq + Web App)

An interactive, AI-driven educational platform built using Model Context Protocol (MCP), Groq LLM (llama-3.3-70b-versatile), Python 3.11+, and a modern Glassmorphic Web Dashboard.


🌟 Project Features

  • Model Context Protocol (MCP): Standardized protocol connecting AI reasoning with local file tools & calculations.
  • Groq LLM Power: Blazing fast inference for autonomous tool selection and response synthesis.
  • 6 Built-in Educational MCP Tools:
    1. 🧮 Calculator: Evaluates math expressions, percentage weights, and GPA formulas.
    2. šŸ“Š Attendance Tracker: Analyzes student attendance records from attendance.csv, detects shortages (<75%), and predicts required classes.
    3. šŸ“ˆ Marks Analyzer: Computes averages, top scores, letter grades, and performance rankings from marks.csv.
    4. šŸ“„ PDF Reader: Extracts text and searches content from lecture PDF files (notes.pdf).
    5. šŸ” Lecture Notes Search: Keyword and concept search across course revision notes.
    6. šŸ“œ College Regulations Checker: Queries official college handbook (rules.txt) for attendance rules, grading scales, and library policies.
  • Interactive Web Interface (Frontend):
    • Dark glassmorphism design with responsive tabs.
    • Live MCP Protocol Visual Trace: Step-by-step pipeline view showing User Prompt -> Groq LLM -> MCP Server -> Tool Run -> Answer.
    • Interactive Analytics Modules: Marks Report Card, Attendance Shortage Predictor, Searchable Rules Explorer, PDF Viewer, and MCP Tool Sandbox.
    • Offline Simulation Mode: Browser fallback engine that works out-of-the-box even before adding an API key!

šŸ—ļø Architecture Overview

User Query
    │
    ā–¼
Frontend Web Dashboard (HTML/CSS/JS)
    │
    ā–¼
FastAPI Server (backend/api.py)
    │
    ā–¼
Groq LLM (llama-3.3-70b-versatile)
    │
    ā”œā”€ā–ŗ Intercepts Query & Selects Tool
    │
    ā–¼
MCP Client (backend/client.py)
    │
    ā–¼
MCP Server (backend/server.py via FastMCP)
    │
    ā”œā”€ā–ŗ calculator.py       (Math & GPA)
    ā”œā”€ā–ŗ attendance.py       (attendance.csv)
    ā”œā”€ā–ŗ marks.py            (marks.csv)
    ā”œā”€ā–ŗ pdf_reader.py       (notes.pdf)
    ā”œā”€ā–ŗ notes.py            (notes.txt)
    └─► rules.py            (rules.txt)
    │
    ā–¼
Groq Formats Natural Language Answer -> User

šŸ“ Project Directory Structure

student_mcp/
ā”œā”€ā”€ backend/
│   ā”œā”€ā”€ server.py             # FastMCP / MCP Server tool registry
│   ā”œā”€ā”€ client.py             # Groq LLM tool router & MCP integrator
│   ā”œā”€ā”€ api.py                # FastAPI web bridge for Frontend
│   ā”œā”€ā”€ calculator.py         # Calculation logic
│   ā”œā”€ā”€ attendance.py         # Attendance CSV parser
│   ā”œā”€ā”€ marks.py              # Marks CSV calculator
│   ā”œā”€ā”€ pdf_reader.py         # PDF text extractor (PyPDF)
│   ā”œā”€ā”€ notes.py              # Lecture notes search
│   ā”œā”€ā”€ rules.py              # College handbook search
│   ā”œā”€ā”€ prompts.py            # System prompts & tool definitions
│   ā”œā”€ā”€ requirements.txt      # Dependencies list
│   ā”œā”€ā”€ .env                  # Environment config (GROQ_API_KEY)
│   └── data/
│       ā”œā”€ā”€ attendance.csv    # Attendance dataset
│       ā”œā”€ā”€ marks.csv         # Marks dataset
│       ā”œā”€ā”€ notes.pdf         # Sample academic PDF notes
│       ā”œā”€ā”€ notes.txt         # Text notes reference
│       └── rules.txt         # Official college regulations handbook
│
ā”œā”€ā”€ frontend/
│   ā”œā”€ā”€ index.html            # Interactive Student Assistant Web Dashboard
│   ā”œā”€ā”€ styles.css            # Dark mode, glassmorphism & micro-animations
│   └── app.js                # App logic, chat UI, MCP protocol visual trace & tool sandbox
│
ā”œā”€ā”€ server.py                 # Root server entrypoint
ā”œā”€ā”€ client.py                 # Root terminal CLI client
ā”œā”€ā”€ create_pdf.py             # Utility to generate notes.pdf
ā”œā”€ā”€ requirements.txt          # Root dependencies
ā”œā”€ā”€ .env                      # Root environment variables
└── README.md                 # Complete documentation

⚔ Quick Start Guide

1. Install Dependencies

Ensure Python 3.11+ is installed, then run:

pip install mcp groq pandas pypdf python-dotenv fastapi uvicorn

Or install from requirements file:

pip install -r requirements.txt

2. Configure Groq API Key

  1. Sign up for a free account at https://console.groq.com.
  2. Create an API key (e.g. gsk_xxxxxxxxxxxxxxxx).
  3. Open .env and paste your key:
GROQ_API_KEY=gsk_xxxxxxxxxxxxxxxx

3. Run the Applications

Option A: Launch Interactive Web Dashboard (Recommended)

  1. Start the backend FastAPI server:
python backend/api.py

(Runs on http://localhost:8000)

  1. Open frontend/index.html in your web browser!

Option B: Run via Python CLI Client

Start the terminal client directly:

python client.py

Example queries to try:

  • "Calculate Rahul's average marks."
  • "Check Priya's attendance in Computer Networks."
  • "What is the minimum attendance required and condonation rule?"
  • "Search notes for Binary Search Tree."
  • "Calculate (88 * 0.25 + 92 * 0.30 + 95 * 0.45)."

Option C: Run MCP FastMCP Server

python server.py

šŸš€ Deployment (Easy Options)

Below are minimal options to deploy and run the whole app (backend + frontend) with a single command.

  1. Local single-process (recommended for development)
  • The backend now serves the frontend static files. Start only the backend:
# from project root
uvicorn backend.api:app --reload --host 0.0.0.0 --port 8000

# open http://localhost:8000 in your browser
  1. Docker (recommended for repeatable deploys)

Build and run the included Docker image:

docker build -t student-mcp .
docker run -p 8000:8000 student-mcp
  1. Cloud: push the Docker image to any container host (Render, Fly, Heroku Container Registry, Azure ACI) and deploy with their web UI.

Notes:

  • Set GROQ_API_KEY in environment (.env or container env) to enable Groq-powered question answering.
  • Use requirements.txt to reproduce Python dependencies.

šŸ› ļø MCP Tools Reference

Tool Name File Description Example Query
calculate_expression calculator.py Evaluates math formulas, percentages, GPA Calculate (92*0.4 + 88*0.6)
check_attendance attendance.py Reads attendance.csv, checks shortage (<75%) Check Rahul's attendance
get_marks_summary marks.py Reads marks.csv, computes student averages & grades Calculate Rahul's average marks
read_pdf_notes pdf_reader.py Extracts text from notes.pdf via PyPDF Search PDF for Dijkstra
search_lecture_notes notes.py Topic search across course notes Search notes for OSI model
search_college_rules rules.py Queries rules.txt for policies What is the attendance condonation policy?

šŸŽÆ Verification & Testing

Run unit checks on individual modules:

python backend/calculator.py
python backend/attendance.py
python backend/marks.py
python backend/rules.py

Enjoy building with Model Context Protocol (MCP) and Groq! šŸš€

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured