Skip to main content
Glama

πŸŽ“ Student Assistant MCP (Model Context Protocol) Server & Groq Client

A complete, production-ready Python MCP project built with FastMCP and Groq LLM Client that provides intelligent student assistance for academic calculations, attendance tracking, marks analysis, and syllabus reading.


πŸ“ Project Structure

student_assistant_mcp/
β”œβ”€β”€ server.py              # Main FastMCP server registering all tools
β”œβ”€β”€ client_groq.py         # Groq LLM client with MCP tool-calling loop
β”œβ”€β”€ requirements.txt       # Python dependencies (mcp, groq, pandas, pypdf)
β”œβ”€β”€ .env.example           # Environment template
β”œβ”€β”€ tools/
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ calculator.py      # Prompt 2: Math, GPA, and attendance deficit tool
β”‚   β”œβ”€β”€ attendance.py      # Prompt 3: Attendance CSV reader & defaulter tool
β”‚   β”œβ”€β”€ marks.py           # Prompt 4: Marks CSV reader & averages calculator
β”‚   └── pdf_reader.py      # Prompt 5: PyPDF syllabus extractor & keyword search
└── data/
    β”œβ”€β”€ attendance.csv     # Student attendance records dataset
    β”œβ”€β”€ marks.csv          # Student marks, totals, grades, and ranks
    └── sample_syllabus.pdf # Course syllabus document

Related MCP server: Horizon

πŸš€ Quickstart Guide

1. Prerequisites

  • Python 3.10+ installed

  • A free Groq API Key (for client_groq.py)

2. Create Virtual Environment & Install Dependencies

# Create virtual environment
python3 -m venv venv

# Activate virtual environment
# On Linux/macOS:
source venv/bin/activate
# On Windows:
venv\Scripts\activate

# Install required packages
pip install -r requirements.txt

3. Configure Environment Variables

cp .env.example .env
# Edit .env and paste your GROQ_API_KEY

4. Run the FastMCP Server

python server.py

Or run in development mode with MCP Inspector:

mcp dev server.py

5. Run the Groq Student Assistant Client

In a separate terminal:

python client_groq.py

πŸ› οΈ MCP Tools Overview

Tool Name

Prompt

Description

calculate

Prompt 2

Safe math evaluation, arithmetic, and GPA formulas

calculate_target_attendance

Prompt 2

Calculates consecutive classes needed to reach 75%

get_attendance

Prompt 3

Look up student attendance from attendance.csv

list_attendance_defaulters

Prompt 3

List all students with attendance below 75%

get_marks

Prompt 4

Retrieve subject scores, grade, and rank from marks.csv

get_marks_averages

Prompt 4

Compute class averages and top score per subject

read_pdf

Prompt 5

Extract syllabus text using pypdf.PdfReader

search_pdf

Prompt 5

Search syllabus for grading policy or exam dates


πŸ§ͺ Example Queries for the Student Assistant

  • "What is Alice Johnson's attendance and marks rank?"

  • "Bob Smith has 68% attendance. How many more classes must he attend to reach 75%?"

  • "What are the class averages in Computer Science and Math?"

  • "Search the syllabus PDF for the final exam date and grading breakdown."

A
license - permissive license
-
quality - not tested
C
maintenance

Maintenance

–Maintainers
–Response time
–Release cycle
–Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • MCP server providing access to the Scorecard API to evaluate and optimize LLM systems.

  • Hosted MCP server for LLM cost estimation, model comparison, and budget-aware routing.

  • MCP server for AI dialogue using various LLM models via AceDataCloud

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Keerthana15-bit/mcp-student-assistance'

If you have feedback or need assistance with the MCP directory API, please join our Discord server