uniboh
Summary: uniboh is an MCP server that exposes University of Bologna services (Virtuale Moodle, corsi timetables, AlmaEsami, RPS attendance, Studenti Online) through read-only tools plus unified session/authentication management.
Sessions & auth: log in via headless-Chromium ADFS SSO across all services (
unibo_browser_login/virtuale_browser_login), plain Moodle password login (virtuale_login_with_password), bootstrap sessions from pasted cookies/sesskey (*_bootstrap_session), mint env-backed sessions (*_get_env_session), inspect session metadata (virtuale_get_session_info) and drop sessions (virtuale_logout_session).Virtuale (Moodle): health check, enrolled courses, course state, token-friendly course file/resource listing, Panopto block content, fetch/download resources or extract PDF text by
cmid/URL, list quizzes, list attempts, fetch finished attempt reviews, and sync new reviews into a local quiz bank.Timetable/calendar (public, no auth): resolve a corsi.unibo.it timetable URL from a course page, list curricula and teachings, fetch raw events (optional teaching-code filter), and export an ICS calendar.
AlmaEsami (read-only): exam plan, exam history/cronologia, messages, and an unverified/WIP appelli (bookable sessions) listing — never books.
RPS (read-only): attendance records (rilevazioni) and per-subject attendance register/percentage.
Studenti Online (read-only): career/home summary and the catalogue of available service tiles — never pays, enrolls, or submits requests.
Provides tools for interacting with a Moodle instance, including authentication, session management, retrieving enrolled courses, course state, and Panopto content.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@uniboh list my enrolled courses on Virtuale"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
uniboh — Unibo MCP Server
A Model Context Protocol server (stdio transport, TypeScript) that exposes University of Bologna services to MCP clients. Today it covers:
virtuale.unibo.it — the Unibo Moodle instance, via its
service.phpAJAX API (enrolled courses, course state, file/resource download, Panopto content).corsi.unibo.it — public course timetables, normalized to events and exported as an ICS calendar.
almaesami.unibo.it — student exam plan, history, messages, and upcoming appelli, read-only.
rps.unibo.it — student attendance ("Presenze studenti"): records and register, read-only.
studenti.unibo.it — Studenti Online (SOL): career summary and service catalogue, read-only.
The longer-term goal is to wrap any Unibo service behind one MCP server — see CLAUDE.md.
Install
npm install
npm run buildRelated MCP server: mcpUPB
Run
Stdio transport, for use by an MCP client.
No credentials (health check + calendar tools only):
npm run devWith a preloaded session (enables the authenticated Virtuale tools):
VIRTUALE_BASE_URL="https://virtuale.unibo.it" \
VIRTUALE_SESSKEY="your_sesskey" \
VIRTUALE_COOKIES="MoodleSession=...; other_cookie=..." \
npm run devnpm run start runs the compiled dist/server.js instead of tsx.
Environment variables
Variable | Required | Purpose |
| no (defaults to | Moodle base URL. |
| no | Moodle |
| no | Cookie header (e.g. |
| no (defaults to | AlmaEsami base URL. |
| no | Cookie header with an authenticated |
| no (defaults to | RPS base URL. |
| no | Cookie header with an authenticated |
| no (defaults to | Studenti Online base URL. |
| no | Cookie header with an authenticated |
| no | Unibo SSO email; with |
| no | Unibo SSO password. Only works for accounts without interactive MFA. On macOS, leave it unset and store it in the Keychain instead (read at startup): |
Authentication
All three authenticated services (Virtuale, AlmaEsami, RPS) federate to the same
idp.unibo.it ADFS SSO, so a single unified in-memory session store holds per-service
credentials: one session_id can carry a Virtuale sesskey+cookies, an AlmaEsami
JSESSIONID, and an RPS PHPSESSID at once. Authenticated Virtuale tools need both a
sesskey and a cookie header; AlmaEsami/RPS need only their host cookie. Ways to provide them:
Env vars —
VIRTUALE_SESSKEY+VIRTUALE_COOKIES,ALMAESAMI_COOKIES,RPS_COOKIES, set once at startup.EMAIL+PASSWORD, automatic — when nosession_id/env credentials are given, the server drives a real headless Chromium through Unibo's ADFS SSO flow (Home Realm Discovery → AD login), then reuses the same shared IdP session to complete the AlmaEsami, RPS and SOL SAML handshakes too, capturing every host's cookies automatically and remembering that session as the default. Best-effort per service. Only works for accounts without interactive MFA.unibo_loginruns the same login explicitly. Seescripts/test-browser-login.mjsto verify your account works before wiring it into an MCP client.unibo_bootstrap_session— paste credentials grabbed from a logged-in browser (service+cookies, plussesskeyfor Virtuale); returns asession_id. The reliable path for accounts with MFA. The cookie is never echoed back.
Precedence per call: explicit cookies > explicit session_id > env vars > the default browser-login session > automatic login (if EMAIL + PASSWORD are set) > error.
Auto re-login. When EMAIL + PASSWORD are set and a call fails because the session
expired, the server transparently re-runs the headless browser login once, updates the stored
credentials, and retries the call — but only for env-backed or browser-login
sessions (credentials that are ours to refresh), never for pasted unibo_bootstrap_session
credentials. Concurrent expiries share a single in-flight re-login so an expiry storm triggers
at most one browser login.
Session data is kept in server memory only and is never written to disk. Treat sesskey + cookies as account-bound secrets.
Keeping secrets out of the model's context
If credentials are set via env vars (VIRTUALE_SESSKEY/VIRTUALE_COOKIES, ALMAESAMI_COOKIES, RPS_COOKIES), every tool already falls back to them silently when a call omits cookies/session_id — the model never has to see or pass the secret at all.
If you'd rather the model work with an explicit handle, call unibo_login (takes only an optional force_relogin); it reads EMAIL/PASSWORD server-side and returns only an opaque session_id that works across every authenticated tool. The underlying secret is never included in the response.
unibo_bootstrap_session takes credentials as tool input (by design, since you're supplying them inline), so those do pass through the model's context; it never echoes the pasted cookie back.
Tools
Session management
unibo_login— normally unnecessary (tools log in automatically whenEMAIL/PASSWORDare set). Mint/reuse onesession_id(usable across all authenticated tools) by driving a headless Chromium through ADFS SSO and completing every service's SAML handshake off the shared IdP session; never returns the password/sesskey/cookies, and reports per-service success. No interactive-MFA support. Optionalforce_relogin.unibo_bootstrap_session— build a session from pasted credentials:service(virtuale/almaesami/rps/sol) +cookies(+sesskeyfor Virtuale); the cookie is never echoed back.unibo_get_session_info— stored session metadata (origin, which services it carries, optionally the cookie headers).unibo_logout— drop one session from memory.virtuale_health_check— reports{ok, reachable, authenticated}(no-login probe; if credentials already exist, also a 1-course authenticated call; never starts a login).
Virtuale (authenticated)
virtuale_get_enrolled_courses— wrapslocal_uniboapi_get_enrolled_courses_unibo; HTML summaries, base64 course images and other bulky fields are stripped.virtuale_get_course_state— wrapscore_courseformat_get_state, parses the state JSON (bulky HTML/icon fields stripped, long strings truncated).virtuale_list_course_files— slimscore_courseformat_get_statedown to the downloadable files/resources, grouped by section (cmid,name,modname,url) — a token-friendly view; feed acmidtovirtuale_get_resource.virtuale_get_panopto_content— wrapsblock_panopto_get_content.
Each accepts an optional session_id; if omitted, the env-var session is used.
virtuale_get_resource— fetches a course file/resource bycmid(builds/mod/resource/view.php?id=<cmid>) or an expliciturl, following the redirect to the protectedpluginfile.phpcontent. Always returns metadata (final URL, content-type, size, filename); withsave_to(an absolute path) it streams the file to disk, otherwise it returns text inline for text-like files and extracts + returns the text of PDFs (long text is truncated — passsave_tofor the full file). Acceptssession_id,cookies(a header with an authenticatedMoodleSession), or falls back toVIRTUALE_COOKIES. Read-only.
Virtuale quizzes (authenticated, read-only)
mod_quiz_* isn't on the AJAX service allowlist, so these scrape the same HTML a browser
sees (course page → quiz page → attempt review page). Each accepts session_id,
cookies (a cookie header with an authenticated MoodleSession), or falls back to
VIRTUALE_COOKIES.
virtuale_quiz_list_course_quizzes— quiz activities on a course page, with thecmidneeded by the other quiz tools.virtuale_quiz_list_attempts— a quiz's attempt summaries (status, dates, marks, grade, review URL/attempt id) for finished attempts.virtuale_quiz_get_attempt_review— one finished attempt's questions, answer options, the student's selection, correctness, and feedback.virtuale_quiz_sync_bank— diffs a local quiz-bank JSON file (bank_path) against Moodle attempts byattempt_id, fetches only the new attempt reviews, and appends them to the file in the bank's schema (backing up to<bank_path>.bakfirst).cmidsdefaults to the bank's ownquizzeslist;dry_runreports what would be fetched without writing. Writes to disk; returns only a count summary, never question content.
Scoped to reviewing attempts already finished and reviewable under the quiz's own review settings — it does not start, resume, or answer a live/in-progress attempt.
Timetable / calendar (public, no auth)
unibo_calendar_resolve_timetable_url— find the corsi.unibo.it timetable URL from a course page.unibo_calendar_list_curricula— list curricula from@@available_curricula.unibo_calendar_list_teachings— extract teaching IDs from the timetable page.unibo_calendar_get_events— fetch@@orario_reale_jsonevents, optional teaching-code filter and optionalstart/end(YYYY-MM-DD; default: whole academic year).unibo_calendar_get_ics— same, returned as an ICS calendar string.
AlmaEsami (authenticated)
All read-only. Each accepts session_id (from unibo_login or
unibo_bootstrap_session) or cookies (a cookie header with an
authenticated JSESSIONID), or falls back to ALMAESAMI_COOKIES.
almaesami_get_exam_plan— the exam plan (activities, CFU, status, bookable flag).almaesami_get_exam_history— the exam history / cronologia (appello date, examiner, type/mode, status).almaesami_get_messages— student messages (subject, sender, date, related appello).almaesami_list_appelli— work in progress. AlmaEsami has no standalone appelli page: sessions only appear per activity (active "+" toggle / "prenota" button on the exam plan) once one is open for booking, and none were open when this was mapped (2026-10). Until then it returnsstatus: "work_in_progress"plus the activities the exam plan marks bookable. Optionalpathfetches an explicit route with the legacy grid parser. Read-only; never books.rps_get_attendance_records— recorded presences (date, subject, lecturer, duration).rps_get_register— per-subject hours attended and attendance percentage.
Confirming attendance by entering a "codice rilevazione" is a write action and is
intentionally not automated. If EMAIL/PASSWORD are set (non-MFA account),
automatic login captures the PHPSESSID automatically. Otherwise authenticate the
bootstrap way: log fully into rps.unibo.it, confirm you see the app (not the SSO Sign In
page), copy the PHPSESSID cookie, and hand it to unibo_bootstrap_session.
Studenti Online — SOL (authenticated)
All read-only. Each accepts session_id (from unibo_login or
unibo_bootstrap_session) or cookies (a cookie header with an authenticated JSESSIONID),
or falls back to SOL_COOKIES.
sol_get_career— the student's home/career summary: greeting/identity, enrolled course of study, and in-progress requests.sol_get_services— the catalogue of Studenti Online service tiles (name, link, description) — fees, certificates, enrolments, etc. — so a caller can discover what the portal exposes.
First integration, partly unverified: the sol_* readers were derived from a single
logged-in home-page capture, so selectors are best-effort and individual fields degrade to
empty rather than failing. Consequential pages behind the service tiles (paying fees, new
enrolment/career requests, degree applications) mutate real state and are intentionally not
automated. See sol-api-notes.md.
Calendar flow example
unibo_calendar_resolve_timetable_urlwith the unibo.it course URL.unibo_calendar_list_curriculawith the resolved timetable URL.(optional)
unibo_calendar_list_teachingsto get teaching IDs to filter on.unibo_calendar_get_eventsorunibo_calendar_get_icswithyear,curriculum, and optional teaching codes.
Development
npm run typecheck # tsc --noEmit
npm test # node built-in test runner via tsx
npm run build # emit dist/Tests live next to sources as src/*.test.ts and are excluded from the build.
Reference notes
virtuale.unibo.it-api-notes.md— reverse-engineered Moodle AJAX endpoints.unibo-timetable-calendar-api.md— corsi.unibo.it timetable API.Timetable logic is informed by FrancescoBonzi/UniboCalendar.
License
ISC — see LICENSE.
Available Tools
35 toolsalmaesami_bootstrap_sessionBootstrap AlmaEsami SessionB
Creates a server-side session from an existing almaesami cookie header (JSESSIONID cookie header for almaesami.unibo.it). Returns an opaque session_id; the cookie is never echoed back.
Inputs: cookies (required), label.
almaesami_get_env_sessionGet AlmaEsami Env-Backed SessionA
Mints (or reuses) a session_id backed by the server's ALMAESAMI_COOKIES env var. The cookie is never returned — only an opaque session_id.
Inputs: no named parameters.
almaesami_get_exam_historyGet AlmaEsami Exam HistoryARead-only
Reads the authenticated student's AlmaEsami exam history (Cronologia): appello date, activity, examiner, type/mode, and status. Read-only.
Inputs: cookies, base_url, session_id.
almaesami_get_exam_planGet AlmaEsami Exam PlanARead-only
Reads the authenticated student's AlmaEsami exam plan (Riepilogo Esami): activities, CFU, status, and whether each is bookable. Read-only; does not book exams.
Inputs: cookies, base_url, session_id.
almaesami_get_messagesGet AlmaEsami MessagesARead-only
Reads the authenticated student's AlmaEsami messages (subject, sender, received date, related appello). Read-only; does not delete messages.
Inputs: cookies, base_url, session_id.
almaesami_list_appelliList AlmaEsami Appelli (Exam Sessions)ARead-only
Lists the student's upcoming AlmaEsami appelli (bookable exam sessions): date/time, activity, examiner, type/mode, and enrollment window — to answer "when can I sit exam X". Read-only: it never books. NOTE: the underlying endpoint/grid is UNVERIFIED (it lives behind SSO and could not be confirmed live); the result carries unverified: true, and the parser reads fields by content so it tolerates layout changes. If it returns nothing, the exam-plan tool's bookable flags are the confirmed signal, or pass an explicit path.
Inputs: path, cookies, base_url, session_id.
rps_bootstrap_sessionBootstrap RPS SessionA
Creates a server-side session from an existing rps cookie header (PHPSESSID cookie header for rps.unibo.it). Returns an opaque session_id; the cookie is never echoed back.
Inputs: cookies (required), label.
rps_get_attendance_recordsGet RPS Attendance RecordsBRead-only
Reads the authenticated student's RPS attendance records (Rilevazioni): date, subject, lecturer, and lesson duration for each recorded presence. Read-only.
Inputs: cookies, base_url, session_id.
rps_get_env_sessionGet RPS Env-Backed SessionA
Mints (or reuses) a session_id backed by the server's RPS_COOKIES env var. The cookie is never returned — only an opaque session_id.
Inputs: no named parameters.
rps_get_registerGet RPS Attendance RegisterBRead-only
Reads the authenticated student's RPS attendance register (Registro): per-subject hours attended and attendance percentage. Read-only.
Inputs: cookies, base_url, session_id.
sol_bootstrap_sessionBootstrap Studenti Online SessionA
Creates a server-side session from an existing sol cookie header (JSESSIONID cookie header for studenti.unibo.it). Returns an opaque session_id; the cookie is never echoed back.
Inputs: cookies (required), label.
sol_get_careerGet Studenti Online Career SummaryARead-only
Reads the authenticated student's Studenti Online (studenti.unibo.it) home page into a career summary: greeting/identity, enrolled course of study, and in-progress requests. Read-only; never submits requests or payments. NOTE: parsed from a single logged-in capture — selectors are best-effort and individual fields degrade to empty rather than failing.
Inputs: cookies, base_url, session_id.
sol_get_env_sessionGet Studenti Online Env-Backed SessionA
Mints (or reuses) a session_id backed by the server's SOL_COOKIES env var. The cookie is never returned — only an opaque session_id.
Inputs: no named parameters.
sol_get_servicesList Studenti Online ServicesARead-only
Lists the Studenti Online service tiles available to the student (name, link, description) — e.g. fees/payments, enrolments, certificates — so a caller can discover what the portal exposes. Read-only; it lists links, it does not act on them.
Inputs: cookies, base_url, session_id.
unibo_browser_loginLog In Via Headless Browser (all services)A
Drives a real (headless) Chromium browser through the ADFS SSO login using EMAIL + PASSWORD from the server environment, then — reusing the same shared idp.unibo.it session — completes the AlmaEsami and RPS SAML handshakes too, storing one session and returning an opaque session_id that works with the virtuale_*, almaesami_*, and rps_* tools. The password/sesskey/cookies never pass through the model's context. Each service is best-effort: the result reports per-service success. Only works for accounts without interactive MFA (use the *_bootstrap_session tools for MFA accounts). Mints once and reuses the session on later calls unless force_relogin is set.
Inputs: force_relogin.
unibo_calendar_get_eventsGet Timetable EventsARead-only
Fetches raw timetable events from @@orario_reale_json with optional teaching-code filtering.
Inputs: year (required), curriculum (required), timetable_url (required), selected_teaching_codes.
unibo_calendar_get_icsGet Timetable ICSBRead-only
Fetches timetable events and returns an ICS calendar string.
Inputs: year (required), curriculum (required), timetable_url (required), calendar_name, +1 more.
unibo_calendar_list_curriculaList Available CurriculaBRead-only
Lists available curricula for a timetable URL.
Inputs: timetable_url (required).
unibo_calendar_list_teachingsList TeachingsBRead-only
Parses timetable page HTML and returns lecture/teaching IDs for filtering.
Inputs: year (required), curriculum (required), timetable_url (required).
unibo_calendar_resolve_timetable_urlResolve Timetable URLBRead-only
Resolves the corsi.unibo.it timetable URL from a unibo.it course page URL.
Inputs: unibo_course_url (required).
virtuale_bootstrap_sessionBootstrap SessionC
Creates a server-side session from an existing sesskey and cookie header.
Inputs: cookies (required), sesskey (required), email_label, include_cookie_header.
virtuale_browser_loginLog In Via Headless Browser (deprecated alias)A
Deprecated alias for unibo_browser_login. Drives a headless Chromium through ADFS SSO with EMAIL/PASSWORD and returns an opaque session_id (now covering AlmaEsami and RPS too). Prefer unibo_browser_login.
Inputs: force_relogin.
virtuale_get_course_stateGet Course StateCRead-only
Calls core_courseformat_get_state and parses the returned JSON string state model.
Inputs: courseid (required), session_id.
virtuale_get_enrolled_coursesGet Enrolled CoursesDRead-only
Calls local_uniboapi_get_enrolled_courses_unibo for the authenticated user.
Inputs: sort, limit, offset, session_id, +3 more.
virtuale_get_env_sessionGet Env-Backed SessionA
Mints (or reuses) a session_id backed by the server's VIRTUALE_SESSKEY + VIRTUALE_COOKIES env vars. The sesskey/cookies are never returned — only an opaque session_id, so credentials configured in the MCP host's environment never pass through the model's context.
Inputs: no named parameters.
virtuale_get_panopto_contentGet Panopto Block ContentCRead-only
Calls block_panopto_get_content for a course.
Inputs: courseid (required), session_id.
virtuale_get_resourceGet Course Resource / FileARead-only
Fetches a Virtuale file/resource by cmid (builds /mod/resource/view.php?id=) or an explicit url, following the redirect to the protected pluginfile.php content with the authenticated MoodleSession cookie. Always returns metadata (final URL, content-type, size, filename). If save_to (an absolute file path) is given, streams the file to disk and returns the path + byte size. Otherwise returns text inline for text-like files (text/JSON/XML/HTML) and extracts + returns the text of PDFs; very long text is truncated (pass save_to for the full file). Read-only.
Inputs: url, cmid, cookies, save_to, +2 more.
virtuale_get_session_infoGet Session InfoBRead-only
Shows stored login metadata and optionally returns cookie header string.
Inputs: session_id (required), include_cookie_header.
virtuale_health_checkVirtuale Health CheckARead-only
Runs a safe no-login Moodle AJAX call to validate base connectivity.
Inputs: no named parameters.
virtuale_list_course_filesList Course FilesARead-only
Lists the downloadable files/resources of a Virtuale course, grouped by section (cmid, name, modname, url), derived from core_courseformat_get_state. A slim, token-friendly view of the course contents (not the full state blob); pass a cmid to virtuale_get_resource to fetch a file's content. Read-only.
Inputs: courseid (required), session_id.
virtuale_login_with_passwordLogin With PasswordB
Attempts Moodle form login, then stores cookies and sesskey server-side and returns a session_id.
Inputs: email (required), password (required), login_path, include_cookie_header.
virtuale_logout_sessionLogout SessionA
Removes one stored authenticated session from server memory.
Inputs: session_id (required).
virtuale_quiz_get_attempt_reviewGet Quiz Attempt ReviewARead-only
Reads the review page of one of the student's own finished quiz attempts: each question's text, answer options, the student's selection, correctness, and feedback. Only works for attempts Moodle already allows the student to review (finished, review permitted by the quiz settings) — it does not start, resume, or answer a live attempt.
Inputs: cmid (required), attempt_id (required), cookies, base_url, +1 more.
virtuale_quiz_list_attemptsList Quiz AttemptsARead-only
Reads a quiz activity page and returns the student's attempt summaries (status, dates, marks, grade) plus a review URL/attempt id for each finished attempt. Read-only.
Inputs: cmid (required), cookies, base_url, session_id.
virtuale_quiz_list_course_quizzesList Course QuizzesARead-only
Lists quiz activities on a course page, with the course-module id (cmid) needed by the other quiz tools.
Inputs: course_id (required), cookies, base_url, session_id.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 35 tools
Tools are clearly separated by subsystem prefixes (almaesami_, rps_, sol_, unibo_, virtuale_), and within each, purposes are distinct. The deprecated alias virtuale_browser_login is explicitly noted, preventing confusion.
Overall pattern is subsystem prefix + verb_noun (e.g., almaesami_get_exam_history). Minor inconsistencies: some use 'list' vs 'get' (e.g., almaesami_list_appelli vs almaesami_get_exam_history), and one alias (virtuale_browser_login) differs.
35 tools is high but justified by integrating multiple university subsystems (AlmaEsami, RPS, SOL, Virtuale, calendar). The count is appropriate for the broad scope, though could be streamlined.
Covers a wide range of read-only operations (exams, attendance, career, courses, quizzes, files, calendar). Minor gaps: no exam booking, no write actions beyond session management, and no detailed grades beyond career summary.
Maintenance
Related MCP Connectors
One MCP server for the services your AI needs: memory, files, Microsoft 365, kanban and more.
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
MCP server for Speech-to-Text
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceMCP server for querying a university course catalog. Enables searching courses, checking prerequisites, and looking up instructors via natural language.-
- AlicenseNot gradedqualityDmaintenanceMCP server that turns UPB Virtual (Moodle) into a structured knowledge source, enabling AI assistants to query courses, assignments, deadlines, announcements, and sync materials via REST API.MIT
- FlicenseBqualityDmaintenanceMCP server for interacting with the Eventin booking system, enabling natural language management of bookings, events, and venues.2-
- AlicenseBqualityDmaintenanceMCP server for Universidade de São Paulo's student systems (Moodle, JupiterWeb) enabling assistants to query grades, schedule, tasks, and more via secure backend.205GPL 3.0