Moodle MCP Server
Read-only Moodle server: assignments, deadlines, grades, courses, forums, notifications.
Moodle MCP scores 67 (Good), licensed MIT and written in TypeScript. It installs as a local process. It declares 9 tools. Filed under Cloud. GitHub shows 1 stars. Package registries report about 61 downloads a week. Install configs are generated for 10 clients. Being listed in the registry is not the same as being vendor-official.
Good trust
67 of 100 from six public signals. Nobody can buy a point.
- Listed in the official MCP registry.
- OSI-style license: mit.
License, quality and maintenance
Quality: Grade A
88/100 for listing completeness. Lost points: 1 of 9 tools barely described, short summary, no docs link.
How quality is graded
Where the 67 comes from
22 + 20 + 1 + 10 + 4 + 10 = 67. Each factor is capped, so no single signal can carry a listing.
Active in the official MCP registry, plus a known vendor namespace.
Registry: 22 of 30 points.How recently the repository saw a commit or release.
Maintenance: 20 of 20 points.GitHub stars and weekly downloads, on a log scale.
Popularity: 1 of 20 points.A clear, OSI-style open-source license.
License: 10 of 10 points.Not archived, a secure install path, a pinned version.
Security: 4 of 10 points.A real summary, a README with depth, listed tools.
Docs: 10 of 10 points.Install
Pick your client, copy the config, paste it in.
Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.
{ "mcpServers": { "fabioov-moodle-mcp": { "command": "npx", "args": [ "-y", "@fabioov/moodle-mcp@0.1.1" ], "env": { "MCP_TRANSPORT": "", "MOODLE_URL": "", "MOODLE_TOKEN": "YOUR_MOODLE_TOKEN" } } }}
Environment variables
| Name | Required | Notes |
|---|---|---|
MCP_TRANSPORT | Optional | Run over stdio for local clients |
MOODLE_URL | Required | Root URL of your Moodle site, e.g. https://moodle.example.edu |
MOODLE_TOKENSecret | Required | Your Moodle web service token (Preferences > Security keys) |
Tools9Tool docs quality grade D
All capabilitiesSubmission/grading status, grade and feedback comments
Sections and activities of a course. Each module has id and instance
get_gradestoolGrade items of a course
Recent Moodle notifications
get_site_infotoolValidates the token; site, Moodle version and current user
Calendar events + assignments in the next N days, each assignment marked submitted or pending
list_assignmentstoolAssignments with due dates, sorted by due date
list_coursestoolYour courses (current ones by default)
Recent discussions of a forum
About
Moodle MCP
An open source, read-only MCP server for Moodle. Connect it to Claude and ask about your assignments, deadlines, grades, courses, forums and notifications in plain language.
Not affiliated with or endorsed by Moodle Pty Ltd. "Moodle" is a trademark of its owner.
What you can ask
- "Which assignments do I still have to hand in this month?"
- "What's due this week, and what have I already submitted?"
- "What are my grades in Machine Learning?"
- "Any new announcements in my courses?"
- "Show me the sections and activities of my Computer Graphics course."
Tools
All tools are read-only and return concise, readable output.
| Tool | What it does | Parameters |
|---|---|---|
get_site_info | Validates the token; site, Moodle version and current user | – |
list_courses | Your courses (current ones by default) | includePast? |
get_course_contents | Sections and activities of a course. Each module has id and instance | courseId |
list_assignments | Assignments with due dates, sorted by due date | courseId?, upcomingOnly?, limit? (25) |
get_assignment_status | Submission/grading status, grade and feedback comments | assignmentId |
get_upcoming_deadlines | Calendar events + assignments in the next N days, each assignment marked submitted or pending | days? (14), onlyPending? |
get_grades | Grade items of a course | courseId |
list_forum_discussions | Recent discussions of a forum | forumId (the instance from get_course_contents) |
get_notifications | Recent Moodle notifications | – |
Requirements
- A Moodle site with Web Services / mobile app access enabled (Moodle 4.x; developed against 4.5).
- Your own web service token (below). Functions your institution disables simply return an error for that tool.
- Node 20+ for the server (Node 22+ to deploy with Wrangler), or Docker, or a free Cloudflare account.
Setup
1. Get your Moodle URL and token
- URL: the root of your Moodle, without a page or
/webservice, e.g.https://moodle.example.edu(if Moodle lives in a subfolder, include it:https://example.edu/moodle). - Token: in Moodle, Preferences → Security keys shows a key for Moodle mobile web service. Some sites
only show a label there; Reset generates a new key (and signs out your Moodle mobile app). Alternatively, if
you log in with a Moodle username and password (not SSO), request one:
curl -s "$MOODLE_URL/login/token.php" -d username=... --data-urlencode password=... -d service=moodle_mobile_app(type the password interactively so it doesn't end up in your shell history).
2. Configure
Copy .env.example to .env and fill in MOODLE_URL, MOODLE_TOKEN and MCP_AUTH_SECRET
(generate the latter with openssl rand -hex 24). .env is git-ignored.
3. Run it, pick one
Cloudflare Workers (free, always on, no domain needed): recommended
npm ci
npx wrangler login
npx wrangler secret put MOODLE_URL # https://your.moodle.edu
npx wrangler secret put MOODLE_TOKEN # your Moodle web service token
npx wrangler secret put MCP_AUTH_SECRET # openssl rand -hex 24
npm run deploy # prints https://moodle-mcp.<you>.workers.dev
Check Cloudflare's current free-tier limits. Try it locally first by copying your .env values to a
git-ignored .dev.vars and running npm run dev:worker.
Docker / Node (self-hosted)
docker build -t moodle-mcp . && docker run --env-file .env -p 3000:3000 moodle-mcp
# or: npm ci && npm run build && npm start
Then expose it over HTTPS (for example with a Cloudflare Tunnel or Tailscale Funnel).
Local only (Claude Desktop / Claude Code, stdio): no install needed:
MCP_TRANSPORT=stdio MOODLE_URL=https://your.moodle.edu MOODLE_TOKEN=... npx -y @fabioov/moodle-mcp
MCP_AUTH_SECRET is not needed in this mode.
4. Add it to Claude
- Claude.ai: Settings → Connectors → Add custom connector. URL
https://<your-host>/mcp, choose No sign-in, then Add headerAuthorization=Bearer <MCP_AUTH_SECRET>. - Claude Code:
claude mcp add --transport http moodle https://<your-host>/mcp --header "Authorization: Bearer <MCP_AUTH_SECRET>" - If a client can only be given a URL, use
https://<your-host>/mcp/<MCP_AUTH_SECRET>. Treat that URL as a password; the header is preferred because URLs end up in logs.
Security and privacy
- Your token acts as you: anyone who can call your endpoint can read what your token can read. Keep
MOODLE_TOKENandMCP_AUTH_SECRETin environment variables or Cloudflare secrets, never in the repo. - The server is read-only by design and has no write tools.
- Whatever the tools return (grades, messages, names) is sent to Claude as part of your conversation. Check your institution's rules on sharing academic data with third-party services before using this, especially if you have access to other people's data (for example as a teacher).
- See SECURITY.md to report a vulnerability.
Known limitations
- Tested mainly against Moodle 4.5 with a student account. Teacher/admin roles and other versions or plugins are untested; reports and fixtures are welcome.
- Sites can disable individual web service functions, so some tools may not work everywhere.
- Large result sets are trimmed (for example, 25 assignments by default) to save context.
Development
npm ci
npm test # unit tests with fixtures (no Moodle needed)
npm run typecheck
npm run dev # HTTP server on :3000 (needs .env)
npm run dev:worker # Cloudflare Worker locally (needs .dev.vars)
See CONTRIBUTING.md. Changes are listed in CHANGELOG.md.
License
Frequently asked questions
What is Moodle MCP Server?
Read-only Moodle server: assignments, deadlines, grades, courses, forums, notifications.
How do I install Moodle MCP Server in Claude Desktop, Cursor, or VS Code?
Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. Moodle MCP Server runs locally from the npm package @fabioov/moodle-mcp with the command npx -y @fabioov/moodle-mcp@0.1.1.
Is Moodle MCP Server free and open source?
Yes. Moodle MCP Server is released under the MIT license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.
Does Moodle MCP Server support remote (HTTP) connections?
No remote endpoint is listed for Moodle MCP Server. It runs locally on your machine over stdio, started by your MCP client.
What tools does Moodle MCP Server provide?
Moodle MCP Server provides 9 tools, including get_assignment_status, get_course_contents, get_grades, and get_notifications. See the full tool list for descriptions and parameters.
How is Moodle MCP Server's trust score calculated?
Moodle MCP Server scores 67 out of 100 (Good). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.
Reviews
No reviews yet—Be the first to review
No published reviews yet. Used it? Tell the next person how it went.
Sign inA verified email is required to review this server.
Add badge to your README
Paste either snippet into the repository README. The image links to this listing.