Skip to content

feat(sdk): add validateMcpb() for pre-install bundle validation#94

Open
Ovaculos wants to merge 3 commits intoNimbleBrainInc:mainfrom
Ovaculos:feat/validate-mcpb
Open

feat(sdk): add validateMcpb() for pre-install bundle validation#94
Ovaculos wants to merge 3 commits intoNimbleBrainInc:mainfrom
Ovaculos:feat/validate-mcpb

Conversation

@Ovaculos
Copy link
Copy Markdown
Contributor

@Ovaculos Ovaculos commented May 4, 2026

Summary

  • Adds validateMcpb(path) function that validates .mcpb archives without side effects
  • Extracts to temp dir, checks manifest against McpbManifestSchema, verifies entry point exists, cleans up
  • Returns { valid: true, manifest } or { valid: false, errors: string[] }
  • Exports types: McpbValidationResult, McpbValidationSuccess, McpbValidationFailure

Test plan

  • 11 unit tests covering: valid bundles, missing files, non-zip, missing manifest, schema violations, bad server type, invalid JSON, missing entry point, temp cleanup on success/failure
  • npx pnpm@9.15.4 test passes

Closes #93

🤖 Generated with Claude Code

Validates .mcpb archives without side effects: extracts to temp dir,
checks manifest.json against McpbManifestSchema, verifies entry point
exists, cleans up. Returns typed result with manifest or error list.

Closes NimbleBrainInc#93

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Ovaculos and others added 2 commits May 5, 2026 23:19
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add valid and broken .mcpb fixtures derived from mcp-obsidian-cli and
assert validateMcpb passes on the well-formed bundle and fails with a
manifest error on the corrupted one.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(sdk): add validateMcpb() for pre-install bundle validation

1 participant