-
Notifications
You must be signed in to change notification settings - Fork 358
Add GitHub Container Registry (GHCR) support for MCP servers #439
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
tadasant
merged 9 commits into
modelcontextprotocol:main
from
Gaurav-Gosain:feature/add-ghcr-support
Sep 17, 2025
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
38f360d
Add GitHub Container Registry (GHCR) support for MCP servers
Gaurav-Gosain ee58cb1
Refactor OCI validation to reduce cyclomatic complexity
Gaurav-Gosain 0b0e20d
Fix GHCR authentication and add real image tests
Gaurav-Gosain 4b70180
Add comprehensive documentation for GHCR testing scenarios
Gaurav-Gosain 0fc871c
Fix documentation: clarify that both Docker Hub and GHCR require auth…
Gaurav-Gosain 889093e
Fix TODO comment in OCI tests
Gaurav-Gosain 45d1b40
Refactor OCI tests to match main branch structure
Gaurav-Gosain 58ec9ce
Fix GHCR AuthURL to use ghcrAPIBaseURL constant
Gaurav-Gosain 9a9783f
Improve rate limiting vs empty manifest handling in OCI validation
Gaurav-Gosain 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
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.
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.
is version here means image tag?
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.
btw, any changes to github action approach? can github action approach been automatic?
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.
Hi @SamYuan1990, yes
version
here refers to the imagetag
. The existing Docker Hub implementation also referred to it asversion
so wanted to keep it consistent and not introduce any breaking changes.I have not looked at the GitHub actions tbh, do you have any suggestions?
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.
I suppose Github action doc can be updated, but fully support with automation seems other story.
https://github.com/modelcontextprotocol/registry/blob/main/docs/guides/publishing/github-actions.md
I suppose maybe we can ask LLM to see if we can just use some github action default env values. as $repo or something? to build the json file.
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.
Don't understand your question.
Is it for how to make the yaml file to publish on ghcr? Have a look at the repo readme, they clearly outline what's required.
For an example, look here: https://github.com/nkapila6/mcp-local-rag/blob/main/.github%2Fworkflows%2Fpublish-image.yml#L31
Uh oh!
There was an error while loading. Please reload this page.
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.
ref https://docs.github.com/en/actions/reference/workflows-and-actions/variables
follow show me the code
the json file seems to be:
Note for container version your can figure out from $GITHUB_REF or hardcode.
I hope my understand is correct as $GITHUB_ACTION_REPOSITORY in Github action is repo name, and identifier is your container package name which same as your repo name?
so... when we using github action to build and upload a container into ghcr.... we can one step further as how to generate this json file from github action env. (maybe a shell script?)