moodle-mcp
Read-only access to a Moodle site (4.x and most 3.x with the mobile app enabled), exposing courses and their sections/materials, file and PDF contents, recent updates, deadlines and calendar events, notifications, forums and discussions, assignments with due dates and submission/grading status, grades, and private or group messages.
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
Ask Claude (or any MCP client) about your Moodle: courses, slides, deadlines, announcements, forums, private messages and grades.
"What's due on Moodle in the next two weeks?" "Summarise the slides of lecture 3 in Linear Algebra." "Anything new in my courses since Monday?" "Did anyone message me on Moodle?"
It works with any Moodle site (4.x and most 3.x) that has the Moodle mobile app enabled, which almost every university does. It is read-only: it can't submit, post, change or mark anything as read.
Quick start
You need uv (one command to install).
uv tool install git+https://github.com/rahul069/moodle-mcp
moodle-mcp setupsetup asks for your Moodle address, signs you in, and adds the server to Claude Code
if it is installed. For other apps it prints the config to paste. That's it.
uvx --from git+https://github.com/rahul069/moodle-mcp moodle-mcp setupRelated MCP server: Moodle MCP
Signing in
moodle-mcp setup looks up how your Moodle handles logins and picks the right way:
Username and password (sites with their own Moodle accounts): type them once. They go only to your Moodle to get a token and are not saved.
University single sign-on (Shibboleth, SAML, Microsoft, ...): setup gives you a link.
Log in to Moodle in your browser as usual.
Open the link from setup in the same browser. Moodle then tries to open the Moodle app with an address starting with
moodlemobile://token=.Copy that address and paste it into setup.
Firefox: it is in the address bar or on the error page.
Chrome / Edge: cancel the "open app" dialog, press F12, open Network, reload, click the
launch.phprow and copy Location from the response headers.
The token is stored in your system keyring (macOS Keychain, Windows Credential Manager,
GNOME Keyring / KWallet). On machines without a keyring it is stored in
~/.config/moodle-mcp/token with permissions 600.
Use it in your MCP client
Claude Code: moodle-mcp setup offers to add it, or run moodle-mcp add-to-claude.
Claude Desktop, Cursor, Windsurf, VS Code, ...: add this to the app's MCP config (Claude Desktop: Settings → Developer → Edit Config):
{
"mcpServers": {
"moodle": { "command": "moodle-mcp" }
}
}If the app can't find moodle-mcp, use the full path (which moodle-mcp) or
"command": "uvx", "args": ["--from", "git+https://github.com/rahul069/moodle-mcp", "moodle-mcp"].
Tools
Tool | What it does |
| your courses with ids |
| sections and materials of a course, with |
| text of a page or PDF, saves files to |
| what changed in the last N days (files, forum posts, grades) |
| upcoming deadlines and calendar events |
| latest notifications (announcements, feedback, grades) |
| forums, discussions and posts |
| assignments with due dates and submission or grading status |
| your grades in a course |
| private and group chats |
Courses can be named by id or by any part of their name ("linear alg", "algorithms").
Commands
moodle-mcp run the MCP server (what your MCP client starts)
moodle-mcp setup connect your Moodle account
moodle-mcp test check the connection
moodle-mcp add-to-claude register with Claude Code
moodle-mcp logout delete the saved site and tokenSettings via environment variables (all optional):
Variable | Meaning |
| use these instead of what |
| file containing the token (or a |
| where |
| don't return the text of PDFs, only save them |
Use it from claude.ai and your phone (optional)
Run moodle-mcp on an always-on machine (a home server or a small cloud VM) as a remote connector and add it in claude.ai → Settings → Connectors → Add custom connector. It then also works in the Claude mobile apps.
moodle-mcp setup # on the server (paste the token; no browser needed there)
moodle-mcp set-passphrase # the passphrase you'll type when connecting claude.ai
moodle-mcp serve --public-url https://your-server.example.comIt listens on 127.0.0.1:8790 only, so put HTTPS in front of it, e.g.
tailscale funnel --bg 8790, a Cloudflare Tunnel, or Caddy/nginx. In claude.ai, use
https://your-server.example.com/mcp as the connector URL. A sign-in page asks for your
passphrase (5 wrong tries lock it for 15 minutes).
# /etc/systemd/system/moodle-mcp.service
[Unit]
Description=Moodle MCP connector
After=network-online.target
[Service]
User=youruser
Environment=MOODLE_TOKEN_FILE=/home/youruser/.config/moodle-mcp/token
ExecStart=/home/youruser/.local/bin/moodle-mcp serve --public-url https://your-server.example.com
Restart=on-failure
NoNewPrivileges=true
ProtectSystem=strict
ReadWritePaths=/home/youruser/.local/state/moodle-mcp /home/youruser/Downloads
PrivateTmp=true
[Install]
WantedBy=multi-user.targetOther clients: only claude.ai/claude.com (and localhost) may receive sign-in codes. To allow
another client, add its redirect host, e.g. for Gemini:
--allow-redirect-host oauth-redirect.googleusercontent.com. moodle-mcp revoke-all signs
every client out.
Privacy and security
Read-only by construction. The client can only call the Moodle web-service functions listed in
api.py(READ_ONLY); everything else is refused before any request is sent.Your data stays between your computer and your Moodle. No telemetry, no third-party servers. Your MCP client (e.g. Claude) sees the tool results you ask for.
The token gives access to your Moodle account. Keep it private. To revoke it, delete it on Moodle under Preferences → Security keys (
/user/managetoken.php), then runmoodle-mcp logout.Content from Moodle (posts, messages, files) is written by other people. Good MCP clients treat it as data, but be aware of prompt injection when you let an assistant act on it.
Development
git clone https://github.com/rahul069/moodle-mcp && cd moodle-mcp
uv sync
uv run pytest
uv run moodle-mcp setupLicense
MIT. Not affiliated with Moodle Pty Ltd. "Moodle" is a registered trademark of Moodle Pty Ltd.
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
Public read-only MCP access to digital learning concepts, semantic relationships, and citations.
Read-only MCP server for ClassQuill, a tutoring-business-management platform.
Read-only MCP access to your DEXUN AdWhiz account: ad accounts, AI recommendations, savings.
Read-only MCP access to sessions, funnels, campaigns, errors, live visitors, and anomalies.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables read-only Moodle access through MCP for querying courses, content, assignments, grades, forums, discussions, submissions, and calendar events, while supporting multiple profiles and local ICS export.358 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables users to read Moodle course information, list courses, outlines, resources, assignments, and deadlines, and download or extract text from course files locally via an MCP-compatible client.MIT
- AlicenseAqualityBmaintenanceEnables AI apps to read a student's Moodle courses, upcoming and overdue due dates, assignment submission statuses, course grades, gradebook items and announcements. It is strictly read only, so it can never submit, edit or delete anything.17186 npmMIT
- AlicenseAqualityCmaintenanceEnables AI assistants to securely read course outlines, deadlines, announcements, forum discussions, and files from Moodle, track changes, and download or mirror course materials with a personal read-only token.101MIT