moodle-student-bridge 0.0.0-stage → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,27 @@
1
+ # Changelog
2
+
3
+ ## 1.0.0 — 2026-11-20
4
+
5
+ Primera versión estable. / First stable release.
6
+
7
+ ### Lectura
8
+ - `resumen_semanal`, `proximos_vencimientos`, `listar_cursos`, `listar_tareas`, `ver_tarea`,
9
+ `cuestionarios`, `ver_curso`, `leer_archivo` (PDF, DOCX, PPTX, HTML, imágenes), `anuncios`,
10
+ `ver_discusion`, `notificaciones`, `mensajes`, `calificaciones`, `participantes`, `mis_grupos`,
11
+ `quien_soy`.
12
+ - `ver_tarea` muestra la disponibilidad real de la tarea (incluidas las que no aceptan entrega en
13
+ línea) y lee la entrega del grupo en tareas grupales.
14
+
15
+ ### Modo escritura (opcional, `MOODLE_ESCRITURA=1`)
16
+ - Entregar, editar (reemplazar/agregar) y borrar entregas; mensajes privados; publicar, editar y
17
+ borrar en foros.
18
+ - Confirmación en dos pasos con código de un solo uso (10 min) y revalidación antes de ejecutar.
19
+ - Comprobaciones: entrega en línea, apertura, corte, bloqueo, estado, calificada, tardía, grupal,
20
+ borradores, intentos, tiempo límite, declaración, cantidad/tamaño/tipo de archivos.
21
+ - Historial local de acciones sin el token.
22
+
23
+ ### Otros
24
+ - Asistente de token (`npx moodle-student-bridge-token`) para usuario/contraseña y SSO.
25
+ - Recordatorios push con ntfy (24 h y 3 h antes, notas nuevas, resumen diario) y workflow de
26
+ GitHub Actions con registros sin datos personales.
27
+ - Extensión `.mcpb` para Claude Desktop, construida en CI en cada versión.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 MattSeb15
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.es.md ADDED
@@ -0,0 +1,188 @@
1
+ # Moodle Student Bridge
2
+
3
+ 🇬🇧 [Read in English](README.md)
4
+
5
+ **Conecta a Claude con tu Moodle como estudiante**: entregas, cuestionarios, enunciados, rúbricas,
6
+ archivos, anuncios, notificaciones y calificaciones. Y recordatorios en tu celular.
7
+
8
+ Está pensado para estudiantes cuya universidad **no les da un token de API**: usa el mismo token que
9
+ la **app móvil oficial de Moodle** (servicio `moodle_mobile_app`), que cualquier alumno puede obtener
10
+ con su propia cuenta. Funciona con cualquier Moodle que tenga la app móvil habilitada.
11
+
12
+ > Proyecto independiente; no está afiliado a Moodle Pty Ltd. **Por defecto solo lee.** El
13
+ > [modo escritura](#modo-escritura-opcional) (entregar, editar y borrar entregas, mensajes, foros)
14
+ > hay que activarlo a propósito y siempre pide confirmación.
15
+
16
+ ## Herramientas MCP
17
+
18
+ | Herramienta | Qué hace |
19
+ |---|---|
20
+ | `resumen_semanal` | Todo lo pendiente y lo nuevo en una sola llamada |
21
+ | `proximos_vencimientos` | Línea de tiempo: lo que vence en los próximos N días (y lo vencido) |
22
+ | `listar_cursos` | Cursos en los que estás matriculado |
23
+ | `listar_tareas` | Tareas por curso con fechas |
24
+ | `ver_tarea` | Enunciado, rúbricas, adjuntos, estado de tu entrega y retroalimentación |
25
+ | `cuestionarios` | Cuándo abren/cierran, tiempo límite, intentos usados y mejor nota |
26
+ | `ver_curso` | Secciones, recursos, archivos y enlaces de un curso |
27
+ | `leer_archivo` | Extrae el texto de PDF, Word (.docx), PowerPoint (.pptx) y HTML; devuelve imágenes |
28
+ | `anuncios` / `ver_discusion` | Avisos de profesores y foros |
29
+ | `notificaciones` | La campana: notas publicadas, retroalimentación, cambios (no las marca como leídas) |
30
+ | `mensajes` | Conversaciones de mensajería |
31
+ | `calificaciones` | Tu libro de calificaciones por curso |
32
+ | `participantes` | Profesores y compañeros del curso con rol y último acceso; filtra por tu grupo, nombre o rol |
33
+ | `mis_grupos` | Tus grupos en cada curso con sus integrantes (Moodle no muestra a estudiantes los integrantes de grupos ajenos) |
34
+ | `quien_soy` | Comprueba con qué cuenta estás conectado |
35
+
36
+ Cursos y tareas se pueden indicar por id o por parte del nombre (`"fisica"`, `"segundo parcial"`).
37
+
38
+ 📖 **[Casos de uso con ejemplos](docs/CASOS_DE_USO.md)**: organizar la semana, entender rúbricas, estudiar con los PDFs del curso, revisar tu trabajo antes de entregar, grupos y más.
39
+
40
+ Ejemplos rápidos: *"¿Qué tengo pendiente esta semana?"*, *"Revisa la tarea del proyecto de Física y hazme
41
+ un plan según la rúbrica"*, *"Lee el PDF de Leyes de Kepler y resúmelo"*, *"¿Cómo voy en Física?"*, *"¿Con quién me tocó el grupo de Cálculo?"*.
42
+
43
+ ## 1. Obtener tu token
44
+
45
+ ```bash
46
+ npx moodle-student-bridge-token
47
+ ```
48
+
49
+ El asistente te pregunta cómo inicias sesión:
50
+
51
+ - **Usuario y contraseña de Moodle** → obtiene el token directamente.
52
+ - **Microsoft / Google / SSO** → te da un enlace `launch.php`. Ábrelo con tu sesión iniciada y las
53
+ DevTools abiertas (F12 → Network), copia la redirección `moodlemobile://token=...` y pégala.
54
+
55
+ Comprueba el token y lo guarda en `.env`:
56
+
57
+ ```
58
+ MOODLE_URL=https://moodle.tu-universidad.edu
59
+ MOODLE_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
60
+ MOODLE_TZ=America/Guayaquil # opcional
61
+ ```
62
+
63
+ ## 2. Conectarlo a Claude
64
+
65
+ **Claude Desktop (lo más fácil):** descarga `moodle-student-bridge.mcpb` de la
66
+ [última versión](https://github.com/MattSeb15/moodle-student-bridge/releases/latest), ábrelo con
67
+ doble clic y pega tu URL y token en el formulario.
68
+
69
+ **Claude Code:**
70
+
71
+ ```bash
72
+ claude mcp add moodle-student --scope user \
73
+ -e MOODLE_URL=https://moodle.tu-universidad.edu -e MOODLE_TOKEN=tu_token \
74
+ -- npx -y moodle-student-bridge
75
+ ```
76
+
77
+ **Desde el código fuente:**
78
+
79
+ ```bash
80
+ git clone https://github.com/MattSeb15/moodle-student-bridge.git
81
+ cd moodle-student-bridge && npm install
82
+ npm run token # crea el .env
83
+ npm run probar # prueba: tu usuario y lo que vence esta semana
84
+ claude mcp add moodle-student --scope user -- node /ruta/a/moodle-student-bridge/src/index.js
85
+ ```
86
+
87
+ ## Modo escritura (opcional)
88
+
89
+ Con `MOODLE_ESCRITURA=1` (o la casilla *Enable write mode* en Claude Desktop) aparecen herramientas
90
+ para **modificar** tu Moodle:
91
+
92
+ | Herramienta | Qué prepara |
93
+ |---|---|
94
+ | `preparar_entrega` | Entregar o **editar** una tarea: archivos locales y/o texto en línea, modo `reemplazar` o `agregar` |
95
+ | `preparar_borrado_entrega` | **Eliminar** tu entrega |
96
+ | `preparar_mensaje` | Mensaje privado (`"yo"` = tus notas personales, un id de conversación o un nombre) |
97
+ | `preparar_publicacion_foro` | Responder en una discusión o abrir una nueva |
98
+ | `preparar_edicion_foro` / `preparar_borrado_foro` | Editar o borrar un mensaje tuyo |
99
+ | `confirmar` | Ejecuta lo preparado con su código |
100
+ | `historial_acciones` | Lo que se ejecutó desde tu equipo |
101
+
102
+ **Siempre en dos pasos:**
103
+
104
+ 1. `preparar_*` **solo lee y comprueba**, sin cambiar nada. Devuelve un resumen de lo que va a pasar
105
+ y un código de confirmación (6 caracteres, un solo uso, caduca en 10 min). Si algo lo impide, no
106
+ hay código.
107
+ 2. `confirmar` con ese código **vuelve a comprobar todo con datos frescos** y recién entonces ejecuta.
108
+ Si la situación cambió (p. ej. la tarea cerró), cancela sin enviar nada.
109
+
110
+ **Qué comprueba antes de una entrega:**
111
+
112
+ - Si la tarea **admite entrega en línea** (algunas están "abiertas" pero se entregan en clase).
113
+ - Si **ya abrió**, si pasó la **fecha límite de corte**, si el profesor la **bloqueó**, o si Moodle ya
114
+ **no permite editarla** (p. ej. enviada para calificar en tareas con borradores).
115
+ - **Estado actual** (sin entregar / borrador / enviada / reabierta) y si **ya fue calificada**.
116
+ - **Entrega tardía**: avisa si la fecha de entrega ya pasó.
117
+ - **Entrega grupal**: avisa que afecta a todo el grupo; bloquea si exige grupo y no tienes.
118
+ - **Borradores**: si al guardar queda enviada directamente o si después ya no podrás editar.
119
+ - **Intentos**: intento actual, máximo y cómo se reabre.
120
+ - **Tiempo límite**: avisa que se inicia el temporizador.
121
+ - **Declaración de entrega**: la muestra y exige aceptarla.
122
+ - **Archivos**: cantidad máxima, tamaño, tipos permitidos (incluye grupos como `archive` o
123
+ `document`), archivos vacíos o con nombre repetido, y qué archivos actuales se **eliminarán**.
124
+
125
+ El historial se guarda en `~/.moodle-student-bridge/historial.jsonl` (configurable con
126
+ `MOODLE_HISTORIAL`) y nunca incluye el token.
127
+
128
+ ## 3. Recordatorios en el celular (opcional)
129
+
130
+ Usa [ntfy](https://ntfy.sh): gratis y sin cuenta.
131
+
132
+ 1. Instala la app **ntfy** (Android/iOS) y suscríbete a un tema con un nombre **largo y difícil de
133
+ adivinar** (ej. `moodle-ana-8f3k2q9z`). Cualquiera que conozca el nombre puede leer los avisos.
134
+ 2. Elige dónde se ejecuta:
135
+ - **En la nube con GitHub Actions** (funciona con la PC apagada): haz un fork de este repo y
136
+ añade en *Settings → Secrets and variables → Actions* los secretos `MOODLE_URL`,
137
+ `MOODLE_TOKEN` y `NTFY_TOPIC`. Luego activa los workflows en la pestaña *Actions* (en los
138
+ forks vienen desactivados). `recordatorios.yml` corre cada hora y manda el resumen del día a
139
+ las 07:00 (hora de Ecuador; cámbialo en el `cron`). Los secretos van cifrados y los
140
+ registros solo muestran cuántos avisos se enviaron, nunca su contenido, así que el fork
141
+ puede ser público.
142
+ - **En tu PC**: programa `node src/recordar.js` cada hora y `node src/recordar.js --resumen` una
143
+ vez al día (Programador de tareas de Windows o `cron`).
144
+ 3. Prueba sin enviar nada: `npm run recordar -- --prueba`.
145
+
146
+ Qué recibes:
147
+
148
+ - ⏰ Un aviso **24 h** y otro **3 h** antes de cada entrega pendiente (`RECORDAR_HORAS=24,3`).
149
+ - 📝 Aviso cuando publican una **calificación o retroalimentación**.
150
+ - 📚 Un **resumen diario** con lo que vence en la semana.
151
+
152
+ Ya entregaste algo → deja de avisarte (Moodle ya no lo marca como pendiente).
153
+
154
+ Privacidad: los avisos (nombre de la tarea y curso) pasan por el servidor de ntfy. Si prefieres,
155
+ usa tu propio servidor con `NTFY_SERVER` y `NTFY_TOKEN`.
156
+
157
+ ## Variables de entorno
158
+
159
+ | Variable | Uso |
160
+ |---|---|
161
+ | `MOODLE_URL`, `MOODLE_TOKEN` | Obligatorias |
162
+ | `MOODLE_TZ` | Zona horaria para fechas (por defecto la del sistema) |
163
+ | `MOODLE_DESCARGAS` | Carpeta para archivos descargados (por defecto `~/Downloads/moodle-student-bridge`) |
164
+ | `NTFY_TOPIC`, `NTFY_SERVER`, `NTFY_TOKEN` | Recordatorios |
165
+ | `RECORDAR_HORAS`, `INTERVALO_MIN` | Cuándo avisar (por defecto `24,3` y `60`) |
166
+ | `MOODLE_ESCRITURA` | `1` para activar el modo escritura (por defecto desactivado) |
167
+ | `MOODLE_HISTORIAL` | Archivo del historial de acciones de escritura |
168
+
169
+ Las variables de entorno tienen prioridad sobre el `.env`.
170
+
171
+ ## Seguridad
172
+
173
+ - El token da acceso a tu cuenta casi como tu contraseña. **No subas el `.env`** (está en
174
+ `.gitignore` y `.mcpbignore`) ni lo pegues en chats.
175
+ - Para revocarlo: Moodle → Preferencias → **Claves de seguridad** → restablecer la del servicio móvil.
176
+ Si tu Moodle no muestra esa página, **cambia tu contraseña** dejando marcada la casilla "Cerrar
177
+ sesión en todas las aplicaciones web", o pide a soporte que revoquen tus tokens.
178
+ - `leer_archivo` solo descarga archivos del Moodle configurado.
179
+
180
+ ## Desarrollo
181
+
182
+ ```bash
183
+ npm test # tests (sin red)
184
+ npm run probar -- ver_tarea '{"tarea":"proyecto"}' # llama una herramienta contra tu Moodle
185
+ npm run mcpb # genera moodle-student-bridge.mcpb para Claude Desktop
186
+ ```
187
+
188
+ ¿Quieres colaborar? Lee [CONTRIBUTING.md](CONTRIBUTING.md). Licencia MIT.
package/README.md CHANGED
@@ -1,3 +1,201 @@
1
- # Temporary Holding Version
1
+ # Moodle Student Bridge
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ 🇪🇸 [Leer en español](README.es.md)
4
+
5
+ [![CI](https://github.com/MattSeb15/moodle-student-bridge/actions/workflows/ci.yml/badge.svg)](https://github.com/MattSeb15/moodle-student-bridge/actions/workflows/ci.yml)
6
+ [![npm](https://img.shields.io/npm/v/moodle-student-bridge)](https://www.npmjs.com/package/moodle-student-bridge)
7
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
8
+
9
+ **Connect Claude to your Moodle as a student**: deadlines, assignments, rubrics, quizzes, course
10
+ files, announcements, notifications, grades, classmates and groups. Optional reminders on your phone.
11
+
12
+ Built for students whose university **doesn't give them an API token**. It uses the same token as the
13
+ **official Moodle mobile app** (service `moodle_mobile_app`), which any student can get with their own
14
+ account. It works with any Moodle site that has the mobile app enabled.
15
+
16
+ > Independent project, not affiliated with Moodle Pty Ltd. **Read-only by default.**
17
+ > [Write mode](#write-mode-optional) (submit, edit and delete submissions; messages; forums) must
18
+ > be enabled on purpose and always asks for confirmation.
19
+
20
+ ## What you can ask
21
+
22
+ - *"What do I have due this week?"*
23
+ - *"Explain the physics project and turn the rubric into a checklist."*
24
+ - *"Read the Kepler's laws PDF from the course and summarize it."*
25
+ - *"Check my report against the rubric before I submit it."*
26
+ - *"How am I doing in Calculus? What do I need on the final?"*
27
+ - *"Who's in my group for the Calculus project?"*
28
+ - *"Submit `guide6.zip` to Guide 6."* (write mode: preview first, then confirm)
29
+
30
+ 📖 **[Use cases with examples](docs/CASOS_DE_USO.md)** (Spanish).
31
+
32
+ The tool names are in Spanish, but Claude understands requests in any language.
33
+
34
+ ## Tools
35
+
36
+ | Tool | What it does |
37
+ |---|---|
38
+ | `resumen_semanal` | Everything pending and new in one call |
39
+ | `proximos_vencimientos` | Timeline of upcoming (and overdue) deadlines |
40
+ | `listar_cursos` | Courses you're enrolled in |
41
+ | `listar_tareas` | Assignments per course with due dates |
42
+ | `ver_tarea` | Brief, rubrics, attachments, submission status, rules and feedback |
43
+ | `cuestionarios` | Quiz open/close dates, time limit, attempts used and best grade |
44
+ | `ver_curso` | Course sections, resources, files and links |
45
+ | `leer_archivo` | Extracts text from PDF, Word (.docx), PowerPoint (.pptx) and HTML; returns images |
46
+ | `anuncios` / `ver_discusion` | Teacher announcements and forum discussions |
47
+ | `notificaciones` | The notification bell: new grades, feedback, changes (never marks them as read) |
48
+ | `mensajes` | Messaging conversations |
49
+ | `calificaciones` | Your gradebook for a course |
50
+ | `participantes` | Teachers and classmates with role and last access; filter by your group, name or role |
51
+ | `mis_grupos` | Your groups in each course and their members |
52
+ | `quien_soy` | Shows which account is connected |
53
+
54
+ Courses and assignments can be referenced by id or by part of their name (`"physics"`, `"guide 6"`).
55
+
56
+ ## 1. Get your token
57
+
58
+ ```bash
59
+ npx moodle-student-bridge-token
60
+ ```
61
+
62
+ The assistant asks how you sign in to Moodle:
63
+
64
+ - **Moodle username and password**: it gets the token directly.
65
+ - **Microsoft / Google / SSO**: it gives you a `launch.php` link. Open it while signed in, with
66
+ DevTools open (F12 → Network), copy the `moodlemobile://token=...` redirect and paste it.
67
+
68
+ It checks the token and saves it to `.env`:
69
+
70
+ ```
71
+ MOODLE_URL=https://moodle.your-university.edu
72
+ MOODLE_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
73
+ MOODLE_TZ=America/Guayaquil # optional
74
+ ```
75
+
76
+ ## 2. Connect it to Claude
77
+
78
+ **Claude Desktop (easiest):** download `moodle-student-bridge.mcpb` from the
79
+ [latest release](https://github.com/MattSeb15/moodle-student-bridge/releases/latest), double-click it
80
+ and paste your URL and token into the form.
81
+
82
+ **Claude Code:**
83
+
84
+ ```bash
85
+ claude mcp add moodle-student --scope user \
86
+ -e MOODLE_URL=https://moodle.your-university.edu -e MOODLE_TOKEN=your_token \
87
+ -- npx -y moodle-student-bridge
88
+ ```
89
+
90
+ **From source:**
91
+
92
+ ```bash
93
+ git clone https://github.com/MattSeb15/moodle-student-bridge.git
94
+ cd moodle-student-bridge && npm install
95
+ npm run token # creates .env
96
+ npm run probar # smoke test: your user and what's due this week
97
+ claude mcp add moodle-student --scope user -- node /path/to/moodle-student-bridge/src/index.js
98
+ ```
99
+
100
+ ## Write mode (optional)
101
+
102
+ Set `MOODLE_ESCRITURA=1` (or tick *Enable write mode* in Claude Desktop) to get tools that **change**
103
+ your Moodle:
104
+
105
+ | Tool | Prepares |
106
+ |---|---|
107
+ | `preparar_entrega` | Submit or **edit** an assignment: local files and/or online text, `reemplazar` (replace) or `agregar` (add) |
108
+ | `preparar_borrado_entrega` | **Delete** your submission |
109
+ | `preparar_mensaje` | Private message (`"yo"` = your personal notes, a conversation id or a name) |
110
+ | `preparar_publicacion_foro` | Reply to a discussion or start a new one |
111
+ | `preparar_edicion_foro` / `preparar_borrado_foro` | Edit or delete one of your forum posts |
112
+ | `confirmar` | Runs a prepared action using its code |
113
+ | `historial_acciones` | Log of what was executed from your machine |
114
+
115
+ **Always two steps:**
116
+
117
+ 1. `preparar_*` **only reads and checks**. It returns a summary of exactly what will happen and a
118
+ confirmation code (6 characters, single use, expires in 10 minutes). If something blocks the
119
+ action, no code is issued.
120
+ 2. `confirmar` **re-checks everything with fresh data** and only then executes. If anything changed
121
+ (for example, the assignment closed), it cancels without sending anything.
122
+
123
+ **Checks before a submission:**
124
+
125
+ - Whether the assignment **accepts online submissions** at all (some are "open" but handed in class).
126
+ - Whether it has **opened yet**, passed the **cut-off date**, was **locked** by the teacher, or Moodle
127
+ no longer **allows editing** (e.g. already submitted for grading with drafts enabled).
128
+ - **Current status** (not submitted / draft / submitted / reopened) and whether it's **already graded**.
129
+ - **Late submission** warning if the due date has passed.
130
+ - **Group submission**: warns that it affects the whole group; blocks if a group is required and you have none.
131
+ - **Drafts**: whether saving submits right away, and that you can't edit after submitting for grading.
132
+ - **Attempts**: current attempt, maximum and how attempts are reopened.
133
+ - **Time limit**: warns that confirming starts the timer.
134
+ - **Submission statement**: shows it and requires acceptance.
135
+ - **Files**: maximum count, size, allowed types (including groups like `archive` or `document`),
136
+ empty or duplicate files, and which current files will be **removed**.
137
+
138
+ The log is stored in `~/.moodle-student-bridge/historial.jsonl` (configurable with `MOODLE_HISTORIAL`)
139
+ and never contains the token.
140
+
141
+ ## 3. Phone reminders (optional)
142
+
143
+ Uses [ntfy](https://ntfy.sh): free, no account needed.
144
+
145
+ 1. Install the **ntfy** app (Android/iOS) and subscribe to a topic with a **long, hard-to-guess** name
146
+ (e.g. `moodle-ana-8f3k2q9z`). Anyone who knows the name can read the notifications.
147
+ 2. Choose where it runs:
148
+ - **In the cloud with GitHub Actions** (works with your PC off): fork this repo, add the secrets
149
+ `MOODLE_URL`, `MOODLE_TOKEN` and `NTFY_TOPIC` under *Settings → Secrets and variables → Actions*,
150
+ then enable workflows in the *Actions* tab (they're disabled on forks). `recordatorios.yml` runs
151
+ hourly and sends a daily summary at 07:00 Ecuador time (change the `cron`). Secrets are
152
+ encrypted and logs only show how many reminders were sent, never their content, so the fork can
153
+ be public.
154
+ - **On your PC**: schedule `node src/recordar.js` hourly and `node src/recordar.js --resumen` once
155
+ a day (Windows Task Scheduler or `cron`).
156
+ 3. Dry run without sending: `npm run recordar -- --prueba`.
157
+
158
+ You get:
159
+
160
+ - ⏰ A reminder **24 h** and another **3 h** before each pending deadline (`RECORDAR_HORAS=24,3`).
161
+ - 📝 A notification when a **grade or feedback** is published.
162
+ - 📚 A **daily summary** of the week's deadlines.
163
+
164
+ Once you submit something, it stops reminding you.
165
+
166
+ Privacy: reminder contents (assignment and course names) go through the ntfy server. You can use your
167
+ own server with `NTFY_SERVER` and `NTFY_TOKEN`.
168
+
169
+ ## Environment variables
170
+
171
+ | Variable | Purpose |
172
+ |---|---|
173
+ | `MOODLE_URL`, `MOODLE_TOKEN` | Required |
174
+ | `MOODLE_TZ` | Time zone for dates (defaults to the system's) |
175
+ | `MOODLE_DESCARGAS` | Download folder (default `~/Downloads/moodle-student-bridge`) |
176
+ | `MOODLE_ESCRITURA` | `1` to enable write mode (off by default) |
177
+ | `MOODLE_HISTORIAL` | Write-action log file |
178
+ | `NTFY_TOPIC`, `NTFY_SERVER`, `NTFY_TOKEN` | Reminders |
179
+ | `RECORDAR_HORAS`, `INTERVALO_MIN` | When to remind (default `24,3` and `60`) |
180
+
181
+ Environment variables take precedence over `.env`.
182
+
183
+ ## Security
184
+
185
+ - The token grants access to your account almost like your password. **Never commit `.env`** (it's in
186
+ `.gitignore` and `.mcpbignore`) and never paste the token in chats or issues.
187
+ - To revoke it: Moodle → Preferences → **Security keys** → reset the mobile service key. If your Moodle
188
+ doesn't show that page, **change your password** with "Log out of all web apps" checked, or ask
189
+ support to revoke your tokens.
190
+ - `leer_archivo` only downloads files from the configured Moodle site.
191
+ - See [SECURITY.md](SECURITY.md).
192
+
193
+ ## Development
194
+
195
+ ```bash
196
+ npm test # tests (no network, mocked Moodle)
197
+ npm run probar -- ver_tarea '{"tarea":"project"}' # call one tool against your Moodle
198
+ npm run mcpb # build moodle-student-bridge.mcpb for Claude Desktop
199
+ ```
200
+
201
+ Contributions are welcome: see [CONTRIBUTING.md](CONTRIBUTING.md). MIT license.