loading…
Search for a command to run...
loading…
Enables AI agents to publish and manage pedagogical content in Moodle via Web Services with guaranteed idempotency. It provides tools for course management, les
Enables AI agents to publish and manage pedagogical content in Moodle via Web Services with guaranteed idempotency. It provides tools for course management, lesson publishing, preview workflows, and direct Moodle API access.
Model Context Protocol (MCP) server for Moodle. Lets AI agents publish and manage pedagogical content — lessons, resources, activities — in Moodle via Web Services with guaranteed idempotency.
Status: v0.5.0 — operate Moodle at ~80% from an LLM agent.
moodle-mcp is a stdio-based MCP server that exposes 40 high-level facades plus one low-level ws_raw escape hatch to run almost the entire teaching workflow of a Moodle course from an AI agent: courses, sections, content (pages, urls, assignments, forums, videos), quizzes (with GIFT import), students (enrolment CSV, groups, roles, passwords), gradebook, messaging, calendar, and badges. Every write is upsert-by-idnumber, so republishing the same Ficha never creates duplicates.
Primary consumer: Claude Desktop driving the Italicia language-teaching workflow. But it is a generic open-source adapter — any MCP-capable agent + any Moodle 4.x/5.x instance with Web Services enabled can use it.
Plugin companion required for full feature set. Upsert of
page,url,assign,quiz, file uploads and GIFT imports go through the small PHP pluginlocal_italiciamcpthat ships alongside this repo inplugin-companion/. Install it once (as "Complemento local" in the Moodle admin UI) and expose its functions to the external service the token belongs to. Without the plugin, the read-only facades (list students, grades, calendar, site info) andws_rawstill work.
ws_raw)Grouped by domain family. Each family lives under src/tools/<family>/.
crear_curso · actualizar_curso · duplicar_curso · archivar_curso · listar_mis_cursos · obtener_contexto_curso
crear_seccion · actualizar_seccion · ocultar_seccion · liberar_seccion · reordenar_secciones
publicar_ficha_clase · publicar_preview · confirmar_preview · generate_video (Gemini Veo)
publicar_ficha_examen (one-shot) · configurar_quiz · importar_gift
listar_alumnos · matricular_csv · dar_baja · crear_grupo · asignar_a_grupo · cambiar_rol · reset_password
obtener_calificaciones · obtener_completion · obtener_intentos_quiz · obtener_entregas_assign · calificar_manualmente
enviar_mensaje_moodle · crear_anuncio_foro · obtener_logs_curso · obtener_info_sitio
crear_evento_calendario · listar_eventos_calendario · actualizar_evento · eliminar_evento
listar_badges_usuario
ws_raw — call any Moodle WS function directly when no facade covers the case.
duplicar_seccion, crear_banco_preguntas, editar_preguntas_banco, liberar_quiz, ocultar_quiz, otorgar_badge.
# Via npx (recommended for Claude Desktop)
npx -y @nahuelalbornoz/moodle-mcp
# Or install globally
npm install -g @nahuelalbornoz/moodle-mcp
Requires Node.js 20 or higher.
| Variable | Required | Default | Description |
|---|---|---|---|
MOODLE_URL |
yes | — | Full HTTPS URL of the Moodle instance. |
MOODLE_WS_TOKEN |
yes | — | Web Services token with edit permissions. |
MOODLE_WS_TIMEOUT_MS |
no | 30000 |
Per-request timeout. |
MOODLE_WS_MAX_RETRIES |
no | 3 |
Retry attempts on transient failures. |
MOODLE_WS_RATE_LIMIT_PER_SEC |
no | 10 |
Token-bucket rate limit. |
MCP_LOG_LEVEL |
no | info |
error / warn / info / debug. |
MOODLE_ALLOW_INSECURE |
no | false |
Allow http:// URLs (dev-only escape hatch). |
Add to claude_desktop_config.json (see examples/setup-claude-desktop.md for the exact path per OS):
{
"mcpServers": {
"moodle": {
"command": "npx",
"args": ["-y", "moodle-mcp"],
"env": {
"MOODLE_URL": "https://your-moodle.example.com",
"MOODLE_WS_TOKEN": "your-ws-token"
}
}
}
}
Restart Claude Desktop. The five tools above should now be available to the agent.
// tool call
{
"name": "obtener_contexto_curso",
"arguments": { "course_id": 42, "incluir_ultimas_clases": 5 }
}
Response (abridged):
{
"course": { "id": 42, "fullname": "Italiano A1", "shortname": "ITA-A1", "format": "topics", "startdate": 1700000000 },
"secciones": [{ "id": 100, "name": "Unidad 3", "section": 3, "visible": true, "modules_count": 6 }],
"ultimas_clases": [{ "seccion_id": 100, "seccion_name": "Unidad 3", "ficha_idnumber": "mcp:a9993e364706816aba3e2571" }],
"matriculados": { "total": 18, "docentes": 1, "alumnos": 17 }
}
{
"name": "publicar_preview",
"arguments": {
"ficha_path": "/home/alicia/fichas/italiano/a1-2026/u3/c5.md",
"course_id": 42
}
}
Response includes preview_url Alicia can open to review. Once approved:
{
"name": "confirmar_preview",
"arguments": { "seccion_id": 100, "recursos_ids": [501, 502, 503] }
}
{
"name": "ws_raw",
"arguments": {
"function_name": "core_webservice_get_site_info",
"params": {}
}
}
Response:
{ "data": { "sitename": "Aula Italicia", "release": "5.0.2+", ... } }
Every resource created by this MCP carries a stable idnumber of the form:
mcp:<first 24 chars of sha1(ficha.id + "|" + component_id)>
Republishing the same Ficha finds the existing resource by idnumber and updates it in place. Nothing gets duplicated. Safe to retry anywhere, anytime.
v0.1 is honest about its capability boundary. It reliably:
mcp: idnumber prefix.code fields.v0.1 does not yet:
advertencias — seed them manually the first time."missing" plus an advertencia. Installing local_wsmanagesections (or equivalent) and wiring those endpoints is v0.2 work.Both gaps are driven out by the integration suite in tests/integration/ when run against a real Moodle docker.
git clone https://github.com/marcosnahuel/moodle-mcp
cd moodle-mcp
npm install
npm run typecheck # tsc --noEmit
npm test # vitest unit suite
npm run test:coverage # with v8 coverage (≥80% enforced)
npm run build # tsup → dist/
# Integration — requires docker
docker compose -f tests/integration/docker-compose.test.yml up -d
export MOODLE_TEST_URL=http://localhost:8081
export MOODLE_TEST_TOKEN=<generate in Moodle admin>
export MOODLE_TEST_COURSE=<course id>
npm run test:integration
docker compose -f tests/integration/docker-compose.test.yml down -v
***.MOODLE_ALLOW_INSECURE=true (dev-only).See CONTRIBUTING.md for issue, PR and commit conventions.
By participating in this project you agree to abide by the CODE_OF_CONDUCT.md.
MIT © 2026 Italicia — see LICENSE.
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"moodle-mcp": {
"command": "npx",
"args": []
}
}
}Web content fetching and conversion for efficient LLM usage.
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
Provides auto-configuration for setting up an MCP server in Spring Boot applications.
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also