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..50424f83 --- /dev/null +++ b/.github/workflows/registry-publish.yml @@ -0,0 +1,25 @@ +--- +name: Publish to MCP Registry +on: + workflow_dispatch: + +jobs: + publish: + runs-on: ubuntu-latest + environment: Production + permissions: + contents: write + id-token: write + steps: + - uses: GitHubSecurityLab/actions-permissions/monitor@v1 + - uses: actions/checkout@v5 + + - 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 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" + ] } ] }