Moodle MCP
Provides browser-based access to an authenticated Moodle session, allowing users to list courses, search for course resources and handouts by name, download selected files, and extract limited PDF text from resources.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Moodle MCP uses a real browser to access your courses, even when your university disables the mobile API. Sign in yourself through your institution’s SSO/MFA; the MCP server and CLI reuse that session to list, search and download the resources you choose.
✨ What you can do
Find your courses and search for handouts by name.
Download one selected file without collecting every course.
Read up to 12,000 characters of extracted PDF text in your assistant.
Run the server on your Mac, a Linux computer or a VPS.
Receive files from your VPS on your Mac with the optional SSH client.
No tool modifies Moodle or submits assignments. The server stays private: local stdio, or an outbound OpenAI tunnel for compatible clients.
Related MCP server: Moodle MCP Server
🚀 Get started
Requirements: Git, Python 3.11+ and macOS or Linux. On Windows, use WSL2 with a working graphical display. Ubuntu 24.04 or Debian 12+ with systemd are the documented VPS starting points.
git clone https://github.com/edouaz/moodle-mcp.git
cd moodle-mcp
bash setup.shSetup installs dependencies and Chromium, then walks you through:
Your Moodle base URL, such as
https://campus.example.edu/moodle.Local or VPS installation.
Browser sign-in with your university’s SSO/MFA.
An optional OpenAI tunnel: ID, hidden runtime key input and optional private storage.
No Moodle token is required. The key requested is only for the OpenAI tunnel. Skip that step for CLI use or a local stdio MCP client.
On a VPS, use bash setup.sh --vps. It also installs Chromium’s system dependencies and may request sudo. Moodle sign-in needs a secure graphical display; read the VPS guide before setting up a headless machine.
🌍 Languages
English is the default for the website, documentation, CLI and MCP tool descriptions. The website has an EN / FR switch; French documentation remains available.
bash setup.sh --lang fr
python3 moodle.py --lang fr setup
MOODLE_MCP_LANG=fr python3 moodle.py courses--lang works before or after the subcommand and overrides MOODLE_MCP_LANG for that invocation. The language is inherited by child processes. Set the environment variable in your shell or service for a persistent preference. Upstream browser/install output and some diagnostic messages remain in English. Course titles, filenames, JSON keys and IDs are never translated.
Translations live in locales/fr.json; see the translation guide to add a language.
🧭 Everyday commands
python3 moodle.py login # sign in or renew your session
python3 moodle.py doctor # check MCP without reading your courses
python3 moodle.py session # check your Moodle session
python3 moodle.py courses # list courses without downloading files
python3 moodle.py files --course 123 --limit 50
python3 moodle.py search --course 123 "Worksheet1"
python3 moodle.py download --course 123 --file-id "ID_FROM_THE_LISTING" --include-text
python3 moodle.py tunnel run # foreground; Ctrl-C to stopReplace 123 and the file ID with values from the listings. The CLI automatically uses .venv Python. The legacy scraper.py without options downloads all courses; use moodle.py for targeted operations.
💬 Connect your assistant
For a local MCP client, set the absolute command …/moodle-mcp/.venv/bin/python with the absolute argument …/moodle-mcp/mcp_server.py. See the local guide for a full configuration example.
For a compatible OpenAI client, create a tunnel in OpenAI Platform, configure it through setup and run python3 moodle.py tunnel run. Add a Tunnel MCP connection in your client if your account/workspace supports it. Tunnel permissions are required; installing this project does not grant them. See the tunnel guide and official OpenAI documentation.
Try “List my courses”, then “Find Worksheet1 in this course”. A successful call from your assistant confirms the connection; the local diagnostic alone does not.
🔒 Your session is personal
session.json, .moodle/, .tunnel/, downloads and delivery queues are excluded from Git through an explicit source allowlist. Saved sessions and keys have 600 permissions.
Anyone authorized to use your tunnel can access your Moodle session. Keep it personal. Selected PDF text is sent to your assistant; a complete PDF does not automatically become a ChatGPT attachment. Targeted downloads are limited to 20 MiB per file. The optional Mac delivery client requires macOS.
Compatibility depends on the Moodle theme and configuration. Other universities need verification; SSO/MFA and account restrictions are never bypassed.
📚 Documentation
Need | Guide |
Local installation and MCP client | |
Permanent server, VPS sign-in and service | |
Tunnel and runtime key | |
Receive files on your Mac | |
Commands and seven MCP tools | |
Reconnect, troubleshoot and uninstall | |
Add another language |
🛠️ Contribute
.venv/bin/python -m unittest -v test_login_only test_targeted test_service test_mcp test_delivery test_sync_mac test_setup test_i18n
.venv/bin/python diagnose_mcp.pyTests require neither a Moodle account nor an OpenAI key. See CONTRIBUTING.md, SECURITY.md and the changelog.
License and credits
MIT. Based on moodle-browser-scraper by thntx; its copyright and original README are preserved. Moodle MCP is independent, with no affiliation to Moodle, Apple, OpenAI or a university. The logo is an original vector illustration.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Let your AI agent operate any website through a real, logged-in browser session.
Web search, data extraction and controlled browser automation for AI assistants via OAuth.
Let AI agents use any website you're logged in to. Sessions stay encrypted on your machine.
Connect AI assistants to your approved computer for files, commands, browser and desktop tasks.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables AI assistants to interact with Moodle via web services, allowing tasks like listing courses, assignments, events, and downloading files.1052 PyPI4MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Moodle LMS via browser automation, using a server and browser extension to keep credentials local and route commands securely.13 npmMIT
- AlicenseAqualityCmaintenanceEnables automated interaction with the Moodle platform, allowing users to list courses and modules, retrieve assignment details, and download course files via browser automation.6ISC
- AlicenseNot gradedqualityBmaintenanceEnables an AI agent to access a Moodle Campus Virtual account with the user's own credentials, reading course content, files, forums, notices, calendar, grades and quiz attempts for every enrolled course. Teachers, managers and course creators also get access to other participants' data and to planned, verified write operations such as forums, grading, attendance, quizzes, groups, content and H5P activities.2Apache 2.0