Skip to content

Commit 42afef9

Browse files
committed
feat(release): add MCPB bundle packaging to release pipeline
- package-mcpb CI job: pack, sign, verify, attest, upload - just mcpb recipe for local bundle builds - .gitignore: add server/ and *.mcpb, allow certs/*.pem - docs: MCPB install instructions in MCP.md and PACKAGE-MANAGERS.md
1 parent 5fafe73 commit 42afef9

File tree

5 files changed

+137
-0
lines changed

5 files changed

+137
-0
lines changed

.github/workflows/release.yml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,3 +303,92 @@ jobs:
303303
with:
304304
name: ${{ matrix.asset_name }}
305305
path: ${{ matrix.asset_name }}
306+
307+
package-mcpb:
308+
name: Package MCPB Bundle
309+
needs: [create-release, build-binaries]
310+
runs-on: ubuntu-latest
311+
steps:
312+
- name: Checkout repository
313+
# yamllint disable-line rule:line-length
314+
uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98 # v6.0.2
315+
316+
- name: Setup Node.js
317+
# yamllint disable-line rule:line-length
318+
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
319+
with:
320+
node-version: "22"
321+
322+
- name: Install mcpb CLI
323+
run: npm install -g @anthropic-ai/mcpb
324+
325+
- name: Download platform binaries
326+
env:
327+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
328+
run: |
329+
mkdir -p server
330+
gh release download "${{ github.ref_name }}" \
331+
--pattern "nsip-linux-amd64" \
332+
--pattern "nsip-linux-arm64" \
333+
--pattern "nsip-macos-amd64" \
334+
--pattern "nsip-macos-arm64" \
335+
--pattern "nsip-windows-amd64.exe" \
336+
--dir server
337+
338+
- name: Set binary permissions
339+
run: chmod +x server/nsip-*
340+
341+
- name: Inject version into manifest
342+
env:
343+
VERSION: >-
344+
${{ needs.create-release.outputs.version }}
345+
run: >-
346+
sed -i
347+
"s/\"version\": \".*\"/\"version\": \"${VERSION}\"/"
348+
manifest.json
349+
350+
- name: Validate manifest
351+
run: mcpb validate .
352+
353+
- name: Pack bundle
354+
run: mcpb pack . --output nsip.mcpb
355+
356+
- name: Sign bundle
357+
env:
358+
MCPB_SIGNING_KEY: ${{ secrets.MCPB_SIGNING_KEY }}
359+
run: |
360+
echo "$MCPB_SIGNING_KEY" > /tmp/signing-key.pem
361+
mcpb sign nsip.mcpb \
362+
--cert certs/mcpb-signing.pem \
363+
--key /tmp/signing-key.pem
364+
rm -f /tmp/signing-key.pem
365+
366+
- name: Verify signature
367+
run: mcpb verify nsip.mcpb
368+
369+
- name: Inspect bundle
370+
run: mcpb info nsip.mcpb
371+
372+
- name: Attest bundle provenance
373+
id: attest_mcpb
374+
# yamllint disable-line rule:line-length
375+
uses: actions/attest-build-provenance@62fc1d596301d0ab9914e1fec14dc5c8d93f65cd # v3.2.0
376+
with:
377+
subject-path: nsip.mcpb
378+
379+
- name: Rename attestation bundle
380+
env:
381+
MCPB_BUNDLE: >-
382+
${{ steps.attest_mcpb.outputs.bundle-path }}
383+
run: >-
384+
cp "$MCPB_BUNDLE"
385+
nsip.mcpb.sigstore.json
386+
387+
- name: Upload to release
388+
env:
389+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
390+
run: |
391+
gh release upload "${{ github.ref_name }}" \
392+
nsip.mcpb \
393+
nsip.mcpb.sigstore.json \
394+
--clobber

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ Desktop.ini
7777
secrets/
7878
credentials/
7979
*.pem
80+
!certs/*.pem
8081
*.key
8182

8283
# Temporary files
@@ -110,3 +111,7 @@ junit.xml
110111
# Generated CLI artifacts
111112
completions/
112113
man/
114+
115+
# MCPB staging
116+
server/
117+
*.mcpb

docs/MCP.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,16 @@ Pre-built binaries are available from [GitHub Releases](https://github.com/zirco
4848
| macOS ARM64 | `nsip-macos-arm64` |
4949
| Windows x86_64 | `nsip-windows-amd64.exe` |
5050

51+
### MCP Bundle (Claude Desktop / Claude Code)
52+
53+
Download the universal `nsip.mcpb` bundle from [GitHub Releases](https://github.com/zircote/nsip/releases). It contains all platforms in a single file.
54+
55+
**Claude Desktop:** Drag `nsip.mcpb` into Settings > Extensions, or double-click it.
56+
57+
**Claude Code:** Install via the extensions UI.
58+
59+
The bundle auto-selects the correct binary for your platform (macOS ARM64, Linux x86_64, Windows x86_64).
60+
5161
### Docker
5262

5363
```bash

docs/distribution/PACKAGE-MANAGERS.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,27 @@ msiexec /i nsip-0.1.0-x64.msi /quiet
9292

9393
**Install Location:** `C:\Program Files\nsip\`
9494

95+
### MCP Bundle (.mcpb)
96+
97+
```bash
98+
# Download from releases
99+
curl -LO https://github.com/zircote/nsip/releases/latest/download/nsip.mcpb
100+
101+
# Install in Claude Desktop: drag into Settings > Extensions
102+
# Verify integrity:
103+
gh attestation verify nsip.mcpb --repo zircote/nsip
104+
```
105+
106+
**Workflow:** `.github/workflows/release.yml` (package-mcpb job)
107+
108+
**Bundle Contents:**
109+
- `manifest.json` - MCPB v0.3 manifest with tool/prompt declarations
110+
- `server/nsip-linux-amd64` - Linux x86_64 binary
111+
- `server/nsip-linux-arm64` - Linux ARM64 binary
112+
- `server/nsip-macos-amd64` - macOS x86_64 binary
113+
- `server/nsip-macos-arm64` - macOS ARM64 binary
114+
- `server/nsip-windows-amd64.exe` - Windows x86_64 binary
115+
95116
## Configuration
96117

97118
### Debian Package Metadata

justfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,18 @@ publish-dry:
130130
changelog:
131131
git-cliff --latest --strip header
132132

133+
# Build MCPB bundle locally (requires: npm i -g @anthropic-ai/mcpb)
134+
mcpb: build-release
135+
@mkdir -p server
136+
@cp target/release/nsip server/nsip-$(uname -s | tr '[:upper:]' '[:lower:]')-$(uname -m | sed 's/arm64/arm64/;s/aarch64/arm64/;s/x86_64/amd64/') 2>/dev/null || true
137+
mcpb validate .
138+
mcpb pack . --output nsip.mcpb
139+
mcpb sign nsip.mcpb --self-signed || true
140+
mcpb verify nsip.mcpb
141+
mcpb info nsip.mcpb
142+
@echo "Bundle created: nsip.mcpb"
143+
@rm -rf server
144+
133145
# === Shell Completions & Man Pages ===
134146

135147
# Generate shell completions for all supported shells

0 commit comments

Comments
 (0)