-
-
Notifications
You must be signed in to change notification settings - Fork 89
feat(mcp): discovery surfaces, registry publish, and the stdio gateway (#9526) #9735
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
6dad0d2
feat(mcp): serve the discovery surfaces and publish server.json
JSONbored 6e1026a
feat(mcp): mount the remote tool set from the stdio server (#9526)
JSONbored 2701ea6
feat(mcp): derive every client-config surface and tag proxied calls (…
JSONbored fbb4023
fix(mcp): pin the publisher binary by checksum and gate the publish j…
JSONbored 8ff3b1b
fix(mcp): forward the caller's arguments through a proxied tool (#9526)
JSONbored 12e2b8e
test(mcp): cover init-client's host and mode guards (#9526)
JSONbored File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| name: Publish MCP Registry | ||
|
|
||
| # Publishes server.json to the official MCP registry (#9526), so `io.github.JSONbored/loopover` is | ||
| # discoverable by any registry-aware client. | ||
| # | ||
| # workflow_dispatch ONLY, and main-only. Publishing announces a version to a public registry, which is not | ||
| # something a branch build or a merge should do on its own -- the version it advertises comes from | ||
| # @loopover/mcp's package.json, which the release automation bumps, so a publish is a deliberate follow-up to | ||
| # a release rather than a side effect of one. | ||
| # | ||
| # ANTI-ROT: the first step re-runs scripts/check-server-manifest.ts, which asserts every watched path still | ||
| # EXISTS before validating any field. metagraphed's version-sync workflow rotted silently for months because | ||
| # it watched a path that had been renamed -- it kept passing while doing nothing at all. A workflow that can | ||
| # quietly watch nothing is worse than no workflow, so this one fails loudly instead. | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| dry_run: | ||
| description: "Validate and print what would be published, without publishing" | ||
| type: boolean | ||
| default: false | ||
|
|
||
| permissions: | ||
| contents: read | ||
| # GitHub OIDC is how mcp-publisher proves this repo owns the io.github.JSONbored/* namespace. No | ||
| # long-lived registry credential exists to leak. | ||
| id-token: write | ||
|
|
||
| concurrency: | ||
| group: publish-mcp-registry | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| publish: | ||
| name: Publish server.json | ||
| runs-on: ubuntu-latest | ||
| # A deployment environment, so the one job in this repo that holds `id-token: write` and writes to a | ||
| # public registry can carry protection rules (required reviewers, a wait timer) configured outside the | ||
| # workflow file. Without it, anyone who can dispatch a workflow can publish. | ||
| environment: mcp-registry | ||
| # Belt and braces alongside the dispatch-only trigger: a dispatch can name any ref, and a registry | ||
| # publish must only ever describe what is on main. | ||
| if: github.ref == 'refs/heads/main' | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
|
|
||
| - name: Setup Node | ||
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7 | ||
| with: | ||
| node-version-file: .nvmrc | ||
|
|
||
| # Runs BEFORE anything else: a manifest whose version disagrees with the shipped package, or a watched | ||
| # path that has been renamed away, must stop the publish rather than announce something untrue. | ||
| - name: Validate server.json and its watched paths | ||
| run: node --experimental-strip-types scripts/check-server-manifest.ts | ||
|
|
||
| - name: Install mcp-publisher | ||
| env: | ||
| MCP_PUBLISHER_VERSION: v1.8.0 | ||
| # The tag is mutable; this is not. A release tag can be moved to point at a different commit, and | ||
| # this binary authenticates as this repository and writes to a public registry -- so the download | ||
| # is checked against the exact bytes reviewed here, and a mismatch fails the job rather than | ||
| # publishing under a binary nobody looked at. | ||
| MCP_PUBLISHER_SHA256: 1370446bbe74d562608e8005a6ccce02d146a661fbd78674e11cc70b9618d6cf | ||
| run: | | ||
| set -euo pipefail | ||
| curl -fsSL "https://github.com/modelcontextprotocol/registry/releases/download/${MCP_PUBLISHER_VERSION}/mcp-publisher_linux_amd64.tar.gz" -o mcp-publisher.tar.gz | ||
| echo "${MCP_PUBLISHER_SHA256} mcp-publisher.tar.gz" | sha256sum --check --strict - | ||
| tar -xzf mcp-publisher.tar.gz mcp-publisher | ||
| chmod +x mcp-publisher | ||
|
|
||
| - name: Login via GitHub OIDC | ||
| run: ./mcp-publisher login github-oidc | ||
|
|
||
| - name: Publish | ||
| if: ${{ !inputs.dry_run }} | ||
| run: ./mcp-publisher publish | ||
|
|
||
| - name: Dry run — report what would be published | ||
| if: ${{ inputs.dry_run }} | ||
| run: | | ||
| echo "DRY RUN: server.json validated and OIDC login succeeded; publish skipped." | ||
| cat server.json | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.