Skip to content

Commit 8bfc9b3

Browse files
authored
fix(release): install the MCPB CLI before packing (#53)
The mcpb job failed on 24 of the 26 repos with a pack:mcpb script. Pack scripts shell out to `npx mcpb pack`, which needs the mcpb CLI on PATH. Only autotask-mcp and blumira-mcp carry @anthropic-ai/mcpb as a dependency; everywhere else npx tried to fetch a package literally named "mcpb" from the public registry: npm error 404 Not Found - GET https://registry.npmjs.org/mcpb The hand-rolled per-repo workflows all ran `npm install -g @anthropic-ai/mcpb` for exactly this reason. This job omitted it because it was validated only against autotask-mcp — one of the two repos where the omission is invisible. Caught live on atera-mcp. npx resolves node_modules/.bin before the global prefix, so a repo that pins its own @anthropic-ai/mcpb version still wins; this is a fallback, not an override. Also corrects a false claim in this file's own comments. They said a pack failure "cannot cascade into skipping the deploy chain" because mcpb needs only `release`. That is true within this workflow and false from the caller's side: a caller invokes this whole file as ONE job, so any failure here fails the caller's `release` job and skips a caller `deploy: needs: release`. Confirmed on atera-mcp — docker, mcp-registry and security all succeeded, mcpb failed, deploy was skipped anyway. A bug in this job is deploy-blocking, and the comments now say so.
1 parent 097afd8 commit 8bfc9b3

2 files changed

Lines changed: 62 additions & 7 deletions

File tree

‎.github/workflows/mcp-server-release.yml‎

Lines changed: 40 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,13 @@ name: MCP Server Release (reusable)
108108
# verify ← unconditional. Runs on push AND pull_request alike.
109109
# release ← push-to-main only, AND needs: [verify].
110110
# docker ← runs only when release.outputs.released == 'true'
111-
# mcpb ← same gate, but deliberately in its OWN job needing only
112-
# `release`. A pack failure must not cascade into skipping
113-
# docker/mcp-registry/security/deploy: the release is already
114-
# tagged and published by then, and a missing bundle is a far
115-
# smaller problem than a missing deploy.
111+
# mcpb ← same gate, in its own job needing only `release`, so a pack
112+
# failure does not stop docker/mcp-registry/security from
113+
# running here. NOTE: that is workflow-internal only. Callers
114+
# invoke this file as ONE job, so any failure here fails the
115+
# caller's `release` job and skips a caller `deploy:
116+
# needs: release`. A pack failure IS deploy-blocking from the
117+
# caller's side — see the note above the mcpb job.
116118
# mcp-registry ← always() ensures its `if:` is evaluated even when docker
117119
# was skipped; then guards on released == 'true' AND
118120
# docker result == 'success'.
@@ -499,8 +501,21 @@ jobs:
499501
500502
# ────────────────────────────────────────────────────────────────────────────
501503
# 3. MCPB bundle → GitHub release asset
502-
# Needs only `release`, never `docker`, so a pack failure cannot cascade
503-
# into skipping the deploy chain (see GATING CONTRACT above).
504+
# Needs only `release`, never `docker`, so a pack failure does not stop
505+
# docker/mcp-registry/security from RUNNING inside this workflow.
506+
#
507+
# IMPORTANT — this does NOT isolate the caller's deploy. A caller invokes
508+
# this whole file as a SINGLE job (`release: uses: …mcp-server-release.yml`),
509+
# so every job here rolls up into that one job's conclusion. Any failure
510+
# inside — including this one — marks the caller's `release` job failed,
511+
# and a caller `deploy: needs: release` is therefore SKIPPED. Observed on
512+
# atera-mcp: docker, mcp-registry and security all succeeded, mcpb failed,
513+
# and deploy was skipped anyway. An earlier revision of this comment
514+
# claimed a pack failure "cannot cascade into skipping the deploy chain";
515+
# that is true within this workflow and false from the caller's side.
516+
#
517+
# So a bug in this job IS deploy-blocking. Keep it boring and keep it
518+
# tested against a repo that does NOT carry @anthropic-ai/mcpb.
504519
# ────────────────────────────────────────────────────────────────────────────
505520
mcpb:
506521
name: Pack and upload MCPB bundle
@@ -560,6 +575,24 @@ jobs:
560575
VERSION: ${{ needs.release.outputs.version }}
561576
run: npm version "$VERSION" --no-git-tag-version --allow-same-version
562577

578+
# Pack scripts shell out to `npx mcpb pack`, which needs the mcpb CLI on
579+
# PATH. Only 2 of the 26 repos with a pack:mcpb script (autotask-mcp,
580+
# blumira-mcp) carry `@anthropic-ai/mcpb` as a dependency; in the other 24
581+
# `npx mcpb` tries to fetch a package literally named "mcpb" from the
582+
# public registry and dies with:
583+
# npm error 404 Not Found - GET https://registry.npmjs.org/mcpb
584+
# The hand-rolled per-repo workflows all ran this global install for
585+
# exactly that reason; this job originally omitted it, having been
586+
# validated only against autotask-mcp — one of the two repos where the
587+
# omission is invisible. Caught live on atera-mcp.
588+
#
589+
# `npx` resolves node_modules/.bin BEFORE the global prefix, so a repo
590+
# that does pin its own @anthropic-ai/mcpb version still wins; this is a
591+
# fallback, not an override.
592+
- name: Install MCPB CLI
593+
if: steps.detect.outputs.supported == 'true'
594+
run: npm install -g @anthropic-ai/mcpb
595+
563596
- name: Pack MCPB bundle
564597
if: steps.detect.outputs.supported == 'true'
565598
run: npm run pack:mcpb

‎CHANGELOG.md‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,28 @@ here. The format is based on
88

99
### Fixed
1010

11+
- **`mcp-server-release.yml`**: the `mcpb` job did not install the MCPB CLI, so
12+
it failed on 24 of the 26 repos with a `pack:mcpb` script. Pack scripts shell
13+
out to `npx mcpb pack`; only `autotask-mcp` and `blumira-mcp` carry
14+
`@anthropic-ai/mcpb` as a dependency, so everywhere else `npx` tried to fetch
15+
a package literally named `mcpb` from the public registry and died with
16+
`npm error 404 Not Found - GET https://registry.npmjs.org/mcpb`. The
17+
hand-rolled per-repo workflows all ran `npm install -g @anthropic-ai/mcpb` for
18+
exactly this reason; the job omitted it because it was validated only against
19+
`autotask-mcp`, one of the two repos where the omission is invisible. Caught
20+
live on `atera-mcp`. `npx` resolves `node_modules/.bin` before the global
21+
prefix, so a repo pinning its own version still wins — this is a fallback,
22+
not an override.
23+
- **Corrected a false claim in this file's own comments.** They stated that
24+
because `mcpb` needs only `release` and never `docker`, a pack failure
25+
"cannot cascade into skipping the deploy chain". That holds *within* this
26+
workflow, but callers invoke the whole file as a **single job**, so every
27+
job here rolls up into one conclusion — any failure marks the caller's
28+
`release` job failed and skips a caller `deploy: needs: release`. Confirmed
29+
on `atera-mcp`: `docker`, `mcp-registry` and `security` all succeeded,
30+
`mcpb` failed, and `deploy` was skipped regardless. A bug in the `mcpb` job
31+
is therefore deploy-blocking, and the comments now say so.
32+
1133
- **`mcp-server-release.yml`**: the digest-verification check tested the wrong
1234
key casing and rejected every legitimate single-platform image. The payload is
1335
a marshalled OCI image config, whose top-level key is lowercase `config` (with

0 commit comments

Comments
 (0)