Skip to content

ci: fix publish pipeline — automate npm + repair MCP Registry auth#46

Merged
Shahinyanm merged 2 commits into
masterfrom
fix/publish-pipeline
Jun 12, 2026
Merged

ci: fix publish pipeline — automate npm + repair MCP Registry auth#46
Shahinyanm merged 2 commits into
masterfrom
fix/publish-pipeline

Conversation

@Shahinyanm

Copy link
Copy Markdown
Member

Problem

publish-mcp.yml has failed on every tag since v0.45.0:

hint: token storage moved to ~/.config/mcp-publisher/. ... please re-login.
Error: not authenticated, run 'mcp-publisher login <method>' first

The step called mcp-publisher publish --github-oidc, but modern mcp-publisher split auth out of publish — you must mcp-publisher login github-oidc first. On top of that, server.json was frozen at 0.19.2, so even a working publish would have shipped a stale version. And npm publish was fully manual, so the MCP Registry (which validates the referenced npm version exists) had nothing to point at for new versions.

Fix

Rewrote the workflow into two ordered jobs on a v* tag (+ workflow_dispatch for manual re-runs):

  1. npmnpm ci, verify the tag matches package.json version, then npm publish --access public using secrets.NPM_TOKEN.
  2. mcp (needs: npm) — sync server.json (version + packages[].version) to the tag, mcp-publisher login github-oidc, then mcp-publisher publish.

Also bumped committed server.json 0.19.2 → 0.45.1.

mcpName in package.json already matches the server.json name, so the Registry's npm-ownership check passes once the npm version is live (hence npm-before-mcp ordering).

Action required before this works

Add a repo secret NPM_TOKEN — an npm automation token with publish rights for token-pilot. Without it the npm job fails at publish.

Validation

  • Workflow YAML parses.
  • server.json sync snippet tested locally → 0.45.1 in both fields.
  • Tag-vs-package.json check verified against the current 0.45.1.

🤖 Generated with Claude Code

shahinyanm and others added 2 commits June 11, 2026 21:30
The publish-mcp workflow failed on every tag since v0.45.0 with
"not authenticated, run 'mcp-publisher login' first": the modern
mcp-publisher splits auth from publish, but the step still called the
removed `publish --github-oidc` flag. server.json was also frozen at
0.19.2, so even a successful publish would have shipped a stale version.

- Split into two ordered jobs: `npm` (publish to npmjs) then `mcp`
  (publish to the MCP Registry, which validates the npm version exists).
- npm job verifies the tag matches package.json before publishing,
  uses NODE_AUTH_TOKEN from the NPM_TOKEN secret.
- mcp job syncs server.json (top + packages[].version) to the tag,
  runs `mcp-publisher login github-oidc`, then `publish`.
- Add workflow_dispatch for manual re-runs.
- Bump committed server.json 0.19.2 -> 0.45.1.

Requires repo secret NPM_TOKEN (npm automation token with publish rights).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Shahinyanm Shahinyanm merged commit 53dc03d into master Jun 12, 2026
2 checks passed
@Shahinyanm Shahinyanm deleted the fix/publish-pipeline branch June 12, 2026 04: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