elearn-mcp
Provides tools for interacting with the University of Tehran Moodle (elearn.ut.ac.ir) through one SSO login: listing courses and contents, tracking deadlines and assignments, downloading materials and attachments, viewing grades and notifications, and preparing/confirming assignment submissions.
Sends notifications and watcher alerts to Telegram using a bot token and chat ID.
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., "@elearn-mcp check my upcoming deadlines for this week"
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.
elearn-mcp
MCP server for elearn.ut.ac.ir (University of Tehran Moodle). One SSO login serves every student id of the user.
Unofficial and not affiliated with the University of Tehran. It acts only with your own login. Follow each course's rules: many courses require individual work, and anything uploaded with this tool is your own submission.
Setup
uv sync
security add-generic-password -s elearn-mcp -a <you>@ut.ac.ir -w # SSO passwordRegister it in your MCP client as a stdio server: command uv run --project <repo> elearn-mcp,
env ELEARN_USERNAME=<you>@ut.ac.ir.
The password is read from ELEARN_PASSWORD or, if unset, from the macOS Keychain
(service elearn-mcp, account = username). Never put it in a config file.
Variable | Default | Use |
|
| assignment attachments |
|
| course materials + text copies |
| Keychain | Telegram notifications (set |
| Keychain | SMS via Kavenegar |
Secrets can live in the Keychain under service elearn-mcp with the variable name as account:
security add-generic-password -s elearn-mcp -a TELEGRAM_BOT_TOKEN -w.
Related MCP server: mti-lms-mcp
Tools
Area | Tools |
accounts, courses |
|
assignments |
|
files |
|
grades, messages |
|
submission |
|
notifications |
|
background jobs |
|
Submitting always takes two calls. prepare_submission checks files and limits and returns a
single-use token (10 min); confirm_submission uploads only if the files did not change.
On these courses saving counts as "submitted for grading" (no draft mode).
read_material pages through text extracted from PDF, PPTX, DOCX and notebooks; Persian PDF
text is normalised (letter forms, word breaks, reversed digits). Parentheses around Latin text on
its own line can still come out swapped.
Watcher
uv run elearn-watch --channels macos,telegram --interval 900 # --once for a single roundSends one Persian message per change: new assignment, deadline within 24 h (once), new grade,
new site notification, new course file. State: ~/.local/state/elearn-mcp/state.json.
The first round only reports close deadlines, so it does not flood.
Background jobs (Celery + Redis)
brew services start redis # local only (127.0.0.1)
ELEARN_USERNAME=<you>@ut.ac.ir uv run elearn-worker # runs the jobs (thread pool, ELEARN_WORKERS=3)
ELEARN_USERNAME=<you>@ut.ac.ir ELEARN_WATCH_CHANNELS=macos,telegram uv run elearn-beat # watcher every ELEARN_WATCH_INTERVAL s (900)start_materials_jobdownloads a course in the background;job_status(job_id)returns the summary.start_agents(parts)runs up to 6 parts in parallel. Each part is{"prompt", "workdir"}; the workdir must be insideELEARN_JOBS_ROOT(default~/Desktop/myprojects/elearn-runs). Each part runsELEARN_AGENT_CMD(defaultelearn-agent, a script you provide on PATH) as<cmd> -p --output-format json --max-turns Nwith the prompt on stdin andELEARN_AGENT_MODEL=<model> (when given); output goes to<workdir>/.jobs/<task id>.json. The caller reviews the results; nothing is submitted.Jobs wait in Redis while the worker is down and run when it starts again.
Development
uv run pytest -q && uv run ruff check . && uv run ruff format --check .Tests use sanitized real pages in tests/fixtures and never touch the network.
Site facts and the verified login/upload flow are in PLAN.md.
Available Tools
23 toolsall_deadlinesB
List deadlines of every student id, each with an 'account' key, sorted by due.
Inputs: days_back. Returns: result
confirm_submissionB
Upload a prepared submission; the token is single use.
Inputs: token (required).
course_contentsC
List the sections and items of one course.
Inputs: account (required), course_id (required). Returns: result
download_attachmentsC
Download every attachment of one assignment; returns the file paths.
Inputs: cmid (required), account (required). Returns: result
download_course_materialsC
Download every resource and folder of a course; returns the manifest summary.
Inputs: account (required), course_id (required), extract.
download_moduleC
Download the files of a course resource or folder; returns the file paths.
Inputs: cmid (required), module (required), account (required). Returns: result
external_linkC
Return the external URL of a course url module, or None.
Inputs: cmid (required), account (required). Returns: result
get_assignmentC
Fetch and parse one assignment page.
Inputs: cmid (required), account (required).
gradesC
List the grades of one student id.
Inputs: account (required). Returns: result
job_statusC
Return the state and result of a background job.
Inputs: job_id (required).
list_accountsA
List the student ids owned by the SSO user.
Inputs: no named parameters. Returns: result
list_coursesC
List enrolled courses for one student id.
Inputs: account (required). Returns: result
list_deadlinesC
List upcoming deadlines for one student id.
Inputs: account (required), limit, days_back. Returns: result
list_materialsC
List the downloaded materials of a course (paths are relative to the course dir).
Inputs: account (required), course_id (required). Returns: result
notificationsC
List recent notifications of one student id.
Inputs: account (required), limit. Returns: result
prepare_submissionB
Check a submission without uploading; returns a token for confirm_submission.
Inputs: cmid (required), paths (required), account (required).
read_materialB
Read the text of one course material, paged by offset/max_chars.
Inputs: path (required), account (required), course_id (required), offset, +1 more.
remove_submissionC
Remove the submitted files of an assignment; returns the new status.
Inputs: cmid (required), account (required), confirm.
send_notificationC
Send a notification through the given channels (default: macos).
Inputs: text (required), channels.
start_agentsB
Run the parts in parallel on the free worker model; review results with job_status.
Inputs: parts (required), model.
start_materials_jobC
Start a background job that downloads a course's materials; returns the job id.
Inputs: account (required), course_id (required), extract.
start_watch_roundC
Start a background watcher round; returns the job id.
Inputs: channels.
watch_nowC
Run one watcher round now and notify on changes.
Inputs: channels. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 23 tools
Most tools have distinct purposes, but a few execution-mode pairs blur boundaries: watch_now vs start_watch_round and download_course_materials vs start_materials_job. Descriptions usually clarify the difference, though list_materials (downloaded materials only) vs download_course_materials is a subtle trap.
Many names follow verb_noun (list_courses, download_attachments, prepare_submission), but several are bare nouns or noun phrases (grades, notifications, course_contents, external_link, job_status). All use snake_case, so it is readable, but the convention is mixed.
23 tools is on the heavy side for a student e-learning client. Several synchronous/background pairs and niche orchestration tools (start_agents, start_watch_round) could be consolidated without losing functionality.
The surface covers the core lifecycle: accounts, courses, deadlines, grades, notifications, course contents, material downloads/reads, assignment fetching, submission preparation/confirmation/removal, and background jobs. Minor gaps remain, such as no job cancellation and no all-accounts course listing, but workarounds exist.
Maintenance
Related MCP Connectors
PLATO (Pusan National University LMS) MCP server via Moodle Web Service API + ubboard scraping
Remote MCP for TehProf Booking: browse resources & availability, create & cancel reservations.
MCP connector for iMessage & Contacts via a local Mac agent + Vercel relay
Headless task management for bots, apps and AI agents. Remote MCP server, OAuth or access token.
Related MCP Servers
- AlicenseAqualityBmaintenanceMCP server for the DUTIC virtual classroom (Moodle) at UNSA. Allows viewing tasks (including hidden ones), courses, resources, and downloading files, from terminal or AI agents.249 npmMIT
- AlicenseNot gradedqualityCmaintenanceConnects any MCP-compatible AI assistant to a student's Moscow Technological Institute portal (lms.mti.moscow) over stdio or HTTP. Enables reading schedules, courses, assignments, grades, notifications, messages, curriculum and finance data, and safely submitting coursework with dry-run confirmation.MIT
- AlicenseAqualityAmaintenanceA local stdio MCP server that lets students query their HSE (NIU VShE) accounts: SmartLMS courses, materials, assignments, grades and internal messages, plus the ELK personal cabinet — schedule, academic record, services, requests and notifications. It also assembles day/week summaries, deadline alerts and change tracking, with optional write tools for submitting assignments kept off by default.21485 npm1MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI clients over stdio MCP to query XJTLU Learning Mall Core (Moodle) courses, download course materials and attachments, inspect deadline sources, and view upcoming deadlines.MIT