From 8d4266e34fe8c18004668d5ed83b165c51cec759 Mon Sep 17 00:00:00 2001 From: gagik Date: Fri, 24 Oct 2025 10:55:36 +0200 Subject: [PATCH 1/4] chore: add a temporary OIDC-based registry publish workflow --- .github/workflows/publish.yml | 15 ---------- .github/workflows/registry-publish.yml | 38 ++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 15 deletions(-) create mode 100644 .github/workflows/registry-publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8cbbda6f..fc17f0fe 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -80,11 +80,6 @@ jobs: if: needs.check.outputs.VERSION_EXISTS == 'false' steps: - uses: GitHubSecurityLab/actions-permissions/monitor@v1 - - uses: mongodb-js/devtools-shared/actions/setup-bot-token@main - id: app-token - with: - app-id: ${{ vars.DEVTOOLS_BOT_APP_ID }} - private-key: ${{ secrets.DEVTOOLS_BOT_PRIVATE_KEY }} - uses: actions/checkout@v5 - uses: actions/setup-node@v6 with: @@ -106,13 +101,3 @@ jobs: GH_TOKEN: ${{ github.token }} run: | gh release create ${{ needs.check.outputs.VERSION }} --title "${{ needs.check.outputs.VERSION }}" --generate-notes --target ${{ github.sha }} ${{ (needs.check.outputs.RELEASE_CHANNEL != 'latest' && '--prerelease') || ''}} - - - name: Install MCP Publisher - run: | - curl -L "https://github.com/modelcontextprotocol/registry/releases/latest/download/mcp-publisher_$(uname%20-s%20|%20tr'[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz" | tar xz mcp-publisher - - - name: Login to MCP Registry - run: ./mcp-publisher login github --token ${{ steps.app-token.outputs.token }} - - - name: Publish to MCP Registry - run: ./mcp-publisher publish diff --git a/.github/workflows/registry-publish.yml b/.github/workflows/registry-publish.yml new file mode 100644 index 00000000..da85aa09 --- /dev/null +++ b/.github/workflows/registry-publish.yml @@ -0,0 +1,38 @@ +--- +name: Publish to MCP Registry +on: + workflow_dispatch: + +jobs: + publish: + runs-on: ubuntu-latest + environment: Production + permissions: + contents: write + id-token: write + needs: + - check + if: needs.check.outputs.VERSION_EXISTS == 'false' + steps: + - uses: GitHubSecurityLab/actions-permissions/monitor@v1 + - uses: actions/checkout@v5 + - uses: actions/setup-node@v6 + with: + node-version-file: package.json + registry-url: "https://registry.npmjs.org/" + cache: "npm" + + - name: Build package + run: | + npm ci + npm run build + + - name: Install MCP Publisher + run: | + curl -L "https://github.com/modelcontextprotocol/registry/releases/latest/download/mcp-publisher_$(uname%20-s%20|%20tr'[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz" | tar xz mcp-publisher + + - name: Login to MCP Registry + run: ./mcp-publisher login github-oidc + + - name: Publish to MCP Registry + run: ./mcp-publisher publish From e6d9d8139d2196b71bc37e2e5f2a9357b5c4ada6 Mon Sep 17 00:00:00 2001 From: gagik Date: Fri, 24 Oct 2025 11:34:58 +0200 Subject: [PATCH 2/4] chore: remove build step --- .github/workflows/registry-publish.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/workflows/registry-publish.yml b/.github/workflows/registry-publish.yml index da85aa09..ed17dead 100644 --- a/.github/workflows/registry-publish.yml +++ b/.github/workflows/registry-publish.yml @@ -16,16 +16,6 @@ jobs: steps: - uses: GitHubSecurityLab/actions-permissions/monitor@v1 - uses: actions/checkout@v5 - - uses: actions/setup-node@v6 - with: - node-version-file: package.json - registry-url: "https://registry.npmjs.org/" - cache: "npm" - - - name: Build package - run: | - npm ci - npm run build - name: Install MCP Publisher run: | From 166da3b948c1fe6d22ff814408d8a33209d15131 Mon Sep 17 00:00:00 2001 From: gagik Date: Fri, 24 Oct 2025 11:46:20 +0200 Subject: [PATCH 3/4] chore: fix the registry publish workflow --- .github/workflows/registry-publish.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/registry-publish.yml b/.github/workflows/registry-publish.yml index ed17dead..50424f83 100644 --- a/.github/workflows/registry-publish.yml +++ b/.github/workflows/registry-publish.yml @@ -10,9 +10,6 @@ jobs: permissions: contents: write id-token: write - needs: - - check - if: needs.check.outputs.VERSION_EXISTS == 'false' steps: - uses: GitHubSecurityLab/actions-permissions/monitor@v1 - uses: actions/checkout@v5 From 588475640ec570bc6b3eea1280dafddc14268d91 Mon Sep 17 00:00:00 2001 From: gagik Date: Fri, 24 Oct 2025 12:16:19 +0200 Subject: [PATCH 4/4] chore: remove version from server.json for registry publishing --- scripts/generateArguments.ts | 9 +++++---- server.json | 3 +-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/generateArguments.ts b/scripts/generateArguments.ts index a5a4c64d..6107d995 100644 --- a/scripts/generateArguments.ts +++ b/scripts/generateArguments.ts @@ -178,7 +178,7 @@ function updateServerJsonEnvVars(envVars: EnvironmentVariable[]): void { version?: string; packages: { registryType?: string; - identifier?: string; + identifier: string; environmentVariables: EnvironmentVariable[]; packageArguments?: unknown[]; version?: string; @@ -209,12 +209,13 @@ function updateServerJsonEnvVars(envVars: EnvironmentVariable[]): void { for (const pkg of serverJson.packages) { pkg.environmentVariables = envVarsArray as EnvironmentVariable[]; pkg.packageArguments = packageArguments; - pkg.version = version; - // Update OCI identifier version tag if this is an OCI package - if (pkg.registryType === "oci" && pkg.identifier) { + // For OCI packages, update the version tag in the identifier and not a version field + if (pkg.registryType === "oci") { // Replace the version tag in the OCI identifier (e.g., docker.io/mongodb/mongodb-mcp-server:1.0.0) pkg.identifier = pkg.identifier.replace(/:[^:]+$/, `:${version}`); + } else { + pkg.version = version; } } } diff --git a/server.json b/server.json index 6c7718c2..bb6cef1c 100644 --- a/server.json +++ b/server.json @@ -637,8 +637,7 @@ "description": "API key for Voyage AI embeddings service (required for vector search operations with text-to-embedding conversion).", "isRequired": false } - ], - "version": "1.2.0" + ] } ] }