ClaudeMap

Moodle-MCP

A zero-dependency read-only Moodle MCP server: one stdlib-only Python file, ten tools that read assignments, deadlines and course files straight from the Moodle Web Service API — no browser, no scraping (MIT)

MCP Serversmoodlelmseducationread-onlymcp

Moodle-MCP connects Moodle — the LMS a large share of universities run — to MCP tools (204 stars as of writing, 2026-11-09; currently version 1.4.0): a single server.py using only the Python standard library (urllib, json, ssl), zero third-party dependencies, working against any Moodle 3.x/4.x site with Web Services and the REST protocol enabled (verified by the author on Moodle 4.3.6 with a full 435-function grant; MCP protocol 2024-11-05, Python 3.8+). Ten read-only tools: moodle_weekly_digest summarizes recent additions, due-soon and overdue in one call; moodle_pending_assignments splits unsubmitted work into due-soon / overdue / no-pressure with days remaining computed; moodle_quiz_status (since 1.3.0) reads real attempt state, best score and the open-close window from mod_quiz_get_user_attempts; moodle_course_files lists section structure and direct file URLs (metadata only, nothing downloaded); moodle_download_week (since 1.1.0) pulls one week's slides and attachments locally, verifying sizes and skipping files already present — it only writes your disk, and no submit, enrol, edit or delete endpoint exists in the code. Two token-free tools added in 1.4.0 — moodle_setup_guide and moodle_config_status — hand over setup instructions instead of dead-ending on TOKEN_MISSING. Calls are serialized with a 150 ms gap so site WAFs stay calm. A companion skill, moodle-course-watch (mounted as a git submodule under skill/ and also a standalone repo), layers coursework diffing, week-folder mirroring and unsubmitted-list workflows on top.

What it does

  • One zero-dependency Python file (stdlib urllib/json/ssl only) — copy server.py anywhere and run python server.py
  • Ten read-only tools: weekly digest, pending assignments split due-soon/overdue/no-pressure, quiz attempt state (1.3.0), course files with direct URLs, per-week download (1.1.0)
  • Deadline-aware by design: days-remaining computed for you; quizzes get their own tool because mod_quiz is not mod_assign
  • Token-free helpers (1.4.0): moodle_setup_guide walks first-time token setup; moodle_config_status self-checks config with the token masked to 4 characters
  • WAF-friendly engineering: serialized calls with a 150 ms gap, since hammering Moodle gets you 502
  • Read-only by design — no submit, enrol, edit or delete endpoint exists in the code

When to use it

For students who want "what do I still owe this week?" answered by their agent, and for anyone whose institution runs Moodle 3.x/4.x with Web Services enabled; the companion moodle-course-watch skill suits anyone who wants a continuous mirror-new-material-and-list-unsubmitted workflow.

Getting started

# 1) get a token: Moodle web UI → Preferences → Account → Security → Manage access keys → Create
#    (service: Moodle mobile web service; SSO-only accounts must use the web UI — get_token.py needs a local password)

# 2) config.json next to server.py (MOODLE_URL / MOODLE_TOKEN env vars take precedence):
{
  "url": "https://moodle.your-school.edu",
  "token": "your_token_here"
}

# 3) register in Claude Desktop / Cursor mcp.json:
{
  "mcpServers": {
    "moodle": {
      "command": "python",
      "args": ["<absolute path to server.py>"]
    }
  }
}

# 4) verify: ask your client to call moodle_site_info — it returns site name, Moodle version and your user record

Things to know

The download URLs returned by the read tools already carry your token — treat them as secrets and keep them out of logs, screenshots and public repos; config.json is gitignored by the repo, and wstoken appears in captured request bodies. Turnitin deadlines are a blind spot (turnitintooltwo is its own module without mod_assign semantics and exposes no usable deadline field) — check those in the web UI. Quiz deadlines deliberately don't appear in moodle_weekly_digest; use moodle_quiz_status. A "not set" deadline means the teacher never configured one. Setup requires Web Services and the REST protocol enabled site-wide plus an account holding webservice/rest:use — a short function list from moodle_site_info means the admin restricted your grant. Verified against Moodle 4.3.6 with a full 435-function grant; MCP protocol level 2024-11-05. The companion skill moodle-course-watch is a separate repo mounted as a submodule. MIT. 204 stars as of writing (2026-11-09).

Repository

Faixiang/Moodle-MCP

Charted

Related on the map

  • Blitz Strike

    MCP Server

    A penetration-testing methodology delivered as one MCP server: BLITZ maps the attack surface, EAGLE-EYE traces source-to-sink, STRIKE live-verifies every finding before it is reported.

    • mcp-server
    • security
    • pentest
    • methodology
  • Ripwire

    MCP Server

    Red Hat's "ripgrep for AI context" — a C++23 zero-dependency CLI that also speaks MCP.

    • mcp
    • code-context
    • cli
    • red-hat
  • Deja Vu

    MCP Server

    One shared session memory for 25+ coding agents — Claude Code, Codex, and Cursor finally remember the same project.

    • mcp
    • memory
    • cross-agent
    • context