Skip to content

Add MCP bundle (.mcpb) for Smithery local-connector publishing#49

Merged
swperb merged 1 commit into
mainfrom
feat/smithery-bundle
Jun 15, 2026
Merged

Add MCP bundle (.mcpb) for Smithery local-connector publishing#49
swperb merged 1 commit into
mainfrom
feat/smithery-bundle

Conversation

@swperb

@swperb swperb commented Jun 15, 2026

Copy link
Copy Markdown
Owner

Packages imgcli-mcp as 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_image takes input/output paths). A remote-hosted server runs in Smithery's cloud and can't see the user's files — only generated inputs like testsrc=. 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_version 0.3): a node stdio server running dist/index.js, the three tools, and an imgcli_bin user_config mapped to IMGCLI_BIN (defaults to imgcli on PATH).
  • mcp/build-bundle.sh (npm run bundle) — reproducibly builds a self-contained ~3 MB bundle (compiled server + production node_modules) via @anthropic-ai/mcpb. The imgcli C binary stays a prerequisite (platform-specific), configured via imgcli_bin.
  • mcp/README.md — documents the publish flow and notes the hosted-container path is demo-only.
  • .gitignore — ignores the *.mcpb artifact.

Publish

cd mcp && ./build-bundle.sh
npx -y @smithery/cli@latest mcp publish ./imgcli-mcp.mcpb -n swperb/imgcli

Verification

  • Staged server passes a stdio initialize handshake (serverInfo: imgcli 0.3.0)
  • Bundle packs + validates: manifest.json + dist/index.js + node_modules at root
  • build-bundle.sh reproduces the bundle from a clean tree

🤖 Generated with Claude Code

…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>
@swperb swperb merged commit a4b2bb0 into main Jun 15, 2026
8 checks passed
@swperb swperb deleted the feat/smithery-bundle branch June 15, 2026 16:25
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.

1 participant