Connector guide9-minute read24 MCP tools7 languages

Connect Moodle to Claude via MCP

Moodle learning platform over its Web Services REST protocol: courses and course content, participants, users, grades, activity completion, assignments and submissions, quizzes, calendar and deadlines, forums and messages. Site URL and web service token.

HCBy HelpCode teamUpdated 9 min read Open-source on GitHub

No credit card · 7-day trial · Self-host alternative available

Moodle

Moodle

Moodle learning platform over its Web Services REST protocol: courses and course content, participants, users, grades, activity completion, assignments and submissions, quizzes, calendar and deadlines, forums and messages. Site URL and web service token.

tools

24

Region

INTL

Category

Education

Authentication

Query Param Auth

Required env vars

MOODLE_URLMOODLE_TOKEN
Install in one click on Cloud

7-day free trial · No credit card

  • 7-day free trial
    No credit card required
  • GDPR & SOC 2 ready
    EU data residency, audit logs
  • Open-source on GitHub
    Open source · AGPL-3.0
  • Works with ChatGPT, Claude, Gemini
    Any MCP-compatible client

Summary

Moodle learning platform over its Web Services REST protocol: courses and course content, participants, users, grades, activity completion, assignments and submissions, quizzes, calendar and deadlines, forums and messages. Site URL and web service token.

Guided setup

Connect Moodle to Claude in 2 minutes

Start a free trial on AnythingMCP Cloud, connect Moodle in the guided setup, then add your MCP URL to Claude. No code and no server to run.

No credit card · 7-day trial · Self-host alternative available

AnythingMCP is listed in Claude's connector directory: add it to Claude in one click (opens in a new tab), then sign in and choose which MCP servers Claude may use.

Try asking

Example prompts for Moodle

Click any prompt to copy it. Paste into Claude, ChatGPT, Cursor, Gemini, Copilot or OpenClaw to run it against this connector.

Moodle · live via MCP
Share
Opus 4.7

Claude is AI and can make mistakes. Please double-check responses.

💡 No install? Use cloud.anythingmcp.com directly. Sign in, click Connectors → Moodle, enter your Moodle site address and a web service token, mint an MCP API key and you're done. No Docker, no git clone, no local server.

Moodle + Claude

Moodle learning platform over its Web Services REST protocol: courses and course content, participants, users, grades, activity completion, assignments and submissions, quizzes, calendar and deadlines, forums and messages. Site URL and web service token.

Prerequisites

See the full setup instructions baked into the connector (visible in the in-app store when you select the connector). The required environment variables for this connector are:

MOODLE_URL, MOODLE_TOKEN

Step 1 — Get credentials

Setup by a Moodle administrator (about 10 minutes)

  1. Site administration, General, Advanced features: tick Enable web services and save.
  2. Site administration, Server, Web services, Manage protocols: enable the REST protocol.
  3. Web services, External services: add a service (enabled), then Add functions and add the functions named in the list below. The built-in Moodle mobile web service already contains all of them except core_user_get_users, and can be used instead when Mobile app, Mobile settings, Enable web services for mobile devices is on.
  4. Choose the user the connector acts as, ideally a dedicated account. Its role needs the capability Use REST protocol (webservice/rest:use) and the rights for what you want to read: a teacher or manager role for participants, grades of others and submissions.
  5. Web services, Manage tokens, Create token: pick that user and the service, save and copy the token into MOODLE_TOKEN.
  6. Put the address of the site into MOODLE_URL, without a slash at the end, e.g. https://moodle.myschool.org.

A user without administrator rights can use their own token of the mobile service, shown under Preferences, Security keys when the site allows it. The connector then sees exactly what that user sees.

Where to start: moodle_get_site_info checks the token and returns userid. Then moodle_list_my_courses (or moodle_list_user_courses) for the course ids everything else needs.

Courses: moodle_list_my_courses, moodle_list_user_courses, moodle_search_courses, moodle_get_courses_by_field, moodle_list_courses (all courses, manager token), moodle_list_categories and moodle_get_course_contents for sections, activities and files.

People: moodle_list_enrolled_users (participants of a course), moodle_get_users_by_field (exact lookup by id, username, email, idnumber), moodle_search_users (custom service only).

Progress: moodle_get_grade_items (grade report of a course), moodle_get_course_grades_overview (final grades across courses), moodle_get_completion_status (activity completion).

Activities: moodle_list_assignments, moodle_list_assignment_submissions, moodle_list_quizzes. Calendar: moodle_list_calendar_events, moodle_list_upcoming_deadlines. Forums: moodle_list_forums, moodle_list_forum_discussions, moodle_get_discussion_posts. Messages: moodle_list_conversations and moodle_send_message, the only tool that writes.

