Skip to content
MCP server

Moodle MCP

Let a teacher's AI assistant review Moodle submissions and save confirmed grades

Runs locally

Moodle MCP is an MCP server for education and exams. It runs locally on your machine and is started by your AI client.

Platforms
CLI
Runs
Locally
What it can do
Can change data (1 tool)
Version
0.2.1
Listing updated

Similar MCP servers

Install

Add with the CLI

Run in a terminal

claude mcp add moodle-mcp --env MOODLE_URL='<MOODLE_URL>' --env MOODLE_TOKEN='<MOODLE_TOKEN>' -- npx -y @av-leschinskiy/moodle-mcp

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

Or share it with your project

Add to .mcp.json

{
  "mcpServers": {
    "moodle-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@av-leschinskiy/moodle-mcp"
      ],
      "env": {
        "MOODLE_URL": "<MOODLE_URL>",
        "MOODLE_TOKEN": "<MOODLE_TOKEN>"
      }
    }
  }
}

Claude Code setup guide

Add to claude_desktop_config.json

{
  "mcpServers": {
    "moodle-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@av-leschinskiy/moodle-mcp"
      ],
      "env": {
        "MOODLE_URL": "<MOODLE_URL>",
        "MOODLE_TOKEN": "<MOODLE_TOKEN>"
      }
    }
  }
}

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

Claude Desktop setup guide

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "moodle-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@av-leschinskiy/moodle-mcp"
      ],
      "env": {
        "MOODLE_URL": "<MOODLE_URL>",
        "MOODLE_TOKEN": "<MOODLE_TOKEN>"
      }
    }
  }
}

Use .cursor/mcp.json in a project to share it with the project.

Cursor setup guide

Add to ~/.copilot/mcp-config.json

{
  "mcpServers": {
    "moodle-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@av-leschinskiy/moodle-mcp"
      ],
      "env": {
        "MOODLE_URL": "<MOODLE_URL>",
        "MOODLE_TOKEN": "<MOODLE_TOKEN>"
      }
    }
  }
}

Or put the same entry in .mcp.json at your workspace root to share it.

VS Code setup guide

Add with the CLI

Run in a terminal

codex mcp add moodle-mcp --env MOODLE_URL='<MOODLE_URL>' --env MOODLE_TOKEN='<MOODLE_TOKEN>' -- npx -y @av-leschinskiy/moodle-mcp

Or add to config.toml

Add to ~/.codex/config.toml

[mcp_servers.moodle-mcp]
command = "npx"
args = ["-y", "@av-leschinskiy/moodle-mcp"]
env = { MOODLE_URL = "<MOODLE_URL>", MOODLE_TOKEN = "<MOODLE_TOKEN>" }

Codex setup guide

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "moodle-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@av-leschinskiy/moodle-mcp"
      ],
      "env": {
        "MOODLE_URL": "<MOODLE_URL>",
        "MOODLE_TOKEN": "<MOODLE_TOKEN>"
      }
    }
  }
}
  • Gemini CLI and Antigravity

    Gemini CLI

    Add to ~/.gemini/settings.json

    {
      "mcpServers": {
        "moodle-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "@av-leschinskiy/moodle-mcp"
          ],
          "env": {
            "MOODLE_URL": "<MOODLE_URL>",
            "MOODLE_TOKEN": "<MOODLE_TOKEN>"
          }
        }
      }
    }

    Or run: gemini mcp add -s user -e MOODLE_URL='<MOODLE_URL>' -e MOODLE_TOKEN='<MOODLE_TOKEN>' moodle-mcp npx -- -y @av-leschinskiy/moodle-mcp

    Antigravity

    Add to ~/.gemini/config/mcp_config.json

    {
      "mcpServers": {
        "moodle-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "@av-leschinskiy/moodle-mcp"
          ],
          "env": {
            "MOODLE_URL": "<MOODLE_URL>",
            "MOODLE_TOKEN": "<MOODLE_TOKEN>"
          }
        }
      }
    }

    Use .agents/mcp_config.json to add it to one workspace only.

    Gemini CLI and Antigravity setup guide

  • Devin Desktop (formerly Windsurf)

    Add to ~/.config/devin/mcp_config.json

    {
      "mcpServers": {
        "moodle-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "@av-leschinskiy/moodle-mcp"
          ],
          "env": {
            "MOODLE_URL": "<MOODLE_URL>",
            "MOODLE_TOKEN": "<MOODLE_TOKEN>"
          }
        }
      }
    }

    On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

    Devin Desktop setup guide

  • Cline

    Add to cline_mcp_settings.json

    {
      "mcpServers": {
        "moodle-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "@av-leschinskiy/moodle-mcp"
          ],
          "env": {
            "MOODLE_URL": "<MOODLE_URL>",
            "MOODLE_TOKEN": "<MOODLE_TOKEN>"
          }
        }
      }
    }

    Open it from the MCP Servers icon → Configure → Configure MCP Servers.

    Cline setup guide

  • Zed

    Add to Zed settings.json

    {
      "context_servers": {
        "moodle-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "@av-leschinskiy/moodle-mcp"
          ],
          "env": {
            "MOODLE_URL": "<MOODLE_URL>",
            "MOODLE_TOKEN": "<MOODLE_TOKEN>"
          }
        }
      }
    }

    Open it with zed: open settings file. Merge context_servers into the settings you already have.

    Zed setup guide

  • JetBrains AI Assistant and Junie

    AI Assistant

    Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add

    {
      "mcpServers": {
        "moodle-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "@av-leschinskiy/moodle-mcp"
          ],
          "env": {
            "MOODLE_URL": "<MOODLE_URL>",
            "MOODLE_TOKEN": "<MOODLE_TOKEN>"
          }
        }
      }
    }

    The AI Assistant docs only show command and args. If the env block is ignored, use Junie for this server.

    Junie

    Add to ~/.junie/mcp/mcp.json

    {
      "mcpServers": {
        "moodle-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "@av-leschinskiy/moodle-mcp"
          ],
          "env": {
            "MOODLE_URL": "<MOODLE_URL>",
            "MOODLE_TOKEN": "<MOODLE_TOKEN>"
          }
        }
      }
    }

    Use .junie/mcp/mcp.json to share it with a project.

    JetBrains AI Assistant and Junie setup guide

  • Kiro

    Add to ~/.kiro/settings/mcp.json

    {
      "mcpServers": {
        "moodle-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "@av-leschinskiy/moodle-mcp"
          ],
          "env": {
            "MOODLE_URL": "<MOODLE_URL>",
            "MOODLE_TOKEN": "<MOODLE_TOKEN>"
          }
        }
      }
    }

    Use .kiro/settings/mcp.json to add it to one workspace only.

    Kiro setup guide

