MCP Student Assistant
An MCP server that provides student-focused tools such as attendance lookup, marks calculation, notes search, college rules access, and a math calculator, with a natural-language CLI client powered by Groq's Llama 3.3 70B.
README
š MCP Student Assistant
An AI-powered Student Assistant built with the Model Context Protocol (MCP). It exposes a set of student-focused tools ā attendance lookup, marks calculator, notes search, college rules, and a math calculator ā through an MCP server, with a companion CLI client powered by Groq's Llama 3.3 70B for natural-language interaction.
⨠Features
| Tool | Description |
|---|---|
| Calculator | Evaluate arbitrary math expressions (e.g. 45*12+5) |
| Attendance | Look up a student's attendance record from attendance.csv |
| Marks | Compute a student's average across Math, Physics, Chemistry, Java & Python |
| Notes Search | Search for keywords inside notes.pdf |
| College Rules | Display all college rules from rules.txt |
For questions that don't match any tool, the client falls back to Groq's Llama 3.3 70B model for general-purpose answers.
š Project Structure
MCP/
āāā server.py # MCP server ā registers all tools
āāā client.py # CLI client ā keyword routing + Groq fallback
āāā attendance.py # Attendance lookup (pandas + CSV)
āāā marks.py # Average marks calculator (pandas + CSV)
āāā notes.py # Keyword search across PDF notes
āāā pdf_reader.py # PDF text extraction (pypdf)
āāā calculator.py # Simple eval-based calculator
āāā rules.py # Reads college rules from a text file
āāā requirements.txt # Python dependencies
āāā .env # Environment variables (GROQ_API_KEY)
āāā data/
āāā attendance.csv # Student attendance records
āāā marks.csv # Student marks (5 subjects)
āāā notes.pdf # Course notes (PDF)
āāā notes.txt # Course notes (plain text)
āāā rules.txt # College rules
āāā students.csv # Student roster
š Getting Started
Prerequisites
- Python 3.10+
- A Groq API key (free tier available)
1. Clone the repository
git clone <repo-url>
cd MCP
2. Create a virtual environment (recommended)
python -m venv venv
# Windows
venv\Scripts\activate
# macOS / Linux
source venv/bin/activate
3. Install dependencies
pip install -r requirements.txt
4. Configure environment variables
Create a .env file in the project root (one is already included):
GROQ_API_KEY=your_groq_api_key_here
5. Run the application
Option A ā MCP Server (exposes tools over the MCP protocol):
python server.py
Option B ā CLI Client (interactive chat with keyword routing + Groq fallback):
python client.py
š¬ Usage Examples
Ask : What is Rahul's attendance?
ā {'Name': 'Rahul', 'Days_Present': 42, 'Total_Days': 50, ...}
Ask : Show me Priya's average marks
ā Average = 82.4
Ask : What are the college rules?
ā (displays all rules from rules.txt)
Ask : Search notes for machine learning
Keyword : machine learning
ā (matching lines from notes.pdf)
Ask : Calculate 25+50*2
ā 125
Ask : What is the capital of France?
ā (answered by Groq Llama 3.3 70B)
Ask : exit
ā (exits the program)
š ļø Tech Stack
- MCP (Model Context Protocol) ā tool registration & server
- Groq ā LLM inference (Llama 3.3 70B)
- pandas ā CSV data processing
- pypdf ā PDF text extraction
- python-dotenv ā environment variable management
š License
This project is for educational purposes.
Recommended Servers
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.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
Neon Database
MCP server for interacting with Neon Management API and databases
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
E2B
Using MCP to run code via e2b.