-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Add MCP Registry publish workflow #1129
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 8 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
c04f40d
Add publish script and formed server file
MattBabbage b632d56
Fix url and fix script
MattBabbage 5802130
Set version to 0.0.0 initially
MattBabbage dccbde3
remove uncessary script
MattBabbage c3c10cd
remove unnecessary ignore
MattBabbage e6bc1d7
Remove whitespace
MattBabbage 22740ce
Apply suggestion from @Copilot
MattBabbage 94a4937
Add registry publisher workflow
MattBabbage 7362950
Merge branch 'main' into matt/publish-to-mcp-registry
MattBabbage 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,49 @@ | ||
| name: Publish to MCP Registry | ||
|
|
||
| on: | ||
| push: | ||
| tags: ["v*"] # Triggers on version tags like v1.0.0 | ||
| workflow_dispatch: # Allow manual triggering | ||
|
|
||
| jobs: | ||
| publish: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| id-token: write # Required for OIDC authentication | ||
| contents: read | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v5 | ||
|
|
||
| - name: Install jq | ||
| run: sudo apt-get update && sudo apt-get install -y jq | ||
|
|
||
| - name: Install MCP Publisher | ||
| run: | | ||
| curl -L "https://github.com/modelcontextprotocol/registry/releases/download/v1.0.0/mcp-publisher_1.0.0_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz" | tar xz mcp-publisher | ||
| - name: Update server.json version | ||
| run: | | ||
| if [[ "${{ github.ref_type }}" == "tag" ]]; then | ||
| # Use the tag that triggered the workflow | ||
| TAG_VERSION=$(echo "${{ github.ref_name }}" | sed 's/^v//') | ||
| echo "Using triggered tag: ${{ github.ref_name }}" | ||
| else | ||
| # Fallback to latest tag (for manual triggers) | ||
| LATEST_TAG=$(git tag --sort=-version:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+(-.*)?$' | head -n 1) | ||
| if [ -z "$LATEST_TAG" ]; then | ||
| echo "❌ No release tag found. Cannot determine version." | ||
| exit 1 | ||
| fi | ||
| TAG_VERSION=$(echo "$LATEST_TAG" | sed 's/^v//') | ||
| echo "Using latest tag: $LATEST_TAG" | ||
| fi | ||
| jq ".version = \"$TAG_VERSION\" | .packages[].version = \"$TAG_VERSION\"" server.json > server.json.tmp && mv server.json.tmp server.json | ||
| echo "Updated server.json version to $TAG_VERSION" | ||
| - name: Login to MCP Registry | ||
| run: ./mcp-publisher login github-oidc | ||
|
|
||
| - name: Publish to MCP Registry | ||
| run: ./mcp-publisher publish |
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,72 @@ | ||
| { | ||
| "$schema": "https://static.modelcontextprotocol.io/schemas/2025-09-16/server.schema.json", | ||
| "name": "io.github.github/github-mcp-server", | ||
| "description": "Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.", | ||
| "status": "active", | ||
| "repository": { | ||
| "url": "https://github.com/github/github-mcp-server", | ||
| "source": "github" | ||
| }, | ||
| "version": "0.0.0", | ||
| "packages": [ | ||
| { | ||
| "registryType": "oci", | ||
| "registryBaseUrl": "https://ghcr.io", | ||
| "identifier": "ghcr.io/github/github-mcp-server", | ||
| "version": "0.0.0", | ||
| "runtimeHint": "docker", | ||
| "transport": { | ||
| "type": "stdio" | ||
| }, | ||
| "runtimeArguments": [ | ||
| { | ||
| "type": "positional", | ||
| "value": "run", | ||
| "description": "The runtime command to execute" | ||
| }, | ||
| { | ||
| "type": "named", | ||
| "name": "-i", | ||
| "description": "Run container in interactive mode" | ||
| }, | ||
| { | ||
| "type": "named", | ||
| "name": "--rm", | ||
| "description": "Automatically remove the container when it exits" | ||
| }, | ||
| { | ||
| "type": "named", | ||
| "name": "-e", | ||
| "description": "Set an environment variable in the runtime" | ||
| }, | ||
| { | ||
| "type": "positional", | ||
| "valueHint": "env_var_name", | ||
| "value": "GITHUB_PERSONAL_ACCESS_TOKEN", | ||
| "description": "Environment variable name" | ||
| }, | ||
| { | ||
| "type": "positional", | ||
| "valueHint": "image_name", | ||
| "value": "ghcr.io/github/github-mcp-server", | ||
| "description": "The container image to run" | ||
| } | ||
| ], | ||
| "environmentVariables": [ | ||
| { | ||
| "description": "Your GitHub personal access token with appropriate scopes.", | ||
| "isRequired": true, | ||
| "format": "string", | ||
| "isSecret": true, | ||
| "name": "GITHUB_PERSONAL_ACCESS_TOKEN" | ||
| } | ||
| ] | ||
| } | ||
| ], | ||
| "remotes": [ | ||
| { | ||
| "type": "streamable-http", | ||
| "url": "https://api.githubcopilot.com/mcp/" | ||
| } | ||
| ] | ||
| } | ||
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.
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 runtime arguments structure is confusing. The '-e' flag and 'GITHUB_PERSONAL_ACCESS_TOKEN' are defined as separate arguments, but Docker's '-e' flag expects the format '-e VARIABLE_NAME=value'. Consider restructuring this to reflect the actual Docker command structure.