Skip to content

GitHub Action

The mcpb-pack GitHub Action automates the entire publishing workflow.

Add to .github/workflows/release.yml:

name: Release
on:
release:
types: [published]
permissions:
contents: write # Upload to releases
id-token: write # OIDC authentication with registry
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: NimbleBrainInc/mcpb-pack@v2

When triggered by a GitHub release:

  1. Detects your server type from manifest.json
  2. Vendors all dependencies (pip/npm)
  3. Packages everything into a .mcpb file
  4. Uploads the bundle to your GitHub release
  5. Announces to mpak.dev with OIDC authentication
InputDefaultDescription
directory.Directory containing manifest.json
output{name}-{version}.mcpbOutput filename
python-version3.13Python version for vendoring
buildtrueWhether to build the bundle
uploadtrueWhether to upload to GitHub release
announcetrueWhether to register with mpak.dev
announce-urlhttps://registry.mpak.dev/v1/bundles/announceRegistry endpoint
OutputDescription
bundle-pathPath to the generated .mcpb file
bundle-sizeSize in bytes
bundle-sha256SHA256 hash
announcedWhether registration succeeded

For testing or private servers:

- uses: NimbleBrainInc/mcpb-pack@v2
with:
upload: false
announce: false
- uses: NimbleBrainInc/mcpb-pack@v2
with:
output: "my-server-{version}.mcpb"

If your manifest.json is in a subdirectory:

- uses: NimbleBrainInc/mcpb-pack@v2
with:
directory: ./packages/my-server

To re-announce after a failed registration:

on:
release:
types: [published]
workflow_dispatch:
inputs:
build:
description: 'Build bundle'
type: boolean
default: true
announce:
description: 'Announce to registry'
type: boolean
default: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: NimbleBrainInc/mcpb-pack@v2
with:
build: ${{ inputs.build }}
announce: ${{ inputs.announce }}

The action uses GitHub OIDC tokens to authenticate with the registry.

This means:

  • No API keys - Authentication is automatic
  • Provenance - The registry knows exactly which repo published the bundle
  • Scope enforcement - Your package scope must match your GitHub org/username
permissions:
contents: write # Upload to releases
id-token: write # OIDC token for registry
RuntimeDetectionDependency Vendoring
Pythonserver.type: "python"uv pip install --target deps/
Node.jsserver.type: "node"npm install --omit=dev
Binaryserver.type: "binary"None (you build the binary)