Functions behind the tools (add these to a custom service): core_webservice_get_site_info, core_course_get_enrolled_courses_by_timeline_classification, core_enrol_get_users_courses, core_course_get_courses, core_course_get_courses_by_field, core_course_search_courses, core_course_get_contents, core_course_get_categories, core_enrol_get_enrolled_users, core_user_get_users_by_field, core_user_get_users, gradereport_user_get_grade_items, gradereport_overview_get_course_grades, core_completion_get_activities_completion_status, mod_assign_get_assignments, mod_assign_get_submissions, mod_quiz_get_quizzes_by_courses, core_calendar_get_calendar_events, core_calendar_get_action_events_by_timesort, mod_forum_get_forums_by_courses, mod_forum_get_forum_discussions, mod_forum_get_discussion_posts, core_message_get_conversations, core_message_send_instant_messages.

Errors come with HTTP 200: Moodle answers a failed call with status 200 and a body holding exception, errorcode and message. The connector turns that into a failed call. Common codes: invalidtoken (token wrong, expired or deleted), accessexception (the function is not in the service of the token, or web services are off), nopermissions (the user lacks a capability, named in the message), invalidparameter (a value has the wrong type) and invalidrecord (no such id). Many tools also return warnings next to the data when single items were skipped: read them.

Ids: Moodle has three ids per activity. cmid (course module id) is the one in page addresses and in moodle_get_course_contents; instance (or id in the assignment, quiz and forum lists) is what the activity tools take. User, course and group ids are plain numbers.

Values: times are Unix seconds (0 means not set). Flags are numbers: 1 for yes, 0 for no; Moodle refuses the words true and false. Texts such as summary, intro and message are HTML.

Permissions: every call runs as the user of the token. A student token reads its own courses, grades and deadlines; lists of participants, grades of others and submissions need a teacher or manager. There is no documented rate limit; the site's own capacity is the limit, so prefer one call with several course ids over one call per course.

Step 2 — Install the adapter

curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d

Step 3 — Add the connector in Claude

