Skip to content

Automate packkit-mcp publishing everywhere#10

Merged
DanMat merged 1 commit into
mainfrom
ci/mcp-publish-everywhere
Jul 21, 2026
Merged

Automate packkit-mcp publishing everywhere#10
DanMat merged 1 commit into
mainfrom
ci/mcp-publish-everywhere

Conversation

@DanMat

@DanMat DanMat commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Follow-up to #9, which documented the release process. This automates it.

release.yml published packkit-mcp to npm and stopped there. Everything after that — server.json, the official MCP registry entry, the version the server advertises over MCP, and the create-packkit pin in mcp/package-lock.json — was manual, so it drifted.

What changed

scripts/sync-mcp-version.mjs (also npm run sync:mcp) rewrites server.json and mcp/server.js from mcp/package.json, and exits non-zero if mcpName and server.json's name disagree. That mismatch is case-sensitive and already cost us a burnt npm version — a published version can't be overwritten, so 0.1.2 had to be abandoned for 0.1.3.

Official MCP registry publish via mcp-publisher login github-oidc. No new secrets — the workflow already had id-token: write. Gated on the npm publish step actually publishing, because the registry verifies ownership by fetching the npm package and rejects a version that isn't up yet.

Lockfile refresh. packkit-mcp pins create-packkit by caret, so npx -y packkit-mcp already resolves the newest core and doesn't need a republish per release. But mcp/package-lock.json was pinning 2.7.0 against a latest of 2.7.2, and builds that run npm ciGlama's hosted build — install what the lockfile says. That was the actual staleness, so the workflow now refreshes and pushes the lockfile after publishing, rather than bumping the package version every release.

mcp/RELEASING.md is updated to match: only Glama's Build & Release stays manual, since its public API is read-only.

Testing

sync-mcp-version.mjs was exercised against a simulated 0.1.4 bump (correctly rewrote server.json's two version fields and mcp/server.js), against an intentional mcpName mismatch (exit 1 with an explanatory message), and confirmed idempotent on the current tree. release.yml validated as YAML.

🤖 Generated with Claude Code

The release workflow published packkit-mcp to npm but stopped there, so
server.json, the official MCP registry entry and the version the server
reports over MCP all had to be updated by hand — and quietly drifted.

- scripts/sync-mcp-version.mjs rewrites server.json + mcp/server.js from
  mcp/package.json, and fails loudly if mcpName and server.json's name
  disagree (that mismatch cost us a burnt npm version).
- Publish to the official registry via mcp-publisher's GitHub OIDC login,
  so no new secrets. Gated on the npm publish actually happening, since
  the registry verifies ownership by fetching the npm package.
- Refresh mcp/package-lock.json against the just-published create-packkit.
  npx users get the newest core via the caret, but `npm ci` builds —
  Glama's — install what the lockfile pins, which is the real staleness.

Only Glama's Build & Release stays manual; its API is read-only.
Documented the whole chain, and its gotchas, in mcp/RELEASING.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@DanMat
DanMat merged commit 1cad8cf into main Jul 21, 2026
4 checks passed
@DanMat
DanMat deleted the ci/mcp-publish-everywhere branch July 21, 2026 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant