mcpb-packager
v1.0.0
Published
Packaging automation tool for MCP servers as Desktop Extensions (.mcpb)
Maintainers
Readme
mcpb-packager
A command-line tool to automate the packaging of Model Context Protocol (MCP) servers into .mcpb Desktop Extensions. It can package local source directories, npm/PyPI packages launched on demand, or GitHub repositories cloned on the fly.
Installation
npm install -g mcpb-packagerUnder the hood it uses @anthropic-ai/mcpb, which is installed automatically.
Prerequisites
- Node.js ≥ 16 (always required)
- git — only if you use
--type httpto clone repositories - uvx (from astral-sh/uv) — only if your end users will launch a Python MCP via
--type uvx
Usage
Package an npm package (via npx)
mcpb-packager --package @energio/holded-mcp --type npx --env HOLDED_API_KEYUse --env to declare the environment variables the end user will be prompted for when installing the extension.
Package a Python package (via uvx)
mcpb-packager --package trello-mcp-server --type uvx --env TRELLO_API_KEYPackage from a GitHub repository
The tool clones the repository, runs its install/build commands, and produces the bundle.
mcpb-packager --package https://github.com/user/repo-mcp.git --type httpPackage a local MCP source directory
Drop an mcp-config.json next to your server and run from the parent directory:
mcpb-packager # scans cwd for any subdirectory with mcp-config.json
mcpb-packager ./my-local-mcp # packages a specific local directoryOptions
-p, --package <pkg>(Required for external packages) — npm package, PyPI package, or git URL.-t, --type <type>(Required with--package) — execution strategy:npx,uvx, orhttp.-e, --env <vars>(Optional) — comma-separated list of env variables the user will fill in (API_KEY,DB_HOST).-a, --args <args>(Optional) — extra arguments passed through to the server when launched.-o, --out <dir>(Optional) — output directory for generated.mcpbfiles. Defaults to the current working directory. Relative paths are resolved against the cwd.-h, --help— show usage.
Output
By default the generated .mcpb files are written to the current working directory. Pass --out <dir> to redirect them somewhere else.
License
MIT
