Skip to content

Publish to MCP Registry #7

Publish to MCP Registry

Publish to MCP Registry #7

name: Publish to MCP Registry
on:
workflow_call:
workflow_dispatch:
inputs:
dry_run:
description: 'Run in dry-run mode (install and login only, no publishing)'
required: false
type: boolean
permissions:
id-token: write
contents: read
jobs:
publish-mcp-registry:
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/mcp-server
steps:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
ref: main
- name: Install mcp-publisher
run: |
curl -L "https://github.com/modelcontextprotocol/registry/releases/latest/download/mcp-publisher_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz" | tar xz mcp-publisher
- name: Authenticate to MCP Registry
run: ./mcp-publisher login github-oidc
- name: Wait for npm registry propagation
if: ${{ inputs.dry_run != true }}
run: sleep 120
- name: Publish server to MCP Registry
if: ${{ inputs.dry_run != true }}
run: ./mcp-publisher publish