Your server URL: in AnythingMCP, open MCP Servers → the server this connector is on, and copy its URL (https://cloud.anythingmcp.com/mcp/…). Use it wherever this guide shows YOUR_SERVER_ID.

Recommended path: works on claude.ai web without editing any config file.

  1. In Claude, open Plugins (still called Customize on some plans) → Connectors.
  2. Click + Add, then Add custom connector.
  3. Enter a name, e.g. Moodle, and the remote MCP server URL https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID, then click Continue, keep the detected settings and click Continue again.
  4. Choose Sign in now, click Add and sign in to AnythingMCP (OAuth) to allow access.

All tools below appear in your chat: start typing prompts.

Available tools

ToolWhat it does
moodle_get_site_infoRead the site and the user the token belongs to: sitename, siteurl, release (Moodle version), userid, username, fullname, lang and whether…
moodle_list_my_coursesList the courses of the token user as on the Moodle dashboard: id, fullname, shortname, summary, startdate, enddate (Unix seconds)…
moodle_list_user_coursesList the courses a user is enrolled in: id, shortname, fullname, category, startdate, enddate, lastaccess (Unix seconds), progress in…
moodle_list_coursesRead courses by id with their settings: id, shortname, fullname, categoryid, summary, format, startdate, enddate, visible, numsections…
moodle_get_courses_by_fieldFind courses by one field and read what the token user may see of them: id, fullname, shortname, categoryid, categoryname, summary…
moodle_search_coursesSearch the course catalogue by text: per course id, fullname, shortname, categoryid, categoryname, summary, contacts (teachers) and…
moodle_get_course_contentsRead the content of a course: its sections (id, name, summary, section number, visible) and in each the activities and resources as…
moodle_list_categoriesList course categories: id, name, description, parent (0 at the top level), coursecount, depth and path. Without a filter every category…
moodle_list_enrolled_usersList the participants of a course: id, username, fullname, email, idnumber, department, lastaccess and lastcourseaccess (Unix seconds)…
moodle_get_users_by_fieldLook up users by id, username, email or idnumber (exact values): id, username, firstname, lastname, fullname, email, department, idnumber…
moodle_search_usersSearch the users of the site by one field: id, username, firstname, lastname, fullname, email, idnumber, department, lastaccess and…
moodle_get_grade_itemsRead the grade report of a course: per user gradeitems with itemname, itemtype (mod, category, course), itemmodule, graderaw…
moodle_get_course_grades_overviewRead the final grade of a user in every course they are enrolled in: courseid, grade (as displayed) and rawgrade. Use…
moodle_get_completion_statusRead which activities of a course a user has completed: per activity cmid, modname, instance, state (0 not completed, 1 completed, 2…
moodle_list_assignmentsList the assignments of courses: per course assignments with id, cmid, name, intro, duedate, allowsubmissionsfromdate, cutoffdate…
moodle_list_assignment_submissionsList the submissions of assignments: per assignment submissions with id, userid, attemptnumber, status (new, draft, submitted, reopened)…
moodle_list_quizzesList the quizzes of courses: id, coursemodule, course, name, intro, timeopen, timeclose (Unix seconds, 0 when not set), timelimit in…
moodle_list_calendar_eventsList calendar events: id, name, description, courseid, groupid, userid, modulename, instance, eventtype (user, course, group, site, due…
moodle_list_upcoming_deadlinesList what the token user has to do next, as on the Moodle timeline: events with an action such as an assignment to submit or a quiz to…
moodle_list_forumsList the forums of courses: id, course, name, intro, type (news, general, qanda, single and others), cmid, numdiscussions…
moodle_list_forum_discussionsList the discussions of a forum: per discussion discussion (the discussion id for moodle_get_discussion_posts), name, subject, message of…
moodle_get_discussion_postsRead all posts of a forum discussion: id, subject, message (HTML), author (id, fullname), parentid (the post it answers), timecreated…
moodle_list_conversationsList the private conversations of the token user: id, name, type (1 between two users, 2 group, 3 notes to self), membercount, unreadcount…
moodle_send_messageSend a private Moodle message from the token user to another user. The recipient is notified as their Moodle preferences say (web, email…

Example prompts

  • "Which assignments are due in my courses this week?"
  • "List the participants of course 42 who have not submitted the essay assignment."
  • "Show my grade overview across all courses."
  • "Which activities of the Biology 101 course have I not completed yet?"
  • "Summarise the latest discussions in the course forum."

FAQ

Does it work with Claude Code as well as Claude Desktop? Yes, point both at https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID.

Where does the token come from? A Moodle administrator enables web services and the REST protocol, adds a service with the functions the tools use (the built-in Moodle mobile web service already has all but one), and creates a token for a user under Manage tokens. Users can also use their own mobile service token from Preferences, Security keys when the site allows it. On AnythingMCP Cloud the site must be reachable from the internet over HTTPS.

What can it see? Exactly what the token's user may see: a student token reads its own courses, grades and deadlines; participants, grades of others and submissions need a teacher or manager. It covers courses and content, users, grades, activity completion, assignments and submissions, quizzes, the calendar, forums and private messages, for Moodle 4 and 5, self-hosted or MoodleCloud.

Which tools write, and what installs switched off? Only moodle_send_message writes, it sends a private message. Nothing installs switched off.

Next steps

Was this guide helpful?

Connect Moodle to Claude in 2 minutes

Start a free trial on AnythingMCP Cloud, connect Moodle in the guided setup, then add your MCP URL to Claude. No code and no server to run.

Related guides

Connectors

Connect Moodle to ChatGPT via MCP

Moodle learning platform over its Web Services REST protocol: courses and course content, participants, users, grades, activity completion, assignments and submissions, quizzes, calendar and deadlines, forums and messages. Site URL and web service token.

Connectors

Connect Moodle to Microsoft Copilot via MCP

Moodle learning platform over its Web Services REST protocol: courses and course content, participants, users, grades, activity completion, assignments and submissions, quizzes, calendar and deadlines, forums and messages. Site URL and web service token.

Connectors

Connect Moodle to Cursor via MCP

Moodle learning platform over its Web Services REST protocol: courses and course content, participants, users, grades, activity completion, assignments and submissions, quizzes, calendar and deadlines, forums and messages. Site URL and web service token.

Connectors

Connect Moodle to Gemini CLI via MCP

Moodle learning platform over its Web Services REST protocol: courses and course content, participants, users, grades, activity completion, assignments and submissions, quizzes, calendar and deadlines, forums and messages. Site URL and web service token.

Connectors

Connect Moodle to Meta Muse via MCP

Moodle learning platform over its Web Services REST protocol: courses and course content, participants, users, grades, activity completion, assignments and submissions, quizzes, calendar and deadlines, forums and messages. Site URL and web service token.

Connectors

Moodle MCP Server: Courses, Grades and Assignments

Moodle learning platform over its Web Services REST protocol: courses and course content, participants, users, grades, activity completion, assignments and submissions, quizzes, calendar and deadlines, forums and messages. Site URL and web service token.