Skip to main content
Glama

Moodle Downloader MCP

Download courses from any Moodle site for offline study — CLI + MCP server for AI agents.

Personal use only. Don’t redistribute materials you download.

License: MIT Python 3.11+

Agents: README.agents.md · paste-ready prompt below.


Give this to your AI agent

Copy into Grok / Claude / Cursor / Codex (fill the blanks):

Install and set up Moodle Downloader MCP from:
https://github.com/stojandev/moodle-downloader-mcp

1. Clone the repo (or use my existing checkout), create a venv, pip install -e .
2. Read README.agents.md and follow it (always use --json; never print passwords/tokens).
3. Ask me only for:
   - Moodle base URL (e.g. https://moodle.my-school.edu)
   - Username (exactly as on the portal — don’t invent the format)
   - Password (or webservice token if I have one)
4. Run: moodle-agent probe --url <URL> --json
5. Then: init with MOODLE_URL / MOODLE_USER / MOODLE_PASS (or --token) --out ./courses --force --json
6. Verify: moodle-agent whoami --json
7. Sync all courses: moodle-agent sync --out ./courses --json
8. Optionally register MCP: moodle-agent-mcp from the venv (see README).

My Moodle URL: _______________
My username: _______________

Related MCP server: Moodle MCP Server

Install

Requires: Python 3.11+

git clone https://github.com/stojandev/moodle-downloader-mcp.git
cd moodle-downloader-mcp
python3 -m venv .venv
source .venv/bin/activate
pip install -e .
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -e .

Check:

moodle-agent version

Command

Role

moodle-agent

CLI

moodle-agent-mcp

MCP server (for AI tools)


Quick start

moodle-agent setup
moodle-agent init --url "https://moodle.example.edu" -u YOUR_USER
moodle-agent courses list
moodle-agent sync --out ./courses
  • Any school — pass your Moodle URL; username is whatever you use on the portal.

  • Password is prompted and not stored (only a token).

  • Config: ~/.config/moodle-agent/ · Windows %APPDATA%\moodle-agent\


MCP (optional)

Point your client at the binary from the venv:

# e.g. ~/.grok/config.toml
[mcp_servers.moodle-agent]
command = "/full/path/to/.venv/bin/moodle-agent-mcp"   # Windows: ...\.venv\Scripts\moodle-agent-mcp.exe
enabled = true
tool_timeout_sec = 3600

Docs

README.agents.md

AI agents — auth, commands, MCP

docs/WIKI.md

LLM wiki (cheap follow-up sessions)

docs/AGENT_GUIDE.md

Full agent runbook

Limits (v0.1): no forums/quizzes; course-level download only; Python 3.11+.

License

MIT · © 2026 Aleksa Stojanović

Available Tools

13 tools
moodle_configA

Show moodle-agent config path and site profiles (token redacted).

Inputs: no named parameters. Returns: result

moodle_course_downloadA

Full download of one course into --out (or config out_dir). force=true re-downloads even if size matches. Can take several minutes.

Inputs: course_id (required), out, site, force. Returns: result

moodle_courses_listB

List enrolled Moodle courses (id, shortname, fullname).

Inputs: site. Returns: result

moodle_course_syncA

Incremental sync one course (skip unchanged files by size). Use this to repair incomplete downloads.

Inputs: course_id (required), out, site. Returns: result

moodle_course_treeA

Show sections and modules (with file counts) for one course id.

Inputs: course_id (required), site. Returns: result

moodle_initA

Log in to ANY Moodle site and save webservice token (password is not stored). Username format is school-specific — pass exactly what the user uses on the portal. Prefer token if available. Password goes only via env to the child process.

Inputs: url (required), force, token, out_dir, +5 more. Returns: result

moodle_probeA

Check if a Moodle base URL is reachable and Mobile token login looks available. No credentials required.

Inputs: url (required), service. Returns: result

moodle_setupA

Universal setup schema + auth status for any Moodle school. Call first when unauthenticated. Never invent username formats.

Inputs: no named parameters. Returns: result

moodle_sync_allC

Sync all enrolled courses. Long-running.

Inputs: out, site. Returns: result

moodle_whoamiC

Verify saved Moodle token and return current user/site info.

Inputs: site. Returns: result

moodle_wiki_rebuild_indexB

Rebuild _wiki/INDEX.md from filled card frontmatter.

Inputs: out, course_id, course_dir. Returns: result

moodle_wiki_scaffoldA

Create/update _wiki stubs for a downloaded course (by path or course_id).

Inputs: out, course_id, course_dir. Returns: result

moodle_wiki_statusC

Show ready vs pending wiki cards for a local course.

Inputs: out, course_id, course_dir. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 13 tools

    Disambiguation3/5

    The authentication tools (moodle_setup, moodle_probe, moodle_config, moodle_whoami, moodle_init) have overlapping responsibilities around setup and token verification, which could cause confusion. Course and wiki tools are clearly distinct, but the auth cluster blurs boundaries.

    Naming Consistency2/5

    Tool names mix verb-first patterns (moodle_setup, moodle_sync_all) with noun-first patterns (moodle_courses_list, moodle_wiki_scaffold). Some names use nouns as actions (moodle_course_tree, moodle_wiki_status), breaking a consistent verb_noun convention.

    Tool Count5/5

    With 13 tools, the server is well-scoped for its purpose of downloading Moodle courses and managing wiki scaffolding. Each tool addresses a distinct step in the workflow, and the count feels neither sparse nor bloated.

    Completeness4/5

    Core workflows are covered: authentication, course listing, downloading, syncing, and wiki generation. Minor gaps exist, such as no explicit logout or local download management tool, but agents can likely work around these.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      A powerful Model Context Protocol (MCP) server that seamlessly integrates AI assistants with Moodle Learning Management System. Enable your AI assistant to access courses, retrieve educational content, download resources, and search through your learning materials.
      1
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI assistants to browse your own university courses by downloading files, slides, announcements, deadlines, grades and lecture transcripts to your machine, then answering questions and searching across them through MCP tools. It logs in with your own account and refreshes only what changed.
      MIT