Back to the map
Agents & Multi-agent Systems2026

moodle-cli

A campus in the terminal, and the same campus as tools an agent can call.

Overview

A command line client and MCP server for Moodle, built on the web-service API instead of scraping HTML. It lists courses, reads a course's sections and activities, downloads material mirroring the section structure, and shows who is enrolled. The MCP server exposes the same four operations to an agent over stdio, with one deliberate difference: downloads return a manifest of paths, sizes, and per-file status rather than file contents, since a single course can hold hundreds of megabytes the agent can read from disk when it needs them.

Highlights

  • Downloads are verified, not assumed: Moodle answers some failed requests with HTTP 200 and a JSON error body, which written to disk becomes a small JSON file wearing a .pdf name. Every transfer is checked against the declared size and content type.
  • Credentials stay out of the shell: the password is prompted for, exchanged once for a long-lived token, and stored in the system keyring. Participant emails are withheld unless explicitly requested, in the CLI and over MCP alike.
  • Unit tests run offline against synthetic but shape-accurate fixtures that reproduce real campus quirks; a separate --live suite catches a campus changing its API underneath them.
Next projectFULBO →