@bryan-thompson/inspector-assessment-cli 1.24.1 → 1.24.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.
@@ -410,8 +410,23 @@ async function runFullAssessment(options) {
410
410
  console.log("✅ Connected to MCP server");
411
411
  }
412
412
  // Capture server info from initialization for protocol conformance checks
413
- const serverInfo = client.getServerVersion();
414
- const serverCapabilities = client.getServerCapabilities();
413
+ // Apply defensive null checks for protocol conformance validation
414
+ const rawServerInfo = client.getServerVersion();
415
+ const rawServerCapabilities = client.getServerCapabilities();
416
+ // Build serverInfo with safe fallbacks
417
+ const serverInfo = rawServerInfo
418
+ ? {
419
+ name: rawServerInfo.name || "unknown",
420
+ version: rawServerInfo.version,
421
+ metadata: rawServerInfo.metadata,
422
+ }
423
+ : undefined;
424
+ // ServerCapabilities can be undefined - that's valid per MCP spec
425
+ const serverCapabilities = rawServerCapabilities ?? undefined;
426
+ // Log warning if server didn't provide initialization info
427
+ if (!serverInfo && !options.jsonOnly) {
428
+ console.log("⚠️ Server did not provide serverInfo during initialization");
429
+ }
415
430
  const response = await client.listTools();
416
431
  const tools = response.tools || [];
417
432
  // Emit JSONL tool discovery events for audit-worker parsing
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bryan-thompson/inspector-assessment-cli",
3
- "version": "1.24.1",
3
+ "version": "1.24.2",
4
4
  "description": "CLI for the Enhanced MCP Inspector with assessment capabilities",
5
5
  "license": "MIT",
6
6
  "author": "Bryan Thompson <bryan@triepod.ai>",