-
Notifications
You must be signed in to change notification settings - Fork 456
docs: Add optional GitHub Actions workflow step to show last registration #563
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
base: main
Are you sure you want to change the base?
Conversation
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.
Thanks for filing this and sorry for the slow reply.
I think the idea is good 👍 I've left a few simple comments as the API had changed recently and it would be better to use it instead of searching.
| if: always() | ||
| run: | | ||
| # Show last registered version | ||
| curl -s -X GET "https://registry.modelcontextprotocol.io/v0/servers?search=<<your server name>>" \ |
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 think it's better to use something like curl -s -f "https://registry.modelcontextprotocol.io/v0/servers/${SERVER_NAME}/versions/latest"
| ```yaml | ||
| - name: Show MCP registration | ||
| shell: bash | ||
| if: always() |
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.
It might be better for this to be success() instead?
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 report will always show the last registered version, so a visual check can show if the correct (latest) version actually got registered.
| - name: Show MCP registration | ||
| shell: bash | ||
| if: always() | ||
| run: | | ||
| # Show last registered version | ||
| curl -s -X GET "https://registry.modelcontextprotocol.io/v0/servers?search=<<your server name>>" \ | ||
| -H "accept: application/json" | \ | ||
| jq '.servers[0] | {name, version, _meta}' > output.json | ||
| echo '```json' >> $GITHUB_STEP_SUMMARY | ||
| cat output.json >> $GITHUB_STEP_SUMMARY | ||
| echo '```' >> $GITHUB_STEP_SUMMARY |
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'm unclear on the purpose of this enhancement. If it is to display the published metadata, why not just cat server.json?
Could you elaborate on your use case?
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.
This confirms that that last submitted version of the MCP server was actually registered in the registry, and gets the metadata for that registration.
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.
But it's just being logged, not actually confirmed, right? A human would have to visually inspect the summary and compare it to the version that's in the server.json file.
More importantly though, if registration fails, I would expect the build to fail before it reaches this point (e.g., fail at the "Publish to MCP Registry" step). Have you observed cases where that wasn't true?
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 build would fail at the point where the registration failed, and the failure would be reported. This is just the status report that shows at the bottom of the GitHub Actions workflow, and acts as an additional information/ debugging step. It is nothing to do with the functionality of registering the server.json per se. We would want the report to show irrespective of whether the registration (and the build) failed or succeeded.
Add a step to the GitHub Actions workflow to show the results of the publish operation.
Motivation and Context
It shows the success of the publish operation with the id of the registration on the MCP Server Registry.
How Has This Been Tested?
By publish my own MCP Server with this workflow step included.
Breaking Changes
No.
Types of changes
Checklist
Additional context
None.