Moodle MCP
Moodle MCP gives AI assistants read-only access to a student's Moodle courses and lets them download course materials.
Sign in through university SSO/MFA and check the current Moodle session.
List enrolled courses, most recently accessed first.
Browse a course's sections, materials, links, activities, and due dates.
List upcoming assignments, quizzes, and deadlines, soonest first.
Download individual Moodle files.
Sync/download PDFs from every current course in the background, or all files from a specified course, and track progress.
It cannot submit work, post, or change anything on Moodle.
Provides read-only access to a student's Moodle site, including listing enrolled courses, browsing course sections and materials, viewing upcoming deadlines, downloading individual files, and syncing lecture slides or all course files into folders.
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., "@Moodle MCP what's due this week on Moodle?"
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.
Moodle MCP Server: Moodle for Claude, ChatGPT Codex and Cursor
moodle-mcp is an open-source Model Context Protocol (MCP) server for Moodle. It lets AI assistants (Claude Desktop, Claude Code, ChatGPT Codex, Cursor, VS Code and SlideMate) read a student's Moodle courses, materials, links and deadlines. It can also download every course's lecture slides into one folder per course.
Works at any university that uses Moodle, including UCL, King's College London (KEATS), LSE, Cambridge and Warwick (full list). It defaults to LSE (
moodle.lse.ac.uk); setMOODLE_BASE_URLfor anywhere else.Uses Moodle's official mobile-app API (the one the Moodle app uses), so it reads data rather than scraping pages.
No password or token to copy. You sign in through your university's normal SSO and MFA in a real browser window.
Read-only. It can't submit work, post or change anything on Moodle.
Using Canvas or Blackboard instead? See canvas-mcp (Oxford, Harvard, Stanford…) and blackboard-mcp (Imperial, Edinburgh, Bristol…).
What you can ask
"What's due on Moodle this week?"
"Show me what's in week 4 of MY452."
"Pull everything from MY452."
"Download the lecture slides from all my current modules."
Related MCP server: dtu-learn
Install (macOS / Linux, one command)
Paste this into Terminal. It installs uv (which brings its own Python, so you don't
need Xcode or Apple's Command Line Tools), installs moodle-mcp, then opens Chrome so you can sign in to Moodle once.
Change moodle.ucl.ac.uk to your university's Moodle address:
curl -LsSf https://astral.sh/uv/install.sh | sh && ~/.local/bin/uv tool install --managed-python https://github.com/Mattlo0546/moodle-mcp/archive/refs/heads/main.zip && MOODLE_BASE_URL=moodle.ucl.ac.uk ~/.local/bin/moodle-mcp loginSign-in uses Google Chrome. Without Chrome, run ~/.local/share/uv/tools/moodle-mcp/bin/playwright install chromium
first. To update later, run the install command again with --reinstall after tool install.
Tools
Tool | What it does |
| Opens a browser for university SSO + MFA and saves a token. Tries a silent refresh first. |
| Who you're signed in as, which site, and where files download to |
| Your enrolled courses, most recently used first, and whether a full sync pulls each one |
| Change which courses a full sync pulls ( |
| A course's sections with materials, links, activities and due dates |
| Upcoming assignments and quizzes, soonest first |
| Save one file (a |
| With no course: download the PDFs from every current course, in the background. With a course: download all of its files. |
Courses can be named loosely: "MY452", "regression" or the course id all work. A full sync skips courses that
have ended, and files you already have. It also skips what isn't for studying: sites that aren't courses (guidance
hubs, LSE Life, the library's skills site, year-group noticeboards) and, inside courses, posters, handbooks, forms,
timetables and the "Student support" section. Its report lists the sites it skipped; moodle_set_courses brings one
back. Words that are also lecture topics only count in an admin phrase, so "Mathematical induction" stays and
"Induction week schedule" goes (relevance.py).
Connect it to your AI app
Set MOODLE_BASE_URL to your university's Moodle address in each config below.
SlideMate
In SlideMate, go to Settings → Your university, then pick your university or Moodle and press Connect. SlideMate installs this server, signs you in, and makes the library's Pull button download new slides from all your current courses into your library. Nothing to type.
Claude Code
claude mcp add moodle -e MOODLE_BASE_URL=https://moodle.ucl.ac.uk -- ~/.local/bin/moodle-mcp serveClaude Desktop
Settings → Developer → Edit Config (claude_desktop_config.json):
{
"mcpServers": {
"moodle": {
"command": "/Users/YOU/.local/bin/moodle-mcp",
"args": ["serve"],
"env": { "MOODLE_BASE_URL": "https://moodle.ucl.ac.uk" }
}
}
}The same block works in Cursor (~/.cursor/mcp.json). VS Code's .vscode/mcp.json uses "servers" in place of
"mcpServers".
ChatGPT Codex CLI
codex mcp add moodle --env MOODLE_BASE_URL=https://moodle.ucl.ac.uk -- ~/.local/bin/moodle-mcp serveUniversities that use Moodle
Any Moodle site with the mobile app service turned on works. Most have it on, because that's what the official Moodle app needs. These addresses were checked to be Moodle sites:
University |
|
UCL (University College London) |
|
King's College London (KEATS) |
|
London School of Economics (LSE) |
|
University of Cambridge |
|
University of Warwick |
|
Queen Mary University of London (QMplus) |
|
Royal Holloway, University of London |
|
University of Bath |
|
University of Nottingham |
|
University of Glasgow |
|
University of Exeter |
|
Loughborough University (Learn) |
|
University of Hong Kong |
|
Your university's address is the one in your browser's address bar when you open Moodle.
Command line
moodle-mcp login # sign in (opens Chrome)
moodle-mcp status # who you're signed in as
moodle-mcp courses # your courses
moodle-mcp sync # PDFs from every current course
moodle-mcp sync MY452 # every file in one courseSettings (all optional)
Environment variables win over ~/.moodle-mcp/config.json.
Variable | Default | Meaning |
|
| Your Moodle site |
| SlideMate's first slides folder, else | Where downloads go |
|
| Browser for sign-in; |
|
| Where the token and the sign-in browser profile live |
How sign-in works
Moodle sites behind SAML single sign-on with MFA have no password a script can post. Instead this uses Moodle's
mobile-app login handshake: it opens admin/tool/mobile/launch.php with a random passport, you sign in once in the
browser, and Moodle redirects back with a signed, base64-encoded web-service token, which is decoded and saved. The
browser profile remembers the SSO session, so later refreshes usually need no clicks.
FAQ
Is there an MCP server for UCL Moodle or King's KEATS?
Yes, this one. Set MOODLE_BASE_URL to moodle.ucl.ac.uk or keats.kcl.ac.uk. In SlideMate, pick UCL or King's
from the list.
Do I need a Moodle API token?
No. moodle_login gets one through Moodle's mobile-app sign-in, after you sign in with your university account.
Does it work with ChatGPT? It works with OpenAI's Codex CLI and with any app that supports local (stdio) MCP servers. The ChatGPT website can only use remote MCP servers.
It says the site doesn't allow the mobile app. Your Moodle has the mobile web service turned off, so this server can't sign in. Only your university's Moodle admins can turn it on.
Privacy
Access: read-only. It can't submit work, post or change anything on Moodle.
Storage: the token stays on your computer (
~/.moodle-mcp/token.json, readable only by you). Delete it to sign out. Data goes directly between your computer and your Moodle site.
Development
uv run --with pytest pytest # offline tests against a fake Moodle: sync, sign-in expiry, MCP over stdioRelated
canvas-mcp: MCP server for Canvas LMS
blackboard-mcp: MCP server for Blackboard Learn (Ultra)
classroom-mcp: MCP server for Google Classroom
SlideMate: a free Mac app with an AI tutor that has read your whole lecture deck. It sets all of these up in one click.
MIT licensed. Not affiliated with Moodle Pty Ltd or any university. Moodle is a trademark of Moodle Pty Ltd.
Available Tools
8 toolsmoodle_browseA
Show a course's sections with their materials, links and activities. course can be a
course id, short name, or part of the full name.
Inputs: course (required).
moodle_coursesA
List the user's enrolled Moodle courses (most recently accessed first).
Inputs: no named parameters. Returns: result
moodle_deadlinesB
List upcoming assignments, quizzes and other dated activities, soonest first.
Inputs: limit. Returns: result
moodle_downloadA
Download one Moodle file. Pass the fileurl from a moodle_browse result; the file is saved
under the download folder (optionally in subdir).
Inputs: fileurl (required), subdir, filename.
moodle_loginA
Sign in to Moodle. Opens a Chrome window on the user's Mac at the university sign-in page; the user completes SSO + MFA there and a web-service token is saved for the other tools. Tries a silent refresh first, so it often finishes without any window.
Inputs: timeout_seconds.
moodle_statusA
Check the Moodle session: which site, signed in as whom, and the download folder.
Inputs: no named parameters.
moodle_syncA
Download course files to // (SlideMate's library if it's set up, else ~/MoodleFiles).
With a course (id, short name or part of the name), downloads every file in it and returns the result.
Without one, downloads the PDFs (lecture slides, readings) from every current course in the background and
returns {"running": true}; call moodle_sync_status until it reports the result. Existing files of the same
size are skipped.
Inputs: course, skip_existing.
moodle_sync_statusA
Progress of a sync started by moodle_sync without a course: {"running": true, "progress": …} while it runs, then the result (a summary, files per course and any errors).
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool has a clearly distinct purpose: login, status, courses, browse, deadlines, download, sync, and sync progress. The only mild overlap is moodle_download (single file) vs moodle_sync (bulk download), but the descriptions make the boundary clear.
All tools use a consistent snake_case moodle_ prefix with predictable noun/verb naming. The moodle_sync / moodle_sync_status pairing is a standard and intuitive convention for a long-running operation.
Eight tools is well-scoped for a Moodle client covering auth, discovery, and download workflows. Each tool earns its place with no redundant or filler entries.
The surface covers the full browse-and-download lifecycle including auth, session check, course listing, content browsing, deadlines, and bulk sync. It lacks write-side operations like assignment submission or grade retrieval, but for its apparent read/download focus the coverage is solid.
Maintenance
Related MCP Connectors
Live university Q&A, polls, LaTeX STEM quizzes, closed-book exams and Moodle banks over MCP.
Your memory, everywhere AI goes. Build knowledge once, access it via MCP anywhere.
Make Anki flashcards from lecture PDFs, slides, notes and YouTube videos, each with its source page.
Open-source AI courses taught by your AI tutor in conversation, with progress saved by MCP tools.
Related MCP Servers
- AlicenseAqualityBmaintenanceGives Claude, Codex, Cursor and any other MCP client read access to your courses, content, files, grades, deadlines, announcements and discussions, using your own browser session.3124 npm6MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to browse your own university courses by downloading files, slides, announcements, deadlines, grades and lecture transcripts to your machine, then answering questions and searching across them through MCP tools. It logs in with your own account and refreshes only what changed.MIT
- AlicenseAqualityCmaintenanceEnables AI tools such as SlideMate, Claude, and Codex to read a student's Blackboard Learn Ultra courses, content, deadlines, and announcements, and to download lecture slides and readings for the year into per-course folders.91MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to inspect enrolled courses, extract readable text from course documents, track upcoming deadlines, view announcements, and retrieve assignment details through the platform’s REST API.MIT