Moodle-MCP
Allows interaction with Moodle LMS, including retrieving upcoming events from a Moodle instance.
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 Show my upcoming events 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.
Moodle-MCP
A Model Context Protocol (MCP) server implementation that provides capabilities to interact with Moodle LMS.
Features
The server exposes the following tools.
Courses & content
Tool | Description |
| Get all courses the current user is enrolled in |
| Get sections and modules for a specific course by its ID |
| Search across all course materials by query string |
| Get announcements from course news forums, optionally filtered by course ID |
| Get recent activity and updates across courses since a given time |
Course files
Tool | Description |
| List downloadable files with module IDs, filenames, paths and sizes |
| Download one course file to a local directory; returns path, size and SHA-256 |
| Download all files of a course in one call; resumable, skips verified unchanged files |
Course catalogue & enrolment
Tool | Description |
| Search the visible course catalogue, including courses you are not enrolled in |
| List a course's enrolment methods, availability and instance IDs |
| Check a self-enrolment instance and whether it requires a key |
| Enrol the current user in a course, with an optional enrolment key |
Assignments & deadlines
Tool | Description |
| Get assignments for courses, optionally filtered by course IDs |
| Get submission and grading status for a specific assignment |
| Get upcoming assignment deadlines across all courses, sorted by due date |
| Get unsubmitted assignments past their due date, most overdue first |
| Get a prioritized list of tasks needing action, sorted by urgency |
| Analyze an assignment: status, requirements, materials, progress, deadline |
| Extract requirements, deliverables, constraints, and evaluation criteria from an assignment |
| Find course content relevant to an assignment, ranked by relevance |
| Break an assignment into subtasks with effort, dependencies, and critical path |
| Build a step-by-step plan with timeline, resources, milestones, and risks |
Grades & progress
Tool | Description |
| Get a grade overview for all courses, or detailed grades for one course |
| Get progress and completion for one course or all courses |
| Health check for a course: progress, grades, unsubmitted and overdue counts |
| Analyze assignment distribution by week to identify heavy weeks |
Aggregated overviews
Tool | Description |
| Get upcoming events from Moodle |
| Combined overview of courses, upcoming deadlines, and grades |
| Daily summary of overdue count, today's deadlines, recent grades, events, and tasks |
| Weekly summary of submitted/graded counts, deadlines, overdue count, and progress |
| Ask a natural language question and have it routed to the right data sources |
Related MCP server: Google Calendar MCP Server
Setup Instructions
Method 1: Using uvx (recommended)
Go to Claude > Settings > Developer > Edit Config > claude_desktop_config.json to include the following
{
"mcpServers": {
"moodle-mcp": {
"command": "uvx",
"args": ["moodle-mcp"],
"env": {
"MOODLE_URL": "https://{your-moodle-url}/webservice/rest/server.php",
"MOODLE_TOKEN": "{your-moodle-token}"
}
}
}
}Restart Claude after changing the config or updating the server, so it picks up the new tools.
Method 2: From a local clone, using the mcp CLI
Clone this repository and create your own
.envfile from.env.exampleRun
uv syncto install the dependencies, including the MCP CLI toolsRun
uv run mcp install main.py -f .envto add the moodle-mcp server to the Claude app
Authentication
Getting your Moodle token
Navigate to your Moodle token management page
https://{your-moodle-url}/user/managetoken.phpUse the token with
Moodle mobile web servicein theServicecolumnAdd this token to your
.envfile, or to theenvblock of your Claude config
Configuration
Variable | Required | Description |
| yes | Your Moodle REST endpoint, |
| yes | Your Moodle web service token |
| no | Default folder for course file downloads (default: |
| no | Save the raw Moodle API responses there as JSON files, for debugging. Unset by default, so nothing is written to disk |
Course file downloads
Downloads use Moodle's /webservice/pluginfile.php endpoint with token
authentication, so the token's service must permit file downloads (the
Moodle mobile web service does).
Call
list_course_files(courseid), thendownload_course_file(courseid, moduleid, filename, output_dir). For duplicate filenames in folder resources, also passfilepathfrom the listing.download_course_files(courseid, output_dir)downloads every file of a course in one call. Amoodle-downloads.jsonmanifest in the output folder records what was downloaded (without tokens), so repeating the call skips files whose source and local SHA-256 are unchanged and retries the ones that failed. Updated or locally edited files are kept, and the new version is saved next to them.Without
output_dir, files go toMOODLE_MCP_DOWNLOAD_DIR/<courseid>(default~/Downloads/moodle-mcp/<courseid>).Existing files are never overwritten. Downloads are streamed, limited to 250 MiB per file and checked against Moodle's file size. Redirects and external file hosts are rejected. Tokens are never returned by these tools.
Only files exposed by the course contents API are downloaded: not external links, embedded page/forum attachments or video streams. Files deleted on Moodle are not deleted locally.
Course catalogue & self enrolment
These tools need the token's service to allow core_course_search_courses,
core_enrol_get_course_enrolment_methods, enrol_self_get_instance_info and
enrol_self_enrol_user (all part of the Moodle mobile web service).
self_enrol_course changes your enrolments, so check get_course_enrolment_methods
first and pass an instanceid when a course has several self-enrolment options.
Moodle's course visibility, enrolment periods, capacity and key requirements still apply.
Enrolment requests use POST, and keys are never logged or saved. If a request times out,
check get_my_courses before retrying, because the enrolment may already have succeeded.
Development
Run the offline test suite (Moodle API calls and file transfers are mocked; no account is needed):
uv run pytestFor available Moodle API functions, please refer to the official documentation.
Available Tools
24 toolsanalyze_assignmentA
Comprehensive analysis of an assignment: status, requirements, materials count, course progress, and deadline info
Inputs: assignid (required).
ask_moodleB
Ask a natural language question about your Moodle data. Routes to the right data sources based on your question
Inputs: question (required).
create_implementation_planC
Create a step-by-step implementation plan for completing an assignment, with timeline, resources, milestones, and risk factors
Inputs: assignid (required).
daily_briefingA
Aggregated daily summary: overdue count, today's deadlines, recent grades, upcoming events, actionable tasks
Inputs: no named parameters.
decompose_taskB
Break down an assignment into subtasks with estimated effort, dependencies, and critical path
Inputs: assignid (required).
extract_assignment_requirementsC
Extract and structure requirements, deliverables, constraints, and evaluation criteria from an assignment description
Inputs: assignid (required).
find_relevant_materialsC
Find course content and search results relevant to a specific assignment, ranked by relevance
Inputs: assignid (required).
get_actionable_tasksB
Returns prioritized list of tasks needing action, sorted by urgency (overdue first)
Inputs: no named parameters.
get_assignmentsA
Get assignments for courses. Optionally filter by course IDs. Returns all enrolled courses' assignments if no course IDs are provided.
Inputs: courseids.
get_assignment_statusB
Get submission and grading status for a specific assignment by its ID
Inputs: assignid (required).
get_course_announcementsA
Gets announcements from course news forums. Optionally filter by course ID
Inputs: courseid.
get_course_contentA
Get sections and modules for a specific course by its ID
Inputs: courseid (required).
get_course_healthB
Overall health check for a course: progress, grades, unsubmitted/overdue counts
Inputs: courseid (required).
get_course_progressB
Progress/completion for courses. Optionally specify a course ID, or get all courses
Inputs: courseid.
get_gradesA
Get grade overview for all courses, or detailed grades for a specific course if courseid is provided
Inputs: courseid.
get_my_coursesA
Get all courses the current user is enrolled in
Inputs: no named parameters.
get_overdue_assignmentsA
Returns assignments past due date that are unsubmitted, sorted by most overdue first
Inputs: no named parameters.
get_recent_activityB
Returns recent activity/updates across courses. Optionally specify 'since' as Unix timestamp (defaults to 7 days ago)
Inputs: since.
get_study_loadB
Study load analysis showing assignment distribution by week, identifying heavy weeks
Inputs: no named parameters.
get_upcoming_deadlinesA
Get upcoming assignment deadlines across all courses, sorted by due date
Inputs: no named parameters.
get_upcoming_eventsB
Get upcoming events from moodle
Inputs: no named parameters.
search_course_materialsC
Search across all course materials by query string
Inputs: query (required).
semester_dashboardA
Get an aggregated overview combining courses, upcoming deadlines, and grades
Inputs: no named parameters.
weekly_reviewB
Aggregated weekly summary: submitted/graded counts, upcoming deadlines, overdue count, progress
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 24 tools
Each tool targets a distinct aspect of Moodle interaction, such as assignments, courses, grades, deadlines, or analytics. Overlapping concepts like 'get_course_progress' and 'get_course_health' are clearly differentiated by their descriptions, with the latter including additional metrics.
All tools use snake_case and follow a verb_noun pattern (e.g., 'get_assignments', 'analyze_assignment', 'create_implementation_plan'). The naming is uniform and predictable, with no mixed conventions or vague verbs.
With 24 tools, the count is slightly above the typical 3-15 range for a well-scoped server. However, each tool serves a specific purpose in assisting with Moodle tasks, making the set reasonable for a comprehensive assistant.
The tools cover a wide range of student-facing operations: retrieving courses, assignments, grades, deadlines, materials, and providing analytical summaries. Missing are direct actions like submitting assignments or updating course content, but the server focuses on analysis and retrieval, so gaps are minor.
Maintenance
Related MCP Connectors
Google Events listings with dates, venues, and ticket links via a hosted MCP server.
Event management for organizers: events, sessions, speakers, agendas, forms, approval-gated writes.
Read events, programmes, speakers, registration orders, tickets and attendance in eventOne.
Event ticketing: create and publish events, read orders, attendees and sales analytics.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables comprehensive calendar management with capabilities to create, list, update, and delete events through a Model Context Protocol server integrated with Google Calendar.55 npm3MIT
- FlicenseNot gradedqualityDmaintenanceModel Context Protocol server that provides seamless access to Google Calendar API with asynchronous operation support, enabling efficient calendar management through a standardized interface.1-
- AlicenseAqualityDmaintenanceProvides comprehensive Google Calendar integration capabilities allowing AI assistants to list, create, update, and delete calendar events through a standardized Model Context Protocol.5MIT
- FlicenseNot gradedqualityDmaintenanceEnables natural language interaction with Google Calendar via the Model Context Protocol, allowing LLMs like Claude to read and manage calendar events through the Google Calendar v3 API.2-