publish-mcp-registry.yml•2.1 kB
name: Publish to MCP Registry
on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
version:
description: 'Version to publish (e.g., v1.1.2)'
required: true
type: string
permissions:
contents: read
id-token: write
jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm run test:offline
- name: Build package
run: npm run build
- name: Publish to NPM
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
publish-registry:
needs: publish-npm
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install MCP Publisher CLI
run: |
curl -L "https://github.com/modelcontextprotocol/registry/releases/download/v1.2.3/mcp-publisher_1.2.3_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz" | tar xz
chmod +x mcp-publisher
- name: Validate server.json
run: |
curl -s -o /tmp/server.schema.json https://static.modelcontextprotocol.io/schemas/2025-09-29/server.schema.json
npx ajv-cli validate \
-s /tmp/server.schema.json \
-d server.json \
--strict=false
- name: Authenticate with GitHub OIDC
run: ./mcp-publisher login github-oidc
- name: Publish to MCP Registry
run: ./mcp-publisher publish
- name: Verify publication
run: |
echo "Server published to MCP Registry!"
echo "Name: io.github.kesslerio/attio-mcp-server"
echo "Version: ${{ github.ref_name }}"