moodle-mcp

v0.6.0
io.github.av-leschinskiy/moodle-mcp Checked 3 days ago Published 7 days ago

Moodle MCP server for teachers: review assignment submissions, grade and give feedback; SSO login

Values you need

VariableWhat it is
MOODLE_URLrequired Moodle site address (wwwroot), e.g. https://moodle.example.org
MOODLE_TOKEN_FILEoptional Where moodle-mcp-login saves the token (path is resolved via homedir())
MOODLE_TOKENoptional secret Web service token override (CI / smoke tests)
MOODLE_TIMEOUToptional Timeout of a single API request (ms)
MOODLE_EDITOR_PORToptional Loopback debugging port of the dedicated, signed-in Chrome for material editing
MOODLE_CHROMEoptional Chrome/Chromium binary for moodle-mcp-login (looked up in PATH by default)
MOODLE_DEBUGoptional 1/true/yes/on enables debug output to stderr and debug level in the host log channel

npm (npx) discovery passed

Requires Node.js 18+

Run in a terminal
claude mcp add moodle-mcp -e 'MOODLE_URL=<MOODLE_URL>' -- npx -y @av-leschinskiy/moodle-mcp@0.6.0
Add to claude_desktop_config.json
{
  "mcpServers": {
    "moodle-mcp": {
      "args": [
        "-y",
        "@av-leschinskiy/moodle-mcp@0.6.0"
      ],
      "command": "npx",
      "env": {
        "MOODLE_URL": "<MOODLE_URL>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "moodle-mcp": {
      "args": [
        "-y",
        "@av-leschinskiy/moodle-mcp@0.6.0"
      ],
      "command": "npx",
      "env": {
        "MOODLE_URL": "<MOODLE_URL>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "MOODLE_URL",
      "id": "moodle-url",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "moodle-mcp": {
      "args": [
        "-y",
        "@av-leschinskiy/moodle-mcp@0.6.0"
      ],
      "command": "npx",
      "env": {
        "MOODLE_URL": "${input:moodle-url}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.moodle-mcp]
command = "npx"
args = ["-y", "@av-leschinskiy/moodle-mcp@0.6.0"]
env = { "MOODLE_URL" = "<MOODLE_URL>" }

For AI agents

  1. Ask the user for: MOODLE_URL. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: moodle_site_info, moodle_search_participants, moodle_list_courses, moodle_get_participant_progress, moodle_get_course_contents, moodle_get_page, moodle_get_feedback_summary, moodle_compare_course_materials, ….
  5. If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.

Machine-readable: install.md · manifest.json