-
-
Notifications
You must be signed in to change notification settings - Fork 71
feat(mcp): publish server.json to the official MCP registry on release #545
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -181,3 +181,42 @@ jobs: | |
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: gh release edit "$GITHUB_REF_NAME" --repo "$GITHUB_REPOSITORY" --draft=false --verify-tag | ||
|
|
||
| publish-mcp: | ||
| name: Publish to MCP Registry | ||
| runs-on: ubuntu-latest | ||
| # Registry verification pulls the versioned Docker Hub image, so the tag must exist first | ||
| needs: docker-promote | ||
| # Best-effort: a registry outage must not fail the release | ||
| continue-on-error: true | ||
| permissions: | ||
| id-token: write # GitHub OIDC grants the io.github.enterpilot/* namespace | ||
| contents: read | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v7 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
|
Comment on lines
+196
to
+200
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win Pin GitHub Actions to a commit hash and disable credential persistence. As per static analysis hints (zizmor), the checkout action is not pinned to a hash (violating blanket policy). Additionally, credential persistence should be disabled when not needed ( Note: 🔒 Proposed fix - name: Checkout
- uses: actions/checkout@v7
+ uses: actions/checkout@<commit-hash>
+ with:
+ persist-credentials: false🧰 Tools🪛 zizmor (1.26.1)[warning] 194-195: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false (artipacked) [error] 195-195: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy) (unpinned-uses) 🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||
| - name: Install mcp-publisher | ||
| env: | ||
| PUBLISHER_VERSION: v1.8.0 | ||
| PUBLISHER_SHA256: 1370446bbe74d562608e8005a6ccce02d146a661fbd78674e11cc70b9618d6cf | ||
| run: | | ||
| curl -fsSL -o mcp-publisher.tar.gz "https://github.com/modelcontextprotocol/registry/releases/download/${PUBLISHER_VERSION}/mcp-publisher_linux_amd64.tar.gz" | ||
| echo "${PUBLISHER_SHA256} mcp-publisher.tar.gz" | sha256sum -c - | ||
| tar xzf mcp-publisher.tar.gz mcp-publisher | ||
|
|
||
| - name: Set release version in server.json | ||
| shell: bash | ||
| run: | | ||
| version="${GITHUB_REF_NAME#v}" | ||
| jq --arg v "$version" \ | ||
| '.version = $v | .packages[0].identifier = "docker.io/enterpilot/gomodel:" + $v' \ | ||
| server.json > server.json.tmp && mv server.json.tmp server.json | ||
|
|
||
| - name: Authenticate to MCP Registry | ||
| run: ./mcp-publisher login github-oidc | ||
|
|
||
| - name: Publish server to MCP Registry | ||
| run: ./mcp-publisher publish | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| { | ||
| "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json", | ||
| "name": "io.github.enterpilot/gomodel", | ||
| "title": "GoModel", | ||
| "description": "Self-hosted gateway aggregating upstream MCP servers behind one authenticated HTTP endpoint.", | ||
| "repository": { | ||
| "url": "https://github.com/ENTERPILOT/GoModel", | ||
| "source": "github" | ||
| }, | ||
| "version": "0.1.52", | ||
| "packages": [ | ||
| { | ||
| "registryType": "oci", | ||
| "identifier": "docker.io/enterpilot/gomodel:0.1.52", | ||
| "runtimeHint": "docker", | ||
| "transport": { | ||
| "type": "streamable-http", | ||
| "url": "http://localhost:8080/mcp" | ||
| }, | ||
| "environmentVariables": [ | ||
| { | ||
| "name": "GOMODEL_MASTER_KEY", | ||
| "description": "Gateway API key clients authenticate with; unset runs the gateway in unsafe (no-auth) mode.", | ||
| "isRequired": false, | ||
| "isSecret": true | ||
| }, | ||
| { | ||
| "name": "MCP_SERVERS", | ||
| "description": "JSON object of upstream MCP servers to aggregate, e.g. {\"github\":{\"url\":\"https://api.githubcopilot.com/mcp/\",\"headers\":{\"Authorization\":\"Bearer ${GITHUB_PAT}\"}}}. Servers can also be declared in config.yaml or the admin dashboard.", | ||
| "isRequired": false | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The release notes say MCP registry failures should not block the release, but this job has
needs: docker-promoteand nocontinue-on-error, so any registry outage, OIDC failure, schema validation error, ormcp-publisherfailure marks the whole release workflow failed after Docker promotion. Add job-levelcontinue-on-error: trueif this publish step is intended to be best-effort.Context Used: AGENTS.md (source)