brightspace-mcp-server 5.0.10 → 5.0.12
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/build/index.js +14 -0
- package/build/utils/mcp-client-cli.js +8 -2
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -30,6 +30,20 @@ const PKG_VERSION = (() => {
|
|
|
30
30
|
})();
|
|
31
31
|
// ── Subcommand routing (before any MCP initialization) ──────────────
|
|
32
32
|
const subcommand = process.argv[2];
|
|
33
|
+
const COMMANDS = ['setup', 'auth', 'doctor', 'http'];
|
|
34
|
+
// A mistyped command (`htp`) must not quietly start a stdio server that sits
|
|
35
|
+
// waiting on stdin. Flags alone still mean the default stdio server.
|
|
36
|
+
if (subcommand !== undefined && !subcommand.startsWith('-') && !COMMANDS.includes(subcommand)) {
|
|
37
|
+
process.stderr.write(`Unknown command: ${subcommand}\n\n` +
|
|
38
|
+
'Usage: brightspace-mcp-server [command]\n\n' +
|
|
39
|
+
'Commands:\n' +
|
|
40
|
+
' (none) run the MCP server on stdio (what MCP clients launch)\n' +
|
|
41
|
+
' http run one shared MCP server on localhost\n' +
|
|
42
|
+
' setup configure your school and sign-in\n' +
|
|
43
|
+
' auth sign in to Brightspace now\n' +
|
|
44
|
+
' doctor check the install and configuration\n');
|
|
45
|
+
process.exit(2);
|
|
46
|
+
}
|
|
33
47
|
if (subcommand === 'setup') {
|
|
34
48
|
await import('./setup.js');
|
|
35
49
|
}
|
|
@@ -72,7 +72,13 @@ export function classifyRegistration(entry, platform = process.platform) {
|
|
|
72
72
|
if (argv.length === expected.length && argv.every((part, i) => part === expected[i])) {
|
|
73
73
|
return { state: "current" };
|
|
74
74
|
}
|
|
75
|
-
|
|
75
|
+
// A changed stdio entry may pass credentials as flags, inline code or URLs.
|
|
76
|
+
// Keep diagnostics useful without copying those arguments into chat/logs.
|
|
77
|
+
const basename = command.split(/[\\/]/).pop()?.toLowerCase() ?? "";
|
|
78
|
+
const name = ["node", "node.exe", "npx", "npx.cmd", "cmd", "cmd.exe"].includes(basename)
|
|
79
|
+
? basename : "a command";
|
|
80
|
+
const count = argv.length - 1;
|
|
81
|
+
return { state: "different", current: `${name} [${count} argument${count === 1 ? "" : "s"} hidden]` };
|
|
76
82
|
}
|
|
77
83
|
/**
|
|
78
84
|
* A URL with its user-info, query and fragment removed, which is where a
|
|
@@ -111,7 +117,7 @@ function readJsonFile(filePath) {
|
|
|
111
117
|
return undefined;
|
|
112
118
|
}
|
|
113
119
|
}
|
|
114
|
-
/** Codex
|
|
120
|
+
/** Codex exposes the effective entry for this working directory as JSON. */
|
|
115
121
|
function readCodexEntry(runCommand) {
|
|
116
122
|
const lookup = runCommand("codex", ["mcp", "get", "brightspace", "--json"], "pipe");
|
|
117
123
|
if (lookup.status === 0) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "brightspace-mcp-server",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.12",
|
|
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",
|