brightspace-mcp-server 3.8.1 → 3.8.2
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/README.md
CHANGED
|
@@ -99,7 +99,7 @@ There's no login step — asking a question signs you in.
|
|
|
99
99
|
|
|
100
100
|
**Normal days:** tokens renew over HTTPS, and a background browser silently replays your saved Microsoft session (silent SSO) if it lapses.
|
|
101
101
|
|
|
102
|
-
**When MFA is asked:** the number to approve shows up right in the tool's response, and sign-in finishes in the background — approve it, call the tool again, and use the newest number if one goes stale. TOTP apps (Google Authenticator, etc.) get prompted via the terminal; visible-browser mode opens a window instead, though automatic recovery during a tool call still runs headless unless you set `D2L_HEADLESS=false`. On Duo, sign-in auto-answers "Is this your device?" with **yes**, since a headless run has nobody to click it — this also makes Duo remember the device, so skip it on shared machines. Set `D2L_DUO_PASSCODE` to swap the push for a typed passcode. On Microsoft's MFA page the server
|
|
102
|
+
**When MFA is asked:** the number to approve shows up right in the tool's response, and sign-in finishes in the background — approve it, call the tool again, and use the newest number if one goes stale. TOTP apps (Google Authenticator, etc.) get prompted via the terminal; visible-browser mode opens a window instead, though automatic recovery during a tool call still runs headless unless you set `D2L_HEADLESS=false`. On Duo, sign-in auto-answers "Is this your device?" with **yes**, since a headless run has nobody to click it — this also makes Duo remember the device, so skip it on shared machines. Set `D2L_DUO_PASSCODE` to swap the push for a typed passcode. On Microsoft's MFA page, setting `D2L_REMEMBER_MFA=true` makes the server tick "Don't ask again" when your school offers it, so later sign-ins can skip the second factor; how long that lasts is the school's setting, not the server's. It is off by default — leave it off on a shared machine — and `get_server_info` shows whether the box was ticked, offered, or left alone.
|
|
103
103
|
|
|
104
104
|
**If it gets stuck:** a missed MFA approval pauses automatic sign-in for 5 minutes. This retries immediately, takes over a stuck sign-in, or asks for a code:
|
|
105
105
|
|
|
@@ -123,7 +123,7 @@ Run it from your home folder — macOS blocks `npx` from Documents, Desktop, or
|
|
|
123
123
|
| Roster | "Who are the TAs for ECE 264?" · "Get me my instructor's email" |
|
|
124
124
|
| Discussions | "What are people saying in the final project thread?" · "Summarize the latest discussion posts" |
|
|
125
125
|
| Video transcripts | "What did the professor say about pinch-off in Tuesday's lecture recording?" · "Summarize last week's BoilerCast video" — works for Kaltura and YouTube embeds; other platforms report that they aren't supported yet |
|
|
126
|
-
| Troubleshooting | "Which version of the Brightspace server am I running?" · "Where is my Brightspace config file?" — `get_server_info` reports the version, Node runtime, platform, config and session paths, school URL, whether a credential is stored, and what Microsoft remembered (`microsoftSession`: stay-signed-in and its expiry, plus whether "Don't ask again" was ticked, already on, or
|
|
126
|
+
| Troubleshooting | "Which version of the Brightspace server am I running?" · "Where is my Brightspace config file?" — `get_server_info` reports the version, Node runtime, platform, config and session paths, school URL, whether a credential is stored, and what Microsoft remembered (`microsoftSession`: stay-signed-in and its expiry, plus whether "Don't ask again" was ticked, already on, not offered, or left off because `D2L_REMEMBER_MFA` isn't set), without contacting Brightspace or revealing secrets |
|
|
127
127
|
| Calendar | "When is my midterm?" · "What's on my calendar this week?" · "Is lab cancelled on Thursday?" — reads exams, labs, review sessions, and deadlines instructors put only on the course calendar |
|
|
128
128
|
| Planning | "Build me a study schedule based on my upcoming due dates" · "Which class needs the most attention right now?" — pulls from assignments, quizzes, graded discussion topics (any topic with a due date), and course calendar events such as exams and labs |
|
|
129
129
|
|
|
@@ -10,7 +10,7 @@ import { BROWSER_STATE_FILE } from "./browser-state-store.js";
|
|
|
10
10
|
const SUMMARY_FILE = "microsoft-session.json";
|
|
11
11
|
const ENTRA_HOST = "login.microsoftonline.com";
|
|
12
12
|
const ENTRA_COOKIES = new Set(["ESTSAUTH", "ESTSAUTHPERSISTENT", "ESTSAUTHLIGHT"]);
|
|
13
|
-
const OUTCOMES = ["ticked", "already", "absent", "unknown"];
|
|
13
|
+
const OUTCOMES = ["ticked", "already", "absent", "unknown", "off"];
|
|
14
14
|
/** Latest expiry of each Entra sign-in cookie in a jar. */
|
|
15
15
|
function entraExpiries(state) {
|
|
16
16
|
const expiries = new Map();
|
package/build/auth/purdue-sso.js
CHANGED
|
@@ -39,6 +39,7 @@ const REMEMBER_MFA_LOG = {
|
|
|
39
39
|
already: "already checked",
|
|
40
40
|
absent: "not offered by tenant",
|
|
41
41
|
unknown: "could not be ticked",
|
|
42
|
+
off: "off (set D2L_REMEMBER_MFA=true to tick it)",
|
|
42
43
|
};
|
|
43
44
|
/** How often to look for the number while waiting on MFA. */
|
|
44
45
|
const NUMBER_MATCH_POLL_MS = 2000;
|
|
@@ -469,11 +470,18 @@ export class PurdueSSOFlow {
|
|
|
469
470
|
}
|
|
470
471
|
/**
|
|
471
472
|
* Tick Entra's "Don't ask again" box, once per login and never in a loop.
|
|
473
|
+
* Opt-in: without an explicit true the box is left alone and the outcome
|
|
474
|
+
* is recorded as "off", so get_server_info can say why nothing was ticked.
|
|
472
475
|
* An already-checked box is left alone so this can never untick it.
|
|
473
476
|
*/
|
|
474
477
|
async rememberMfaDevice(page) {
|
|
475
|
-
if (this.rememberMfa
|
|
478
|
+
if (this.rememberMfa)
|
|
476
479
|
return;
|
|
480
|
+
if (this.config.rememberMfa !== true) {
|
|
481
|
+
this.rememberMfa = { outcome: "off", at: new Date().toISOString() };
|
|
482
|
+
log("INFO", `Entra remember-MFA checkbox: ${REMEMBER_MFA_LOG.off}`);
|
|
483
|
+
return;
|
|
484
|
+
}
|
|
477
485
|
if (new URL(page.url()).hostname !== "login.microsoftonline.com")
|
|
478
486
|
return;
|
|
479
487
|
// A nicety, never a reason to fail sign-in: any surprise is "unknown".
|
package/build/utils/config.js
CHANGED
|
@@ -29,8 +29,10 @@ export async function loadConfig() {
|
|
|
29
29
|
const headless = envBoolean(process.env.D2L_HEADLESS, "D2L_HEADLESS")
|
|
30
30
|
?? store?.headless
|
|
31
31
|
?? true;
|
|
32
|
-
//
|
|
33
|
-
|
|
32
|
+
// Opt-in: ask Microsoft to skip the second factor for its "Don't ask again"
|
|
33
|
+
// window. Off unless D2L_REMEMBER_MFA=true, so a shared machine never
|
|
34
|
+
// remembers MFA without the user choosing it.
|
|
35
|
+
const rememberMfa = envBoolean(process.env.D2L_REMEMBER_MFA, "D2L_REMEMBER_MFA") ?? false;
|
|
34
36
|
// Resolve tokenTtl: env > store > default (3600)
|
|
35
37
|
const tokenTtl = positiveSeconds(process.env.D2L_TOKEN_TTL, "D2L_TOKEN_TTL")
|
|
36
38
|
?? positiveSeconds(store?.tokenTtl, "tokenTtl in config.json")
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "brightspace-mcp-server",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.2",
|
|
4
4
|
"mcpName": "io.github.rohanmuppa/brightspace",
|
|
5
5
|
"description": "MCP server for Brightspace (D2L). Check grades, due dates, assignments, announcements, syllabus, rosters and more via Claude, ChatGPT, Cursor, Windsurf, or any MCP client.",
|
|
6
6
|
"type": "module",
|