ci: auto-publish to MCP Registry on release via GitHub OIDC#70
Conversation
Add a reusable publish-registry.yml (workflow_call) that runs `mcp-publisher publish` authenticated with GitHub OIDC, invoked by both auto_release.yml and manual_release.yml after deploy. Keeps the official MCP Registry entry in sync with every release — no more manual interactive `mcp-publisher login` + publish. - Pin mcp-publisher to v1.2.3 - Check out the release tag so the version-bumped server.json is published - Guard: fail if server.json version != release version - No new secrets — the registry authorizes io.github.<owner>/* from the OIDC token's repo owner; runs after deploy so the GHCR image exists - Document the auto-publish path + no-secret OIDC in DEPLOY.md 🤖 Generated with [Claude Code](https://claude.ai/code) https://claude.ai/code/session_01WkYCgRpXKdxHU9QKJPuF2w
|
Warning Review limit reached
More reviews will be available in 53 minutes and 36 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR introduces automated publishing to the MCP Registry by adding a new reusable ChangesMCP Registry Publishing Integration
🎯 2 (Simple) | ⏱️ ~10 minutes
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/publish-registry.yml (1)
47-48: ⚡ Quick winAdd a timeout to the publish step.
Without a timeout, if
mcp-publisher publishhangs (network issues, API errors), the workflow will run until the job-level timeout (default 360 minutes). Adding a step-level timeout improves resilience.⏱️ Proposed fix
- name: Publish to MCP Registry + timeout-minutes: 5 run: ./mcp-publisher publish🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/publish-registry.yml around lines 47 - 48, The "Publish to MCP Registry" step currently runs "./mcp-publisher publish" with no step-level timeout; add a step-level timeout by adding the GitHub Actions step property `timeout-minutes` to the step named "Publish to MCP Registry" (the step that runs `./mcp-publisher publish`) with an appropriate value (e.g. 10–30 minutes) so the workflow fails the step if the command hangs.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/publish-registry.yml:
- Around line 23-29: Add the security hardening to the actions/checkout step by
setting persist-credentials: false on the existing actions/checkout@v6
invocation (the block containing ref: v${{ inputs.version }}), so the checkout
does not persist the GITHUB_TOKEN to the working directory; update the checkout
step configuration to include that option alongside the existing ref setting.
---
Nitpick comments:
In @.github/workflows/publish-registry.yml:
- Around line 47-48: The "Publish to MCP Registry" step currently runs
"./mcp-publisher publish" with no step-level timeout; add a step-level timeout
by adding the GitHub Actions step property `timeout-minutes` to the step named
"Publish to MCP Registry" (the step that runs `./mcp-publisher publish`) with an
appropriate value (e.g. 10–30 minutes) so the workflow fails the step if the
command hangs.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: ee259808-57dd-454b-9479-6a9ab67ff52b
📒 Files selected for processing (4)
.github/workflows/auto_release.yml.github/workflows/manual_release.yml.github/workflows/publish-registry.ymlDEPLOY.md
v1.2.3 was a stale pin — verified locally that it predates and rejects
server.json's 2025-12-11 $schema ("deprecated schema detected"), and it
used the old versioned asset name. v1.7.0 (latest, built 2026-04-25)
parses server.json cleanly and `login github-oidc` honors the
ACTIONS_ID_TOKEN_REQUEST_* vars (audience=mcp-registry) that id-token:
write injects.
The release asset dropped its version segment at v1.3.0, so the install
URL is now mcp-publisher_linux_amd64.tar.gz.
Also addresses CodeRabbit review:
- persist-credentials: false on checkout (publish reads server.json only)
- timeout-minutes: 5 on the publish step (guard against a hung publish)
🤖 Generated with [Claude Code](https://claude.ai/code)
https://claude.ai/code/session_01WkYCgRpXKdxHU9QKJPuF2w
What
Adds automated publishing to the official MCP Registry on every release, replacing the manual interactive
mcp-publisher login+publishstep.A new reusable workflow
publish-registry.yml(workflow_call) runsmcp-publisher publishauthenticated with GitHub OIDC, and is invoked by both release paths (auto_release.ymlandmanual_release.yml) as apublish-registryjob that runs afterdeploy(so the GHCR image referenced inserver.jsonalready exists).Why
Registry publishing was a manual local step, so it got skipped — the live registry entry is stale at v0.15.4 while
server.jsonis at 0.15.9. This keeps the registry in sync with every release automatically. The next release will close the staleness gap in one shot.How it works
io.github.<owner>/*namespace from the OIDC token's repo owner. Since the repo isaliasunder/vault-cortexand the server isio.github.aliasunder/vault-cortex, publishing is authorized with zero secrets — nothing to rotate. (A fork publishing under its ownio.github.<user>/...works out of the box too.)v${version}— the bumped commit is tagged beforedeploy/publish run in both paths (auto_releaseis triggered by the tag;manual_releasepushes the tag inbump-and-tag), so the version-matchedserver.jsonis what gets published.server.json.version≠ the release version, catching any stale-checkout drift before it reaches the registry.mcp-publisherpinned to v1.2.3 (matching the repo's gitleaks-pinning convention).Changes
.github/workflows/publish-registry.ymlauto_release.yml,manual_release.yml— add thepublish-registryjobDEPLOY.md— document the auto-publish path + no-secret OIDCNo
srcchanges, noserver.jsonchanges, no new secrets, no test impact.Verification
mcp-publisher login github-oidcis the OIDC auth method;publishreadsserver.jsonfrom cwd.server.json(passes at 0.15.9, rejects a mismatch).publish-registryjob will OIDC-auth and publish, surfacing the current version on the live registry.Generated by Claude Code
Summary by CodeRabbit
Chores
Documentation