Add MCP bundle (.mcpb) for Smithery local-connector publishing#49
Merged
Conversation
…al connector imgcli operates on local file paths, so a remote-hosted server can't reach a user's files — only generated inputs. The useful Smithery distribution is a local connector that installs and runs on the user's machine. Package that as an MCP bundle. - mcp/manifest.json: MCPB manifest (manifest_version 0.3) — node stdio server running dist/index.js, the three tools, and an `imgcli_bin` user_config that maps to IMGCLI_BIN (defaults to "imgcli" on PATH). - mcp/build-bundle.sh + `npm run bundle`: reproducibly build a self-contained ~3 MB bundle (compiled server + production node_modules) via @anthropic-ai/mcpb. - mcp/README.md: document the bundle publish flow (`smithery mcp publish ./imgcli-mcp.mcpb -n swperb/imgcli`) and note the hosted container path is demo-only (can't see local files). - .gitignore: ignore the *.mcpb build artifact. Verified: the staged server passes a stdio initialize handshake, the bundle packs and validates (manifest + dist + node_modules at root), and build-bundle.sh reproduces it from a clean tree. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Packages
imgcli-mcpas an MCP bundle so it can be published on Smithery as a local connector — installed and run on the user's own machine, where it can actually read and write their files.Why a bundle (not a hosted container)
imgcli works on local file paths (
convert_imagetakesinput/outputpaths). A remote-hosted server runs in Smithery's cloud and can't see the user's files — only generated inputs liketestsrc=. So the right Smithery distribution is a local connector, which is exactly what an MCP bundle is.What's here
mcp/manifest.json— MCPB manifest (manifest_version0.3): a node stdio server runningdist/index.js, the three tools, and animgcli_binuser_configmapped toIMGCLI_BIN(defaults toimgclionPATH).mcp/build-bundle.sh(npm run bundle) — reproducibly builds a self-contained ~3 MB bundle (compiled server + productionnode_modules) via@anthropic-ai/mcpb. TheimgcliC binary stays a prerequisite (platform-specific), configured viaimgcli_bin.mcp/README.md— documents the publish flow and notes the hosted-container path is demo-only..gitignore— ignores the*.mcpbartifact.Publish
Verification
initializehandshake (serverInfo: imgcli 0.3.0)manifest.json+dist/index.js+node_modulesat rootbuild-bundle.shreproduces the bundle from a clean tree🤖 Generated with Claude Code