feat(pack): add mcpb bundling support with cvm manifest conventions#4
Open
abhayguptas wants to merge 3 commits into
Open
feat(pack): add mcpb bundling support with cvm manifest conventions#4abhayguptas wants to merge 3 commits into
abhayguptas wants to merge 3 commits into
Conversation
- Add transport field (stdio/cvm) for dual-mode bundle execution - Add env_mapping contract for native CVM server config injection - Restructure CVM meta to use nested defaults object - Add docker server type with image and compose_file support - Implement CVM transport mode in serve (spawn with env vars, no Gateway) - Update pack-init wizard with transport, docker, and env_mapping prompts - Remove announce/pricing fields (not needed for initial scope) - Fix duplicate --help line in serve help text
- Fix encryption enum: use 'required' instead of 'nip44' to match SDK EncryptionMode - Make display_name optional per MCPB spec - Add mcp_config.env support with __dirname substitution - Add 'uv' server type for Python UV dependency management (MCPB v0.4+)
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.
Resolves #3
Description
This PR introduces the
packcommand, enabling developers to package local MCP servers into distributable.mcpbbundles. It also extends theservecommand to seamlessly execute these bundles over the Nostr network.The implementation fully adheres to Anthropic's MCPB specification while extending it with a
_meta.com.contextvmnamespace to carry CVM-specific metadata (relays, public mode, encryption, etc.) without breaking compatibility with other hosts.Changes Made
src/pack/cvm-manifest.ts) to strictly type and validate the_meta.com.contextvmnamespace insidemanifest.json.cvmi pack: Introduced a new subcommand that packages a project directory into an.mcpbzip archive with maximum compression.cvmi packand no manifest exists, an interactive wizard prompts them for server details and CVM-specific defaults (relays, encryption mode) to generate a validmanifest.json.cvmi serve <bundle.mcpb>: Upgraded the serve command to accept an.mcpbfile. It extracts the bundle into a secure temporary directory, reads the custom metadata to override gateway defaults, and runs the server over Nostr.cli.tsand updatedAGENTS.mddocs.Verification
.git,.DS_Store, andnode_modules/.cachewhile preserving necessary dotfiles (dot: true).cvmi servecorrectly extracts the bundle, parses the CVM config, applies runtime overrides via CLI flags, and successfully exposes the server.pnpm type-checkwith 0 errors.