College AI Assistant
Provides MCP tools for searching student profiles, viewing marks/attendance, and finding low-attendance students. Enables AI assistants like Gemini to interact with college student data through natural language.
README
College AI Assistant
An interactive assistant for managing and querying college student information (profiles, marks, attendance) using an MCP-based tool server and Google Gemini.
Overview
College AI Assistant demonstrates a small local system with:
- an MCP tool server (
server.py) exposing student data and helper tools - a CLI assistant (
ai_agent.py) that uses Gemini plus MCP tools - a FastAPI wrapper (
api.py) for the browser UI - a simple static frontend in
web/ - a local SQLite database managed by
database.py
Features
- Search student profiles by name
- Retrieve detailed student information by ID
- View subject-wise marks, average marks, and academic performance
- View subject-wise attendance and attendance analysis
- Find students with attendance below a threshold
- Run the assistant from CLI, HTTP API, or web UI
Repository Structure
ai_agent.py— CLI client that starts an interactive assistant sessionapi.py— FastAPI app exposing/chatand health endpointsserver.py— MCP tool server with student data tools and promptsdatabase.py— SQLite helpers, schema creation, and sample data seedingconfig/settings.py— Gemini and MCP server configurationagent/— shared adapter code for integrating Gemini and MCP toolsweb/— static frontend:index.html,script.js,style.cssrequirements.txt— Python dependencies
Requirements
- Python 3.9+
- A valid Gemini API key
Install dependencies with:
pip install -r requirements.txt
Configuration
Create a .env file in the project root with:
GEMINI_API_KEY=your_gemini_api_key_here
Default Gemini model and MCP settings are configured in config/settings.py:
GEMINI_MODEL = "gemini-2.5-flash"MCP_SERVER_COMMAND = "python"MCP_SERVER_FILE = "server.py"
Setup & Run
- Initialize the database and seed sample data:
python database.py
- Start the MCP tool server:
python server.py
3a. Run the CLI assistant:
python ai_agent.py
3b. Or start the HTTP API for the web UI:
uvicorn api:app --reload --host 127.0.0.1 --port 8000
- Open
web/index.htmlin your browser. The UI sends chat requests tohttp://127.0.0.1:8000/chatby default.
API Endpoints
GET /— basic health checkGET /health— service statusPOST /chat— chat endpoint
Request body:
{ "message": "Hello", "session_id": "optional-session-id" }
Response body:
{ "session_id": "...", "response": "..." }
Notes
- The local SQLite database file is
college.db. - The web UI is a static front end and requires the FastAPI server to be running.
database.pycan be re-run to recreate tables and insert sample rows.
Troubleshooting
- If the web UI cannot connect, verify the API is running at
127.0.0.1:8000. - If Gemini fails due to quota or authentication, check
GEMINI_API_KEYand your Gemini account settings.
Optional Improvements
- Add
docker-compose.ymlfor streamlined startup - Add a
Makefileor PowerShell script for common commands - Add tests for the API and MCP tools
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.
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.
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.
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
E2B
Using MCP to run code via e2b.
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.