Moodle Downloader MCP
# Moodle Downloader MCP
Download courses from **any Moodle site** for offline study — CLI + [MCP](https://modelcontextprotocol.io/) server for AI agents.
> Personal use only. Don’t redistribute materials you download.
[](LICENSE)
[](https://www.python.org/downloads/)
**Agents:** [README.agents.md](README.agents.md) · paste-ready prompt below.
---
## Give this to your AI agent
Copy into Grok / Claude / Cursor / Codex (fill the blanks):
```text
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: _______________
```
---
## Install
**Requires:** Python 3.11+
```bash
git clone https://github.com/stojandev/moodle-downloader-mcp.git
cd moodle-downloader-mcp
```
<details>
<summary><strong>Linux / macOS</strong></summary>
```bash
python3 -m venv .venv
source .venv/bin/activate
pip install -e .
```
</details>
<details>
<summary><strong>Windows (PowerShell)</strong></summary>
```powershell
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -e .
```
</details>
Check:
```bash
moodle-agent version
```
| Command | Role |
|---------|------|
| `moodle-agent` | CLI |
| `moodle-agent-mcp` | MCP server (for AI tools) |
---
## Quick start
```bash
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:
```toml
# 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](README.agents.md) | AI agents — auth, commands, MCP |
| [docs/WIKI.md](docs/WIKI.md) | LLM wiki (cheap follow-up sessions) |
| [docs/AGENT_GUIDE.md](docs/AGENT_GUIDE.md) | Full agent runbook |
**Limits (v0.1):** no forums/quizzes; course-level download only; Python 3.11+.
## License
[MIT](LICENSE) · © 2026 Aleksa Stojanović
TDQS
Scored across 13 tools
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.
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.
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.
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.