moodle-mcp
Provides full access to Moodle learning management systems, enabling tools for retrieving courses, files, assignments, grades, quizzes, calendar events, forums, and notifications from educational institutions.
Enables building linked Obsidian knowledge vaults from course materials, creating wikilinks between concepts, generating study notes, and performing natural language searches across course content.
Click on "Install 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-mcpwhat assignments are due this week for my calculus course?"
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
Give Claude full access to your Moodle โ courses, files, assignments, grades, quizzes, calendar, and more. Build Obsidian study vaults from your lecture notes in one command.
๐ฆ moodle-mcp on npm โ
npx moodle-mcp
14 tools ยท 5 prompts ยท MCP Resources
Install
Step 1 โ Get your Moodle token
See Getting Your Token below. You'll need this for any install method.
Step 2 โ Pick your delivery mode
Option A โ Local (zero hosting): Runs npx moodle-mcp on your machine each time your MCP client starts. No server, no cost, nothing to deploy.
Option B โ Hosted (Cloudflare Worker): Deploy once, get a permanent URL. Your MCP client connects to the URL โ no npx on the client side.
After deploying, set MOODLE_URL and MOODLE_TOKEN as secrets in the CF dashboard or via:
npx wrangler secret put MOODLE_URL
npx wrangler secret put MOODLE_TOKEN
npm run deployYour URL will be https://moodle-mcp.<your-subdomain>.workers.dev.
Step 3 โ Configure your MCP client
Config file:
Mac:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Option A โ Local:
{
"mcpServers": {
"moodle": {
"command": "npx",
"args": ["-y", "moodle-mcp"],
"env": {
"MOODLE_URL": "https://moodle.yourschool.edu",
"MOODLE_TOKEN": "your_token_here"
}
}
}
}Option B โ Hosted:
{
"mcpServers": {
"moodle": {
"url": "https://moodle-mcp.your-subdomain.workers.dev"
}
}
}Option A โ Local:
claude mcp add moodle npx -- -y moodle-mcp \
-e MOODLE_URL=https://moodle.yourschool.edu \
-e MOODLE_TOKEN=your_token_hereOption B โ Hosted:
claude mcp add moodle --transport http https://moodle-mcp.your-subdomain.workers.devConfig file: ~/.cursor/mcp.json (global) or .cursor/mcp.json (project)
Option A โ Local:
{
"mcpServers": {
"moodle": {
"command": "npx",
"args": ["-y", "moodle-mcp"],
"env": {
"MOODLE_URL": "https://moodle.yourschool.edu",
"MOODLE_TOKEN": "your_token_here"
}
}
}
}Option B โ Hosted:
{
"mcpServers": {
"moodle": {
"url": "https://moodle-mcp.your-subdomain.workers.dev"
}
}
}Config file: .vscode/mcp.json in your project, or settings.json globally.
Option A โ Local:
{
"servers": {
"moodle": {
"command": "npx",
"args": ["-y", "moodle-mcp"],
"env": {
"MOODLE_URL": "https://moodle.yourschool.edu",
"MOODLE_TOKEN": "your_token_here"
}
}
}
}Option B โ Hosted:
{
"servers": {
"moodle": {
"url": "https://moodle-mcp.your-subdomain.workers.dev"
}
}
}Config file: ~/.codeium/windsurf/mcp_config.json
Option A โ Local:
{
"mcpServers": {
"moodle": {
"command": "npx",
"args": ["-y", "moodle-mcp"],
"env": {
"MOODLE_URL": "https://moodle.yourschool.edu",
"MOODLE_TOKEN": "your_token_here"
}
}
}
}Option B โ Hosted:
{
"mcpServers": {
"moodle": {
"url": "https://moodle-mcp.your-subdomain.workers.dev"
}
}
}Config file: ~/.config/zed/settings.json
Option A โ Local:
{
"context_servers": {
"moodle": {
"command": {
"path": "npx",
"args": ["-y", "moodle-mcp"],
"env": {
"MOODLE_URL": "https://moodle.yourschool.edu",
"MOODLE_TOKEN": "your_token_here"
}
}
}
}
}Option B โ Hosted:
{
"context_servers": {
"moodle": {
"url": "https://moodle-mcp.your-subdomain.workers.dev"
}
}
}Config file: ~/.continue/config.json
Option A โ Local:
{
"mcpServers": [
{
"name": "moodle",
"command": "npx",
"args": ["-y", "moodle-mcp"],
"env": {
"MOODLE_URL": "https://moodle.yourschool.edu",
"MOODLE_TOKEN": "your_token_here"
}
}
]
}Option B โ Hosted:
{
"mcpServers": [
{
"name": "moodle",
"url": "https://moodle-mcp.your-subdomain.workers.dev"
}
]
}Open the Cline sidebar in VS Code โ MCP Servers โ Add Server โ paste the JSON:
Option A โ Local:
{
"moodle": {
"command": "npx",
"args": ["-y", "moodle-mcp"],
"env": {
"MOODLE_URL": "https://moodle.yourschool.edu",
"MOODLE_TOKEN": "your_token_here"
}
}
}Option B โ Hosted:
{
"moodle": {
"url": "https://moodle-mcp.your-subdomain.workers.dev"
}
}OpenAI has announced MCP support for ChatGPT. Check the OpenAI blog for the release date. Once available, the hosted URL option (Option B) will work directly.
Getting Your Token
Option A โ Moodle profile page (works everywhere)
Log in to your school's Moodle in a browser
Go to Profile โ Security keys (URL:
https://moodle.yourschool.edu/user/managetoken.php)Find the Moodle mobile web service token and copy it
Set
MOODLE_TOKEN=<token>in your MCP config
Option B โ Get the token from
https://moodle.yourschool.edu/login/token.php?username=<YOURUSERNAME>&password=<YOURPASSWORD>&service=moodle_mobile_app
Option C โ Username + password (not SSO schools)
If your school uses a regular username/password (not Microsoft/Google/SSO), you can skip the token step entirely:
"env": {
"MOODLE_URL": "https://moodle.yourschool.edu",
"MOODLE_USERNAME": "your_username",
"MOODLE_PASSWORD": "your_password"
}โ ๏ธ SSO schools: If your school login page redirects to Microsoft, Google, or another identity provider, Option B won't work. Use Option A or C.
Option D โ Extract from Moodle mobile app (SSO schools)
Install the Moodle app on your phone and log in with SSO
Go to App settings โ About
Tap the version number 5 times to enable developer mode
Go to Developer options โ Copy token and copy it
Use that token as
MOODLE_TOKENin Option A
Tools
Tool | Description | Params |
| School name, Moodle version, which APIs are enabled | โ |
| All your enrolled courses | โ |
| Sections and all activities in a course |
|
| Files and links grouped by section โ returns opaque |
|
| Read a file by its |
|
| Assignments with due dates, grouped by section |
|
| Submission status and grade feedback |
|
| Full grade report with categories and feedback |
|
| Upcoming events across courses |
|
| Quizzes with time limits and open dates |
|
| Your past attempt grades and states |
|
| Forum activities in a course |
|
| Recent discussions in a forum |
|
| Recent notifications (grades, feedback, replies) |
|
Prompts
Use these in any MCP client that supports prompts (Claude Desktop, VS Code with Copilot, etc.):
Prompt | Use case | Example |
| Full course overview organized by section |
|
| Prioritized due dates this week / next week |
|
| Build a linked Obsidian vault from course materials |
|
| Topic-by-topic study guide based on grades and quiz results |
|
| Natural language search across all course files |
|
Obsidian Finals Prep
Turn your entire semester into a linked knowledge graph in one command.
Setup
Install Obsidian (free, works on Mac/Windows/Linux)
Create a new vault, e.g.
~/obsidian/finalsMake sure
moodle-mcpis connected to your MCP client
Build the vault
Use the /build-study-notes prompt in Claude Desktop:
/build-study-notes courseId=42 vaultPath=~/obsidian/finalsOr paste this directly into Claude:
Pull my [Course Name] (course ID 42), read all the lecture notes and slides,
and build a linked Obsidian vault at ~/obsidian/finals โ one note per topic,
with [[wikilinks]] between related concepts, a MOC.md index, and tags for each section.Claude will:
Pull all your course sections, files, assignments, and grades
Read each PDF and document directly via the MCP resources protocol
Write one
.mdfile per section with key concepts, definitions, and examplesAdd
[[wikilinks]]between related terms across notesCreate a
MOC.md(Map of Content) index linking everything
See the graph
Option A โ Obsidian Graph View (built-in, free)
Open the vault in Obsidian
Click Graph View (sidebar icon or
Cmd+G)Your entire course appears as a knowledge graph โ linked concepts cluster together, isolated topics stand out as things to review
Option B โ Graphify (richer visual graph)
Install Graphify โ it reads the same
.mdfiles Obsidian writesPoint it at your vault folder (
~/obsidian/finals)Drag to explore connections; click any node to open the note and ask Claude about it
Both tools read the same Markdown vault โ you can use both.
Knowledge Graph preview
Query the graph with Claude
Once the vault exists on disk, you can ask Claude Code or Claude Desktop questions like:
Explain the relationship between [[topic A]] and [[topic B]] in my course notes at ~/obsidian/finalsBased on my notes in ~/obsidian/finals, which topics do I need to review most before the exam?Claude reads your .md files directly and reasons across the full linked graph.
Natural language search
Once the vault is built, you can ask Claude to find specific content:
/search-notes courseId=42 query="the central limit theorem and when to use it"Claude will look through all your course materials, find the relevant files, read them, and synthesize a direct answer.
Compatibility
Some tools require your Moodle admin to enable specific web services. Run moodle_get_site_info to see which tools are available on your school's Moodle.
Tool | Required | Notes |
| Always available | Core Moodle WS |
| Admin must enable |
|
| Admin must enable |
|
| Usually available |
|
| Admin may need to enable |
|
| Admin may need to enable |
|
| Admin may need to enable |
|
If a tool isn't available, it returns a helpful message explaining what your admin needs to enable โ it won't crash the server.
Security & file access (v0.2)
Tool responses never contain raw or authenticated Moodle file URLs. Instead, moodle_list_resources returns opaque fileIds โ AES-GCM-sealed envelopes bound to your Moodle account via the access token. Pass a fileId to moodle_download_file, and the server:
Decrypts the
fileIdand checks it was issued to you (not another user).Re-checks with Moodle that the file is still visible to you (catches unenrolment, hidden modules, removed files).
Refuses anything that isn't a
pluginfile.phpURL on your Moodle host (no SSRF relay).Fetches the file server-side with the token attached to the outbound request only โ the token never appears in anything returned to the MCP client.
Returns text for text/JSON/XML MIMEs, or the bytes as an MCP embedded resource (base64) for PDFs/DOCX/images.
This fixes the "domain not in the list of allowed fetch" error seen with Claude.ai's beta connectors when a chat tried to open a Moodle-hosted PDF: Claude no longer has to fetch anything cross-origin, because the content arrives inside the MCP response.
Limits: 25 MB per file by default (override with MOODLE_MCP_MAX_FILE_MB=<positive number>). File IDs expire after 24 hours. Rotating your Moodle token invalidates all outstanding IDs.
Contributing
Issues and PRs welcome. Open an issue first for large changes.
MIT License โ ยฉ 2026 Alexandre Ribeiro
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/1alexandrer/moodle-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server