feat: add --manifest flag to pack command#208
Open
bryan-anthropic wants to merge 1 commit intomainfrom
Open
Conversation
Allow specifying an external manifest file path with `mcpb pack --manifest <path>`. The manifest resolves relative to CWD, is validated, injected into the bundle, and errors immediately if the specified file is not found. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
bryan-anthropic
commented
Mar 16, 2026
Collaborator
Author
bryan-anthropic
left a comment
There was a problem hiding this comment.
Review by Claude Code
Small, clean feature addition. Observations:
- Commander integration is clean —
.option('-m, --manifest <path>', ...)follows the existing CLI patterns incli.ts. resolve(customManifestPath)ensures the manifest path resolves relative to CWD, which is the expected behavior for a CLI flag (as opposed to relative to the project directory).- Manifest injection via
files["manifest.json"] = { data, mode }correctly overwrites any manifest that may exist in the project directory. This is intentional — an explicit--manifestflag should take precedence over auto-discovered manifests. - Error handling is appropriate: when an explicit path is provided but not found, the command errors immediately rather than falling back to interactive prompts. This is the right UX for a flag-driven workflow.
- Both test cases (valid manifest path succeeds, invalid path fails) follow the existing test patterns and cover the key scenarios.
- Fully backward compatible — omitting
--manifestpreserves existing behavior.
No issues found.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
-m, --manifest <path>option tomcpb packso users can specify a manifest file outside the project directorycleanMcpb()and other callers work unchangedCloses #87
Test plan
yarn build— cleanyarn lint— cleanyarn test— 220 pass (218 existing + 2 new)--manifest→ unpack → MCP initialize + tools/list → responds correctly--manifest /nonexistent→ exits 1🤖 Generated with Claude Code