Labsco
MCP SERVER

PAF-IAST LMS Automation

by QaziAbsaar

Ask your assistant about attendance, marks or the timetable — it logs into the PAF-IAST student portal and reads them for you.

Education, Tutoring & Study Tools
Summary
Built for one portal, and honest about it.

This is scraping a specific university's LMS through a real browser, which means it works exactly as well as that site's markup allows and will need attention when the site changes. The parts worth borrowing regardless are the session handling — persisted, encrypted, with an expiry — and the two-tier CAPTCHA approach that falls back to OCR when no vision key is configured. Your student credentials sit in a local file, so treat the machine accordingly.

What it is

A browser-automation server for one university's learning management system. It logs in on your behalf, solving the CAPTCHA on the way, keeps the session, and exposes the student pages — attendance, marks, timetable and applications — as tools.

What you get
  • `login_to_lms` signs in with your stored credentials and handles the CAPTCHA; `logout_lms` ends the session
  • `check_attendance` returns attendance records broken down by subject
  • `get_marks` returns exam scores and assessments
  • `get_timetable` returns the class schedule
  • `create_application` submits a university application and `view_application_status` checks where it got to
  • `solve_captcha` for the case where the automatic pass needs help
  • Sessions persist and restore between runs, stored encrypted, with an expiry you set
Requirements

Python 3.11 or higher, Git and a Chrome installation, since the work is done by driving a real browser. Install with `uv sync` or `pip install -e .`, then put your portal credentials in a `.env` as `LMS_USERNAME` and `LMS_PASSWORD`. `GEMINI_API_KEY` is optional and improves CAPTCHA accuracy through vision; without it the fallback is OCR. `BROWSER_HEADLESS` controls whether you watch it work, `SESSION_EXPIRY_HOURS` defaults to 24 and `ENCRYPT_SESSIONS` keeps the stored session encrypted.