moodle-mcp
v0.6.0Moodle MCP server for teachers: review assignment submissions, grade and give feedback; SSO login
Values you need
| Variable | What it is | |
|---|---|---|
MOODLE_URL | required | Moodle site address (wwwroot), e.g. https://moodle.example.org |
MOODLE_TOKEN_FILE | optional | Where moodle-mcp-login saves the token (path is resolved via homedir()) |
MOODLE_TOKEN | optional secret | Web service token override (CI / smoke tests) |
MOODLE_TIMEOUT | optional | Timeout of a single API request (ms) |
MOODLE_EDITOR_PORT | optional | Loopback debugging port of the dedicated, signed-in Chrome for material editing |
MOODLE_CHROME | optional | Chrome/Chromium binary for moodle-mcp-login (looked up in PATH by default) |
MOODLE_DEBUG | optional | 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.0Add 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
- Ask the user for: MOODLE_URL. Never invent or guess these values; secrets go into the client config, not into chat logs.
- 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).
- Restart or reload the client so it starts the server.
- 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, ….
- 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