diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2f68eb5a5..bf205eacc 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -67,6 +67,46 @@ jobs: - run: npm run ctest - run: npm publish + publish-mcp-release-registry: + if: github.event_name == 'release' + needs: publish-mcp-release-npm + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write # Required for GitHub OIDC auth to the MCP Registry + steps: + - uses: actions/checkout@v5 + + - name: Validate server.json version matches package.json + run: | + node -e " + const pkg = require('./package.json'); + const server = require('./server.json'); + const mismatches = []; + if (server.version !== pkg.version) + mismatches.push(\`server.version=\${server.version} != package.version=\${pkg.version}\`); + for (const p of server.packages) { + if (p.version !== pkg.version) + mismatches.push(\`packages[\${p.identifier}].version=\${p.version} != package.version=\${pkg.version}\`); + } + if (mismatches.length) { + console.error('server.json is out of sync with package.json:'); + for (const m of mismatches) console.error(' ' + m); + process.exit(1); + } + " + + - name: Install mcp-publisher + run: | + curl -L "https://github.com/modelcontextprotocol/registry/releases/latest/download/mcp-publisher_linux_amd64.tar.gz" \ + | tar xz mcp-publisher + + - name: Authenticate with MCP Registry (GitHub OIDC) + run: ./mcp-publisher login github-oidc + + - name: Publish to MCP Registry + run: ./mcp-publisher publish + publish-mcp-release-docker: if: github.event_name == 'release' runs-on: ubuntu-latest diff --git a/server.json b/server.json new file mode 100644 index 000000000..de31dd8e6 --- /dev/null +++ b/server.json @@ -0,0 +1,29 @@ +{ + "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json", + "name": "io.github.microsoft/playwright-mcp", + "description": "Playwright Tools for MCP", + "repository": { + "url": "https://github.com/microsoft/playwright-mcp", + "source": "github" + }, + "version": "0.0.71", + "packages": [ + { + "registryType": "npm", + "identifier": "@playwright/mcp", + "version": "0.0.71", + "transport": { + "type": "stdio" + } + }, + { + "registryType": "oci", + "registryBaseUrl": "https://playwright.azurecr.io", + "identifier": "public/playwright/mcp", + "version": "0.0.71", + "transport": { + "type": "stdio" + } + } + ] +}