canvas-parent-mcp 1.0.1 → 1.0.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.
@@ -7,7 +7,7 @@
7
7
  },
8
8
  "metadata": {
9
9
  "description": "MCP server for Canvas LMS (Instructure) — courses, grades, assignments, announcements, planner, conversations, files",
10
- "version": "1.0.1"
10
+ "version": "1.0.2"
11
11
  },
12
12
  "plugins": [
13
13
  {
@@ -15,7 +15,7 @@
15
15
  "displayName": "Canvas LMS",
16
16
  "source": "./",
17
17
  "description": "Canvas LMS (Instructure) MCP server for Claude — student/observer access via natural language",
18
- "version": "1.0.1",
18
+ "version": "1.0.2",
19
19
  "author": {
20
20
  "name": "Chris Hall"
21
21
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "canvas-parent-mcp",
3
3
  "displayName": "Canvas LMS",
4
- "version": "1.0.1",
4
+ "version": "1.0.2",
5
5
  "description": "Canvas LMS (Instructure) MCP server for Claude — courses, grades, assignments, announcements, planner, conversations, files",
6
6
  "author": {
7
7
  "name": "Chris Hall",
package/dist/bundle.js CHANGED
@@ -30865,6 +30865,7 @@ function readVar(env, key) {
30865
30865
  if (typeof raw !== "string") return void 0;
30866
30866
  const trimmed = raw.trim();
30867
30867
  if (trimmed.length === 0) return void 0;
30868
+ if (trimmed === "undefined" || trimmed === "null") return void 0;
30868
30869
  if (/^\$\{[^}]*\}$/.test(trimmed)) return void 0;
30869
30870
  return trimmed;
30870
30871
  }
@@ -31642,7 +31643,7 @@ try {
31642
31643
  }
31643
31644
  var account = loadAccount();
31644
31645
  var client = new CanvasClient(account);
31645
- var server = new McpServer({ name: "canvas", version: "1.0.1" });
31646
+ var server = new McpServer({ name: "canvas", version: "1.0.2" });
31646
31647
  registerProfileTools(server, client);
31647
31648
  registerObserveeTools(server, client);
31648
31649
  registerCourseTools(server, client);
package/dist/config.js CHANGED
@@ -1,9 +1,13 @@
1
1
  /**
2
- * Read an env var, trim whitespace, and treat the empty string as unset. Also
3
- * defensively rejects values that look like an unsubstituted shell placeholder
4
- * (e.g. "${CANVAS_TOKEN}") — these can leak through .mcp.json env blocks when
5
- * the host (Claude Code / Desktop) doesn't expand them, and would otherwise
6
- * be sent to Canvas as a literal token and rejected with a confusing 401.
2
+ * Read an env var, trim whitespace, and treat as unset for several "looks-set
3
+ * but-isn't" inputs that some MCP hosts pass through when a value really is
4
+ * undefined:
5
+ * - empty string / whitespace-only
6
+ * - literal "undefined" / "null" (Claude Desktop stringifies undefined
7
+ * user_config refs to the 9-letter string "undefined", which would
8
+ * otherwise be sent to upstream APIs as a Bearer token and rejected)
9
+ * - unsubstituted shell placeholder, e.g. "${CANVAS_TOKEN}" or
10
+ * "${user_config.canvas_token}" (other hosts leave the placeholder intact)
7
11
  */
8
12
  function readVar(env, key) {
9
13
  const raw = env[key];
@@ -12,6 +16,8 @@ function readVar(env, key) {
12
16
  const trimmed = raw.trim();
13
17
  if (trimmed.length === 0)
14
18
  return undefined;
19
+ if (trimmed === 'undefined' || trimmed === 'null')
20
+ return undefined;
15
21
  if (/^\$\{[^}]*\}$/.test(trimmed))
16
22
  return undefined;
17
23
  return trimmed;
package/dist/index.js CHANGED
@@ -29,7 +29,7 @@ import { registerDiscussionTools } from './tools/discussions.js';
29
29
  import { registerFileTools } from './tools/files.js';
30
30
  const account = loadAccount();
31
31
  const client = new CanvasClient(account);
32
- const server = new McpServer({ name: 'canvas', version: '1.0.1' });
32
+ const server = new McpServer({ name: 'canvas', version: '1.0.2' });
33
33
  registerProfileTools(server, client);
34
34
  registerObserveeTools(server, client);
35
35
  registerCourseTools(server, client);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "canvas-parent-mcp",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "mcpName": "io.github.chrischall/canvas-parent-mcp",
5
5
  "description": "Canvas LMS (Instructure) MCP server — student/observer read access with optional file download",
6
6
  "author": "Claude Code (AI) <https://www.anthropic.com/claude>",
package/server.json CHANGED
@@ -6,12 +6,12 @@
6
6
  "url": "https://github.com/chrischall/canvas-parent-mcp",
7
7
  "source": "github"
8
8
  },
9
- "version": "1.0.1",
9
+ "version": "1.0.2",
10
10
  "packages": [
11
11
  {
12
12
  "registryType": "npm",
13
13
  "identifier": "canvas-parent-mcp",
14
- "version": "1.0.1",
14
+ "version": "1.0.2",
15
15
  "transport": {
16
16
  "type": "stdio"
17
17
  },