Skip to content

Commit 009aa92

Browse files
authored
Add step for publishing to MCP Registry (#1197)
This adds a new step for the `release` event to publish to the Official MCP Registry. Summary of changes: - Add `server.json` which is the MCP Server manifest - Used metadata from the GH MCP Registry - Used the name `com.microsoft/playwright-mcp` - Add `publish-release-mcp-registry` job that runs manually - Install Microsoft Go for compliant Go crypto - Log in to Azure for Key Vault access - Publish to the MCP Registry in the `microsoft.com` namespace. - Add `mcpName` to the `package.json` which the MCP Registry validates. The publishing requires some secret variables: - `AZURE_MCP_REGISTRY_CLIENT_ID` - service principal client ID (app ID) with Get Key and Sign access to a Key Vault - `AZURE_MCP_REGISTRY_TENANT_ID` - tenant ID for the service principal (should be a production tenant) - `AZURE_MCP_REGISTRY_SUBSCRIPTION_ID` - Azure subscription ID holding the Key Vault - `KV_NAME` - the Key Vault name, e.g. `mykeyvault` - `KV_KEY_NAME` - the name of a Key in the Key Vault, needs to be ECDSA P-384. I can provide internal documentation for how to set up the service principal (managed identity is easiest), vault, and key as well as registering the key so it can be used for the `microsoft.com` namespace. **Note:** after the new job is proven to work as expected, we can switch it to automatically running after the `publish-release-npm` job on the `release` event.
1 parent c016643 commit 009aa92

3 files changed

Lines changed: 69 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,3 +147,49 @@ jobs:
147147
GITHUB_TOKEN: ${{ github.token }}
148148
run: |
149149
gh release upload ${{github.event.release.tag_name}} ./extension/playwright-mcp-extension-${{ steps.get-version.outputs.version }}.zip
150+
151+
publish-release-mcp-registry:
152+
if: github.event_name == 'workflow_dispatch'
153+
runs-on: ubuntu-latest
154+
environment: allow-mcp-registry-publishing
155+
permissions:
156+
contents: read
157+
id-token: write # Needed for GitHub OIDC authentication
158+
steps:
159+
- uses: actions/checkout@v5
160+
- name: Clone MCP Registry and build publisher tool
161+
shell: pwsh
162+
run: |
163+
cd ${{ runner.temp }}
164+
165+
# Install Microsoft Go
166+
go run github.com/microsoft/go-infra/goinstallscript@v1.1.0
167+
./go-install.ps1 -GitHubActionsPath
168+
169+
# Enable compliant crypto
170+
$env:GOEXPERIMENT = "systemcrypto"
171+
172+
# Clone and build the publisher tool
173+
git clone --branch "v1.3.7" https://github.com/modelcontextprotocol/registry
174+
cd registry
175+
go build -o ${{ runner.temp }}/mcp-publisher ./cmd/publisher
176+
177+
# show help for the tool to ensure it's working
178+
${{ runner.temp }}/mcp-publisher --help
179+
- name: Azure Login via OIDC
180+
uses: azure/login@v2
181+
with:
182+
client-id: ${{ secrets.AZURE_MCP_REGISTRY_CLIENT_ID }}
183+
tenant-id: ${{ secrets.AZURE_MCP_REGISTRY_TENANT_ID }}
184+
subscription-id: ${{ secrets.AZURE_MCP_REGISTRY_SUBSCRIPTION_ID }}
185+
- name: Publish to the MCP Registry
186+
shell: pwsh
187+
run: |
188+
# log in using Key Vault
189+
${{ runner.temp }}/mcp-publisher `
190+
login dns azure-key-vault `
191+
-vault "${{ secrets.KV_NAME }}" -key "${{ secrets.KV_KEY_NAME }}" `
192+
-domain microsoft.com
193+
194+
# publish the server.json
195+
${{ runner.temp }}/mcp-publisher publish ./.mcp/server.json

.mcp/server.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-10-17/server.schema.json",
3+
"name": "com.microsoft/playwright-mcp",
4+
"title": "Playwright",
5+
"description": "Automate web browsers using accessibility trees for testing and data extraction.",
6+
"repository": {
7+
"url": "https://github.com/microsoft/playwright-mcp",
8+
"source": "github"
9+
},
10+
"websiteUrl": "https://github.com/microsoft/playwright-mcp",
11+
"version": "0.0.46",
12+
"packages": [
13+
{
14+
"registryType": "npm",
15+
"identifier": "@playwright/mcp",
16+
"version": "0.0.46",
17+
"transport": {
18+
"type": "stdio"
19+
}
20+
}
21+
]
22+
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "@playwright/mcp",
33
"version": "0.0.47",
44
"description": "Playwright Tools for MCP",
5+
"mcpName": "com.microsoft/playwright-mcp",
56
"repository": {
67
"type": "git",
78
"url": "git+https://github.com/microsoft/playwright-mcp.git"

0 commit comments

Comments
 (0)