ci: publish each release to the MCP Registry - #170
Merged
Merged
Conversation
The MCP Registry still lists io.github.neuledge/context at 0.2.3 because server.json was never bumped and nothing published it, so registry clients install a months-old version. Add an `mcp-registry` job after `release`, gated like "Tag releases" (changesets' `published` output never turns true with `pnpm -r publish`). It publishes only when the registry lacks packages/context's version, so no-op pushes skip and a failed publish is retried by the next push. It installs a pinned, checksum-verified mcp-publisher v1.8.1, stamps the version into server.json, waits for npm to serve that version (the registry checks its mcpName), then logs in with github-oidc and publishes. Being its own job, a registry failure stays visible without failing the npm release. Also bump the checked-in server.json to 1.2.9. The $schema URL (2025-12-11) is still the current one in mcp-publisher v1.8.1. Follows https://github.com/modelcontextprotocol/registry/blob/main/docs/modelcontextprotocol-io/github-actions.mdx Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UX3uvgjRrv9uYuZxKjNF4o
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before: the official MCP Registry lists
io.github.neuledge/contextat 0.2.3, published 2026-02-09 and marked latest, while npm is at 1.2.9. Clients that install from the MCP Registry get a version from February. Nothing in CI publishesserver.json, which still says 0.2.3.After: every release that reaches npm is also published to the MCP Registry, at the same version.
How: a new
mcp-registryjob in release.yml runs afterrelease, behind the samehasChangesets == 'false'gate as "Tag releases". It asks the registry whether it already has the package.json version and stops if it does, so pushes that release nothing are no-ops and a failed publish is retried by the next push. Otherwise it installs mcp-publisher v1.8.1 (sha256-checked), writes the version into server.json with jq, waits until npm serves that version, and runsmcp-publisher login github-oidcandpublish. GitHub OIDC grantsio.github.neuledge/*, so no secret is stored. It's a separate job, so a registry failure shows up without failing the npm release.server.jsonin the repo is also bumped to 1.2.9. Followed https://github.com/modelcontextprotocol/registry/blob/main/docs/modelcontextprotocol-io/github-actions.mdx.Merging this publishes 1.2.9 to the MCP Registry on the release run that follows.
Validated: YAML parses, actionlint passes,
mcp-publisher validateaccepts server.json, andpnpm lintpasses.🤖 Generated with Claude Code
https://claude.ai/code/session_01UX3uvgjRrv9uYuZxKjNF4o
Generated by Claude Code