Using several servers? Build one config file with the MCP config generator.

Configuration

  • MOODLE_URLMoodle site address (wwwroot), e.g. https://moodle.example.orgRequired
  • MOODLE_TOKEN_FILEWhere moodle-mcp-login saves the token (path is resolved via homedir())
  • MOODLE_TOKENWeb service token override (CI / smoke tests)
  • MOODLE_TIMEOUTTimeout of a single API request (ms)
  • MOODLE_CHROMEChrome/Chromium binary for moodle-mcp-login (looked up in PATH by default)
  • MOODLE_DEBUG1/true/yes/on enables debug output to stderr and debug level in the host log channel

About Moodle MCP

The server is aimed at teachers rather than students: its ten tools list courses and assignments, show who still needs attention across a course, read a full submission, download submission files to disk and write back grades and comments. The three writing tools, saving a grade with feedback, adding a submission comment and returning a submission to draft, are flagged as destructive so the client asks for confirmation.

It uses Moodle's mobile web service, so any site with mobile app access enabled works, including ones that log in through an external OAuth provider with a captcha. A separate moodle-mcp-login command opens Chrome for you to sign in and stores a token file with 0600 permissions. Responses turn HTML into plain text and never return participant emails. It needs Node 22 and runs locally over stdio.

Tools this server provides (10)

Taken from the project documentation; the running server may differ.

From the tool list in its README, going by the names, 1 of 10 tools changes data; 3 names don't say.

From the server's own tool labels and tool names; not verified by us.

moodle_list_coursesName suggests: reads
Lists your courses.
moodle_site_info
Returns user and Moodle site information.
moodle_get_submissionName suggests: reads
Returns a full submission.
moodle_list_assignmentsName suggests: reads
Lists a course's assignments.
moodle_list_pending_submissionsName suggests: reads
Lists what needs the teacher across a course.
moodle_list_submissionsName suggests: reads
Lists participants and submission statuses.
moodle_download_fileName suggests: reads
Downloads submission files to disk.
moodle_add_submission_commentName suggests: changes
Adds a submission comment, with confirmation.
moodle_revert_submission_to_draft
Returns a submission for rework, with confirmation.
moodle_save_grade
Saves a grade and feedback, with confirmation.

What it does

Teacher-focused grading
Save grades and feedback, comment on and revert submissions.
Confirmation on writes
Three tools that students will see require confirmation.
Pending work overview
Lists what needs attention across a course.
Browser login helper
moodle-mcp-login handles SSO and captchas, storing the token locally.
Trimmed responses
HTML becomes plain text and participant emails are never returned.

Good for

  • Review a batch of submissions and draft feedback
  • Find ungraded assignments in a course
  • Download submitted files for offline reading
  • Return a submission for rework

Moodle MCP FAQ

What does Moodle MCP need on the Moodle site?

Mobile app access enabled, the same web service the Moodle mobile app uses.

What do I need locally?

Node.js 22 or newer, plus Chrome or Chromium for the login command.

Does Moodle MCP return student emails?

No, participant emails are never returned.

Where is the token stored?

In a file with 0600 permissions, by default under ~/.config/mcp-moodle.

How do I add Moodle MCP to Claude Code?

Run this command in your terminal: claude mcp add moodle-mcp --env MOODLE_URL='<MOODLE_URL>' --env MOODLE_TOKEN='<MOODLE_TOKEN>' -- npx -y @av-leschinskiy/moodle-mcp

What are the best alternatives to Moodle MCP?

The closest alternatives to Moodle MCP are Scholar Sidekick, VEOSKILL, SynapseLingo Tutor, EngMock and intern.lk.

Where this comes from

  • Description: written from the project's README.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers