brightspace-mcp-server 4.0.3 → 4.0.5

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.
@@ -7,6 +7,15 @@ import * as fs from "node:fs/promises";
7
7
  import * as path from "node:path";
8
8
  import { writeFileAtomic } from "../utils/atomic-write.js";
9
9
  import { BROWSER_STATE_FILE } from "./browser-state-store.js";
10
+ const STAY_SIGNED_IN_NOTE = "Stay signed in keeps the Microsoft sign-in only; your school can still ask for 2FA on a new sign-in.";
11
+ /** One sentence for each Don't ask again outcome, after STAY_SIGNED_IN_NOTE. */
12
+ const REMEMBER_MFA_NOTES = {
13
+ ticked: "\"Don't ask again\" was ticked, so Microsoft may skip 2FA for a while; your school decides how long.",
14
+ already: "\"Don't ask again\" was already on, so Microsoft may skip 2FA for a while; your school decides how long.",
15
+ absent: "Your school's sign-in page didn't offer \"Don't ask again\", so 2FA is asked whenever your school requires it.",
16
+ unknown: "Whether \"Don't ask again\" applied isn't known yet; it is recorded at the next sign-in that reaches 2FA.",
17
+ off: "\"Don't ask again\" is off. To be asked less often, rerun setup and pick \"Less often\" (or set D2L_REMEMBER_MFA=true).",
18
+ };
10
19
  /** The plain summary, relative to its session directory. */
11
20
  export const MICROSOFT_SESSION_FILE = "microsoft-session.json";
12
21
  const ENTRA_HOST = "login.microsoftonline.com";
@@ -80,5 +89,6 @@ export async function readMicrosoftSession(sessionDir, now = Date.now()) {
80
89
  staySignedInExpires: staySignedIn && expires > 0 ? new Date(expires * 1000).toISOString() : null,
81
90
  rememberMfa: summary.rememberMfa?.outcome ?? "unknown",
82
91
  rememberMfaAt: summary.rememberMfa?.at ?? null,
92
+ note: `${STAY_SIGNED_IN_NOTE} ${REMEMBER_MFA_NOTES[summary.rememberMfa?.outcome ?? "unknown"]}`,
83
93
  };
84
94
  }
@@ -57,7 +57,7 @@ export function registerGetServerInfo(server, config, version, apiClient, readSi
57
57
  server.registerTool("get_server_info", {
58
58
  title: "Get Server Info",
59
59
  annotations: { readOnlyHint: true },
60
- description: "Report which version of the Brightspace MCP server is running, the Node.js runtime, platform, config file path, session state directory, configured school URL, whether a credential is stored, the server's local timezone and UTC offset, (once a browser sign-in has been saved) what Microsoft remembered: stay-signed-in and the Don't ask again MFA checkbox, (when signed in) the account's uniqueName/displayName as signedInAs, and this process's request counters (requests: responses by status class, network errors, cache hits/misses, coalesced joins, and token refreshes). Use this for troubleshooting, when the user asks which version they have, or what timezone/account dates are being computed against. Never contacts Brightspace and never returns secrets.",
60
+ description: "Report which version of the Brightspace MCP server is running, the Node.js runtime, platform, config file path, session state directory, configured school URL, whether a credential is stored, the server's local timezone and UTC offset, (once a browser sign-in has been saved) what Microsoft remembered: stay-signed-in (which keeps the Microsoft sign-in but does not by itself skip 2FA) and the Don't ask again MFA checkbox, with a plain-language note on what that means for 2FA to relay to the user, (when signed in) the account's uniqueName/displayName as signedInAs, and this process's request counters (requests: responses by status class, network errors, cache hits/misses, coalesced joins, and token refreshes). Use this for troubleshooting, when the user asks which version they have, or what timezone/account dates are being computed against. Never contacts Brightspace and never returns secrets.",
61
61
  inputSchema: GetServerInfoSchema,
62
62
  }, async () => {
63
63
  const [microsoftSession, signedInAs] = await Promise.all([
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brightspace-mcp-server",
3
- "version": "4.0.3",
3
+ "version": "4.0.5",
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",