diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 97d4c7f..7d360b9 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -147,3 +147,49 @@ jobs: GITHUB_TOKEN: ${{ github.token }} run: | gh release upload ${{github.event.release.tag_name}} ./extension/playwright-mcp-extension-${{ steps.get-version.outputs.version }}.zip + + publish-release-mcp-registry: + if: github.event_name == 'workflow_dispatch' + runs-on: ubuntu-latest + environment: allow-mcp-registry-publishing + permissions: + contents: read + id-token: write # Needed for GitHub OIDC authentication + steps: + - uses: actions/checkout@v5 + - name: Clone MCP Registry and build publisher tool + shell: pwsh + run: | + cd ${{ runner.temp }} + + # Install Microsoft Go + go run github.com/microsoft/go-infra/goinstallscript@v1.1.0 + ./go-install.ps1 -GitHubActionsPath + + # Enable compliant crypto + $env:GOEXPERIMENT = "systemcrypto" + + # Clone and build the publisher tool + git clone --branch "v1.3.7" https://github.com/modelcontextprotocol/registry + cd registry + go build -o ${{ runner.temp }}/mcp-publisher ./cmd/publisher + + # show help for the tool to ensure it's working + ${{ runner.temp }}/mcp-publisher --help + - name: Azure Login via OIDC + uses: azure/login@v2 + with: + client-id: ${{ secrets.AZURE_MCP_REGISTRY_CLIENT_ID }} + tenant-id: ${{ secrets.AZURE_MCP_REGISTRY_TENANT_ID }} + subscription-id: ${{ secrets.AZURE_MCP_REGISTRY_SUBSCRIPTION_ID }} + - name: Publish to the MCP Registry + shell: pwsh + run: | + # log in using Key Vault + ${{ runner.temp }}/mcp-publisher ` + login dns azure-key-vault ` + -vault "${{ secrets.KV_NAME }}" -key "${{ secrets.KV_KEY_NAME }}" ` + -domain microsoft.com + + # publish the server.json + ${{ runner.temp }}/mcp-publisher publish ./.mcp/server.json diff --git a/.mcp/server.json b/.mcp/server.json new file mode 100644 index 0000000..57401c2 --- /dev/null +++ b/.mcp/server.json @@ -0,0 +1,22 @@ +{ + "$schema": "https://static.modelcontextprotocol.io/schemas/2025-10-17/server.schema.json", + "name": "com.microsoft/playwright-mcp", + "title": "Playwright", + "description": "Automate web browsers using accessibility trees for testing and data extraction.", + "repository": { + "url": "https://github.com/microsoft/playwright-mcp", + "source": "github" + }, + "websiteUrl": "https://github.com/microsoft/playwright-mcp", + "version": "0.0.46", + "packages": [ + { + "registryType": "npm", + "identifier": "@playwright/mcp", + "version": "0.0.46", + "transport": { + "type": "stdio" + } + } + ] +} \ No newline at end of file diff --git a/package.json b/package.json index 2e2a305..948cb80 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "name": "@playwright/mcp", "version": "0.0.47", "description": "Playwright Tools for MCP", + "mcpName": "com.microsoft/playwright-mcp", "repository": { "type": "git", "url": "git+https://github.com/microsoft/playwright-mcp.git"