Skip to main content
Glama

moodle_math_mcp

MCP server for moodle.math.tusur.ru — automates Moodle interactions via Playwright browser automation.

Features

  • list_courses — get available courses

  • list_course_modules — list materials and assignments in a course

  • find_course_module — search modules by title

  • get_assignment_details — fetch assignment page text

  • download_module_files — download files from a resource or assignment

Related MCP server: Moodle MCP Server

Prerequisites

  • Node.js >= 18

  • Playwright browsers: npx playwright install chromium

Setup

  1. Clone the repo:

    git clone https://github.com/<you>/moodle_math_mcp.git
    cd moodle_math_mcp
  2. Install dependencies:

    npm install
  3. Create .env from the example:

    cp .env.example .env

    Fill in MATH_USERNAME and MATH_PASSWORD with your Moodle credentials.

  4. (Optional) Save browser session for cookie-based auth:

    npm run login

    A browser window will open — log in manually. The session is saved to storage/auth.json.

Usage

As an MCP server

Add to your MCP client config (e.g. Claude Desktop):

{
  "mcpServers": {
    "moodle-math": {
      "command": "node",
      "args": ["dist/index.js"],
      "cwd": "/path/to/moodle_math_mcp"
    }
  }
}

Development

npm run dev

Build

npm run build
npm start

Environment Variables

Variable

Required

Default

Description

MATH_USERNAME

Yes

—

Moodle login

MATH_PASSWORD

Yes

—

Moodle password

MOODLE_URL

No

https://moodle.math.tusur.ru

Moodle base URL

HEADLESS

No

false

Run browser without UI

License

ISC

Available Tools

6 tools
download_course_filesA

Скачать все файлы со всего курса math Moodle целиком (resource + assign)

Inputs: courseUrl (required).

download_module_filesC

Скачать файлы только из одного конкретного модуля math Moodle: resource или assign

Inputs: moduleUrl (required).

find_course_moduleB

Найти материал или задание на странице курса math Moodle по названию

Inputs: query (required), courseUrl (required).

get_assignment_detailsB

Открыть страницу задания в math Moodle и вернуть текст задания

Inputs: assignmentUrl (required).

list_course_modulesC

Получить список материалов и заданий на странице курса math Moodle

Inputs: courseUrl (required).

list_coursesA

Получить список курсов из moodle.math.tusur.ru

Inputs: no named parameters.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 6 tools

    Disambiguation4/5

    Most tools are clearly distinct: list_courses, list_course_modules, find_course_module, and the two download tools each target different actions or scopes. get_assignment_details could be slightly confused with download_module_files when an assignment contains files, but its purpose of returning the assignment text is distinguishable.

    Naming Consistency5/5

    All tool names follow the same lowercase snake_case verb_noun pattern: list_, get_, find_, download_. The naming consistently reflects the action and target resource, making the API predictable.

    Tool Count5/5

    Six tools is a well-scoped size for a Moodle math file/material retrieval server. Each tool covers a meaningful operation without unnecessary fragmentation or bloat.

    Completeness4/5

    The set covers the core workflow: listing courses, viewing course modules, finding specific modules, getting assignment details, and downloading files at module or course level. Minor gaps exist, such as no direct way to fetch course metadata or handle other Moodle activities, but agents can work around these.

    Maintenance

    ActivityStale
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables interaction with Moodle learning management systems through the Moodle REST API. Supports course management, user enrollment, assignments, forums, quizzes, and file operations through natural language.
      30 npm
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables interaction with Moodle learning management systems through the REST API. Supports course management, user enrollment, assignment handling, and forum operations through natural language.
      30 npm
      MIT