Skip to content

Commit 0817c20

Browse files
authored
Merge pull request #233 from bryan-anthropic/docs/publishing-bundle-readme
docs: add "Publishing Your Bundle" section to README
2 parents f9a551b + 5161613 commit 0817c20

1 file changed

Lines changed: 75 additions & 0 deletions

File tree

README.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,81 @@ bundle.mcpb (ZIP file)
139139
- Include all required shared libraries if dynamic linking used
140140
- Test on clean systems without development tools
141141

142+
## Publishing Your Bundle
143+
144+
Once you've packed an `.mcpb`, you need a way to distribute it. The recommended pattern is to attach it as an asset on a GitHub Release — tagged, versioned, and addressable without any additional hosting.
145+
146+
### Why GitHub Releases
147+
148+
- Release tags give consumers a stable, versioned URL per bundle.
149+
- Standard tooling (`gh`, `curl`, release-feed polling) can pull assets directly.
150+
- Monorepos can ship multiple bundles under different tag prefixes.
151+
- No extra infrastructure to run.
152+
153+
### Tag Convention
154+
155+
Use a prefixed tag pattern so a single repository can ship more than one bundle:
156+
157+
```
158+
<ServerName>-<SemVer>
159+
```
160+
161+
Examples:
162+
163+
```
164+
my-company-mcp-1.3.0
165+
analytics-mcp-2.0.1
166+
```
167+
168+
### Per-Platform Assets
169+
170+
If your server bundles platform-specific binaries, attach one `.mcpb` per platform with a consistent naming suffix:
171+
172+
```
173+
<ServerName>-<SemVer>-darwin-arm64.mcpb
174+
<ServerName>-<SemVer>-darwin-x64.mcpb
175+
<ServerName>-<SemVer>-win32-x64.mcpb
176+
```
177+
178+
If your server is cross-platform (Node.js, Python, pure script), a single `.mcpb` per release is sufficient.
179+
180+
Declare `compatibility.platforms` in each bundle's `manifest.json` to match what's actually in the bundle. Do not list platforms you haven't built for — consumers rely on this field to reject incompatible installs.
181+
182+
### Uploading from CI
183+
184+
After `mcpb pack` produces the bundle:
185+
186+
```sh
187+
gh release upload "$TAG" dist/*.mcpb --clobber
188+
```
189+
190+
`--clobber` keeps the release job idempotent on re-run.
191+
192+
### Minimum CI Shape
193+
194+
Triggered by a tag push or release event, a workflow does four things in order:
195+
196+
1. **Build** your server for each target platform.
197+
2. **Stage** `manifest.json` + server code + `icon.png` + `LICENSE` into a bundle directory.
198+
3. **Pack** with `mcpb pack <staging-dir>` to produce the `.mcpb`.
199+
4. **Upload** to the GitHub Release via `gh release upload`.
200+
201+
Signing, if required by your policy, slots in between steps 3 and 4.
202+
203+
### Entry Point Paths
204+
205+
`manifest.json` should set `entry_point` to a relative path inside the bundle, and `mcp_config.args` should reference it via `${__dirname}`:
206+
207+
```json
208+
"entry_point": "server/index.js",
209+
"mcp_config": {
210+
"command": "node",
211+
"args": ["${__dirname}/server/index.js"]
212+
}
213+
```
214+
215+
This keeps the bundle relocatable — consumers install to arbitrary paths, and `${__dirname}` resolves to the extracted bundle root at runtime.
216+
142217
# Contributing
143218

144219
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.

0 commit comments

Comments
 (0)