by Faixiang
Zero-dependency MCP server for the Moodle Web Service API — read-only course, assignment, quiz, deadline and file tools for Claude, Cursor and any MCP client. Actively maintained · v1.4.0 · 10 tools · docs in 10 languages.
# Add to your Claude Code skills
git clone https://github.com/Faixiang/Moodle-MCPGuides for using mcp servers skills like Moodle-MCP.
Moodle-MCP is an open-source mcp servers skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by Faixiang. Zero-dependency MCP server for the Moodle Web Service API — read-only course, assignment, quiz, deadline and file tools for Claude, Cursor and any MCP client. Actively maintained · v1.4.0 · 10 tools · docs in 10 languages. It has 209 GitHub stars.
Moodle-MCP's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/Faixiang/Moodle-MCP" and add it to your Claude Code skills directory (see the Installation section above).
Moodle-MCP is primarily written in Python. It is open-source under Faixiang on GitHub, so you can review or fork the full source.
Yes. AgentsLLM lists many other MCP Servers skills you can browse and compare side by side. Open the MCP Servers category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh Moodle-MCP against similar tools.
No comments yet. Be the first to share your thoughts!
Top skills in this category by stars
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
Read assignments, deadlines and course files straight out of the Moodle Web Service API — no browser, no scraping, no clicking.
Companion skill — moodle-course-watch This server is the plumbing; the skill is the workflow on top of it. It diffs new coursework, mirrors missing week folders, lists what is still unsubmitted, and walks through the downloaded files with graded key points. It is mounted as a git submodule in this repository at
skill/moodle-course-watch/(clone with--recurse-submodules), and is also a standalone repo for anyone who wants only the skill.
Actively maintained. Latest release v1.3.0 (2026-10-27): quizzes are no longer a blind spot —
moodle_quiz_statusreads real attempt state and scores. Full changelog at the end of this file.
Moodle powers a large share of universities and colleges worldwide, yet it had no general-purpose MCP server. Scraping it with a headless browser is slow, brittle and tends to trip WAFs — while Moodle itself already ships a stable, documented REST API.
This project is the missing wrapper: one zero-dependency Python file, ten read-only tools, working against any Moodle 3.x/4.x site with Web Services enabled.
No pip install. No node. No browser. Just python server.py.
moodle_site_info reports site version, account identity and which functions your token may actually callurllib, json, ssl), so nothing pollutes your runtimeserver.py anywhere; no package layout, no build step502| Tool | What it does | Arguments |
|---|---|---|
moodle_setup_guide |
Step-by-step guide for getting a Moodle web-service token and wiring it into this server (browser UI path, SSO caveat, config.json and environment-variable options). Needs no token, so it always works. Call it on first setup or after a TOKEN_MISSING error. |
— |
moodle_config_status |
Self-check of the local configuration: config.json path, existence and parse result, MOODLE_URL / MOODLE_TOKEN environment variables, effective URL, where the token came from and its length. The token itself is masked to the first 4 characters. Needs no token. |
— |
moodle_site_info |
Validate the token, return site name, Moodle version, current user and the list of web-service functions the account may call (diagnostics). | — |
moodle_list_courses |
List every enrolled course with id, shortname and fullname. | — |
moodle_recent_updates |
Content added or updated in the last N days (assignments, files, announcements), newest first. | days (default 7), course_ids |
moodle_pending_assignments |
Unsubmitted assignments, split into due soon / overdue / no pressure, with deadline and days remaining. | ahead_days (default 14), course_ids |
moodle_quiz_status |
Per-quiz attempt state straight from mod_quiz_get_user_attempts: submitted / in progress / never started, with best score, open–close window, time limit and a window closed flag. |
course_ids, only_pending |
moodle_course_files |
Section structure and file list for one course, including direct download URLs and modified times. Metadata only — nothing is downloaded. | course_id |
moodle_download_week |
Download one week's files (slides + assignment attachments) into a local folder named after the section — Week N when the section title carries a week number, otherwise the section's own title (Online Judge Questions, Project Submission). Creates folders, verifies sizes, skips files already present. Omit dest_root to get the list only. |
course_id, week (e.g. 6 or "Week 6", or all), dest_root |
moodle_weekly_digest |
The one-shot summary: recent additions + due-soon + overdue + counts. Best starting point. | days (default 7), ahead_days (default 14) |
moodle_download_weekonly writes to your local disk — it never submits anything to Moodle. File URLs returned by the read tools already carry your token, so they download as-is: treat them as secrets and keep them out of logs, screenshots and public repos.
| Component | Notes |
|---|---|
| Python | 3.8+ (standard library only) |
| MCP protocol | 2024-11-05 |
| Moodle | 3.x / 4.x with Web Services + REST protocol enabled |
| Account | Holds the webservice/rest:use capability |
| Verified against | Moodle 4.3.6, full 435-function grant |
Moodle needs a personal access token. Pick whichever works for your site:
A. Web UI (recommended, works with SSO accounts)
Moodle-MCP, service = Moodle mobile web serviceB. Mobile-app service via script (only if your site has local passwords)
python get_token.py
Walks through /login/token.php with the moodle_mobile_app service and validates the result. Password input is hidden and never logged. If your account is SSO-only this returns invalidlogin — use method A instead.
C. Environment variables
MOODLE_URL=https://moodle.your-school.edu
MOODLE_TOKEN=your_token_here
Create config.json next to server.py (or copy config.example.json):
{
"url": "https://moodle.your-school.edu",
"token": "your_token_here"
}
Environment variables take precedence over the file.
Claude Desktop / Cursor (mcp.json):
{
"mcpServers": {
"moodle": {
"command": "python",
"args": ["/absolute/path/to/Moodle-MCP/server.py"]
}
}
}
Use an absolute path to server.py. If you have several Python installs, point command at the full interpreter path.
Ask your client to call moodle_site_info. A working setup returns the site name, Moodle version and your user record. If it fails, jump to Troubleshooting.
| Key | Type | Required | Description |
|---|---|---|---|
url / MOODLE_URL |
string | yes | Base URL of your Moodle site, no trailing path |
token / MOODLE_TOKEN |
string | yes | Personal access token from Manage access keys |
config.json |
file | optional | Read from the directory containing server.py |
Precedence: environment variables → config.json → error.
"What do I still owe this week?"
The agent calls moodle_weekly_digest and gets back a ready-to-read brief:
## Due in the next 7 days, not submitted
| CIS225 Data Structures | A10021 Crosswords | 2026-10-29 23:59 | 3 days |
| CIS225 Data Structures | A10022 Cow Jogging | 2026-10-29 23:59 | 3 days |
## Overdue
| CIS225 Data Structures | A10009 Dancing | 2026-10-11 23:59 | 15 days late |
## Totals
Submitted/graded: 51 | Outstanding: 25 (due soon 4, overdue 14, other 7)
Other prompts that work well:
| Prompt | Tool it lands on |
|---|---|
| "What new material appeared in CIS225 this week?" | moodle_recent_updates |
| "List the files in GER405, don't download anything" | moodle_course_files |
| "Which of my courses have nothing overdue?" | moodle_pending_assignments |
| "Is my token still valid?" | moodle_site_info |
Your account authenticates through SSO/OIDC only, so /login/token.php has no local password to check. Use method A — create the token in Manage access keys instead.