Multi-Platform Builds
If your MCP server has native dependencies (C extensions, Rust bindings, etc.), you need to build separately for each target platform.
When You Need Multi-Platform
Section titled “When You Need Multi-Platform”- Python with C extensions - numpy, pandas, cryptography, etc.
- Node.js with native modules - better-sqlite3, sharp, etc.
- Binary servers - Go, Rust, C++ always need platform-specific builds
Matrix Build
Section titled “Matrix Build”Use a GitHub Actions matrix to build on each platform:
name: Releaseon: release: types: [published]
permissions: contents: write id-token: write
jobs: build: strategy: matrix: include: - os: linux arch: x64 runner: ubuntu-latest - os: linux arch: arm64 runner: ubuntu-24.04-arm - os: darwin arch: arm64 runner: macos-latest - os: darwin arch: x64 runner: macos-15-intel runs-on: ${{ matrix.runner }} steps: - uses: actions/checkout@v4 - uses: NimbleBrainInc/mcpb-pack@v2 with: output: "{name}-{version}-${{ matrix.os }}-${{ matrix.arch }}.mcpb"Each job:
- Runs on the target platform
- Builds with native dependencies for that platform
- Uploads a platform-specific
.mcpbfile - Announces to the registry
The registry automatically merges all platform artifacts for the same version.
Available Runners
Section titled “Available Runners”Free Runners
Section titled “Free Runners”| Platform | Runner Label | Architecture |
|---|---|---|
| Linux x64 | ubuntu-latest | x64 |
| Linux ARM | ubuntu-24.04-arm | arm64 |
| macOS ARM | macos-latest | arm64 (M1) |
| macOS Intel | macos-15-intel | x64 |
Paid Runners (Team/Enterprise)
Section titled “Paid Runners (Team/Enterprise)”| Platform | Runner Label | Architecture |
|---|---|---|
| macOS Intel | macos-15-large | x64 (12 vCPU) |
| macOS ARM | macos-15-xlarge | arm64 (M2) |
Binary Servers
Section titled “Binary Servers”For compiled languages, build your binary before running mcpb-pack:
jobs: build: strategy: matrix: include: - os: linux arch: x64 runner: ubuntu-latest - os: darwin arch: arm64 runner: macos-latest runs-on: ${{ matrix.runner }} steps: - uses: actions/checkout@v4
- uses: actions/setup-go@v5 with: go-version: "1.22"
- name: Build binary run: | mkdir -p bin go build -o bin/server ./cmd/server
- uses: NimbleBrainInc/mcpb-pack@v2 with: output: "{name}-{version}-${{ matrix.os }}-${{ matrix.arch }}.mcpb"Pure Python/Node (No Native Dependencies)
Section titled “Pure Python/Node (No Native Dependencies)”If your server has no native dependencies, you only need a single build:
jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: NimbleBrainInc/mcpb-pack@v2The bundle will work on any platform with the appropriate runtime installed.
How Platform Selection Works
Section titled “How Platform Selection Works”When a user runs mpak bundle pull or mpak bundle run, the registry selects the best matching bundle:
- Exact match - User’s OS + architecture
- OS match - User’s OS with
anyarchitecture - Architecture match -
anyOS with user’s architecture - Universal -
anyOS +anyarchitecture
For pure Python/Node builds from Ubuntu, the platform is detected as universal (any).
Verifying Platforms
Section titled “Verifying Platforms”Check available platforms for a bundle:
mpak bundle show @yourorg/your-serverVersions: 1.0.0 darwin-arm64, darwin-x64, linux-x64, linux-arm64