Moodle-MCP
An MCP server reading Moodle courses, deadlines, quizzes and files via the official API, with no browser or extra packages.
- 206 ★ on the repository
- Last commit
- MIT
Extended access
Why this level
- A personal Moodle token is stored in `config.json` or an environment variable and appears in file links.
- Week download writes files into the chosen local folder.
Install
- Works in
Manual install
{
"mcpServers": {
"moodle": {
"command": "python",
"args": ["/absolute/path/to/Moodle-MCP/server.py"]
}
}
}The block from the README Register the server step (Claude Desktop and Cursor). Set the URL and token in `config.json` next to `server.py` or in environment variables.
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- A personal Moodle token is stored in `config.json` or an environment variable and appears in file links.
- Week download writes files into the chosen local folder.
This is third-party code. Review the repository files before installing.
What it does
Moodle-MCP, a single `server.py` file on the Python standard library, connects an agent to Moodle 3.x and 4.x through Web Services. Ten tools only read data: course list, recent updates, unsubmitted assignments split into due soon and overdue, quiz state, course structure and a weekly digest. The `moodle_download_week` tool downloads a week's slides and attachments into a local folder and verifies sizes. It submits nothing to Moodle. The token comes from `config.json` or the `MOODLE_URL` and `MOODLE_TOKEN` variables. The repository has a Russian README and bundles the `moodle-course-watch` skill.
Who it is for. Students and teachers whose university uses Moodle and who want to ask an agent about deadlines and new course material.
Good fit when
- You want a morning digest of what is due this week and what is overdue.
- A new course week's materials need sorting into folders.
- An agent checks which quizzes are not started and when they close.
- An administrator issued a token and the Moodle site serves data over REST.
Not a fit when
- Web Services or REST are disabled on the Moodle site.
- You need to submit work or edit courses: there are no write tools.
- Login is SSO-only and no token can be obtained.
Example request
Show the assignments due in the next 7 days and the overdue ones separately across all my courses.MCP
- Transport
- stdio
- Authentication
- API key
Environment variables
MOODLE_URLrequired- Base URL of the Moodle site, no trailing path
MOODLE_TOKENrequired, secret- Personal token from Manage access keys
Limitations
A personal Moodle token and enabled Web Services are required. For SSO accounts create the token under Manage access keys; the `get_token.py` script does not work with SSO. File links in responses already carry the token, so do not publish them or captured traffic. Calls run one by one with a 150 ms gap to avoid 502 errors from site protection. Downloaded files stay on your disk, but the agent may pass their content to its model provider. It was verified on Moodle 4.3.6; other builds may expose a different set of functions for the token.
How to disable. Remove the `moodle` entry from the client `mcp.json` and revoke the token under Manage access keys in your Moodle. Delete the `config.json` that holds the token too.
FAQ
Where do I start?
With `moodle_weekly_digest`: one call returns recent material, upcoming deadlines and overdue items. `moodle_site_info` checks the token.
How do I get a token?
In Moodle open your avatar, then Preferences, Account, Security, Manage access keys and create a key for the Moodle mobile web service. A local-password route exists in `get_token.py`.
Can the server change anything in Moodle?
No. The code has no submit, enrol, edit or delete calls; every tool is read-only.
Are any packages needed?
No, Python 3.8+ and the standard library are enough. The run command is `python server.py`.
Is there Russian documentation?
Yes, the repository includes `README.ru.md` alongside other languages. The main README is in English.
Discussion
No questions or reviews yet.
Related
MCP serversAn MCP server for Canvas LMS: the agent handles assignments, grades and course modules for a student or an instructor
AoA Course Connector
aoa-course-connector
An MCP server that reads courses from GetCourse, Skillspace and Stepik and turns them into a local, searchable knowledge base with citations
An agent writes questions and exams on EduBase, assembles quizzes and analyzes results, using an integration key
The official Kibela MCP server searches, reads and edits notes, folders and comments of your wiki straight from an assistant chat
A Mattermost MCP server: an agent reads, searches and posts messages, threads and files in your workspace, with 39 tools.
Redmine MCP Server: issues and time tracking
Redmine MCP Server
An MCP server for Redmine: issues, projects, wikis, time tracking and files, a read-only mode and per-user OAuth2 sign-in
README in short
The latest release, 1.3.0 of 27 October 2026, added `moodle_quiz_status` with real attempt state and scores. It was verified against Moodle 4.3.6.