Not able to publish Server from Github Org
Describe the bug A clear and concise description of what the bug is.
You're unable to publish a server that is connected to an org, only a server that is connected to a local server.
To Reproduce Steps to reproduce the behavior:
- With a github repo that is connected to an org, try to publish the server using mcp-publisher publish.
Expected behavior A clear and concise description of what you expected to happen.
You should be able to publish a server that is public if it is on an org that you are in. In my case its https://github.com/browserbase/mcp-server-browserbase.
Logs If applicable, add logs to help explain your problem.
Additional context Add any other context about the problem here.
Yes I get the same and I see the error:
Error: publish failed: server returned status 403: {"title":"Forbidden","status":403,"detail":"You do not have permission to publish this server"}
I thought maybe it was something where the org's owner was required to run the mcp-publisher publish command, but my company's org owner tried and we got the same error message.
I was ostensibly able to publish for my org server (i am the owner) BUT now can't curl the server. Opened a separate ticket but tagging here since it could be org related too https://github.com/modelcontextprotocol/registry/issues/399
Was this a work around? Or how did you publish the org server?
The main README says:
"to publish
io.github.domdomegg/my-cool-mcpyou must log in asdomdomeggor publish from a GitHub Action indomdomegg’s repositories"
That's a detail which should probably be in the Publish Server docs page, but if that's the case then I need to set up the publication as a GH action instead of trying to publish via the CLI.
I just followed the instructions and it seemed to work. I was looking to see if there were any difference between my server.json and yours but looks like you haven't pushed it yet. I also don't see it at https://www.npmjs.com/package/@browserbasehq/mcp-server-browserbase?activeTab=code I wonder if that's relevant?
Our server.json file lives here https://github.com/zenml-io/mcp-zenml/blob/main/server.json FWIW, in case you want another to compare to.
Hmm just a thought - my org repo was a personal repo (https://github.com/MatthewDailey/ref-tools-mcp) that migrated into an org (https://github.com/ref-tools/ref-tools-mcp) a while back
I can publish my org server using GitHub Actions by following instruction.
@Kylejeong2 / @strickvl I've made some tweaks to the API which should show the permissions better (#417). Are you able to try again and share the updated error message?
I think it might be to do with the visibility of your org membership - if you'd be open to setting this to public that might help us narrow this down: https://docs.github.com/articles/publicizing-or-hiding-organization-membership
It works now! This has been fully resolved.
Hi @domdomegg,
I came across this project and wanted to help by fixing some reported bugs.
I saw that PR #417 improved the error messages (which definitely helps!), but the root issue seemed to persist. Looking at the code, I found it uses /users/{username}/orgs which only returns public organizations. I submitted PR #475 to change it to /user/orgs, thinking it might help.
But I'm new to this project and could be missing something:
- Is there a reason for using the public-only endpoint?
- Would this change break something I'm not aware of?
Just trying to help where I can, but I understand if this isn't the right approach. Happy to learn from your feedback!
Thanks!
Just got bit by this, changed my org membership visibility to Public and got the publishing to work, but it was hard to find this GitHub issue to understand why the publishing would fail. I think something could be improved here, docs or implementation.
Publishing to https://registry.modelcontextprotocol.io...
Error: publish failed: server returned status 403: {"title":"Forbidden","status":403,"detail":"You do not have
permission to publish this server. You have permission to publish: io.github.joakimriedel/*. Attempting to publish:
io.github.propstreet/<package>"}
in this error message, a clue to "make your membership of the propstreet org public" or something would have helped.
@claude are you able to implement the suggested change above to that error message - e.g. hinting that users may need to make their membership of an org public so that the MCP registry can see it. Open a PR for this.
Claude finished @domdomegg's task —— View job • claude/issue-398-20251117-1159 • Create PR ➔
I've successfully improved the error message to include a helpful hint about making GitHub organization membership public. ✅
Todo List
- [x] Set up development environment and understand codebase structure
- [x] Find where permission error messages are generated in the code
- [x] Locate the specific GitHub org permission validation logic
- [x] Modify error message to include helpful hint about making org membership public
- [x] Test the changes and run any available linters
- [x] Commit and push changes
- [x] Create pull request
Analysis and Implementation Details
Root Cause: The issue was in /internal/api/handlers/v0/auth/github_at.go line 139, where the code uses /users/{username}/orgs which only returns public organizations. When users have private organization membership, their org won't appear in this list, so they can't get publish permissions for that org.
Solution: I've enhanced the buildPermissionErrorMessage function in /internal/api/handlers/v0/publish.go to:
- Detect when a user is trying to publish to a GitHub organization namespace (starts with
io.github.) - Check if they have personal GitHub permissions but not org permissions
- Extract the organization name from the attempted resource
- Add a helpful hint about making org membership public
Example Error Message:
You do not have permission to publish this server. You have permission to publish: io.github.johndoe/*. Attempting to publish: io.github.propstreet/my-package. If you're trying to publish to a GitHub organization, you may need to make your membership of the 'propstreet' organization public in your GitHub settings
Testing: Created and ran a unit test to verify the error message includes the helpful hint when expected. The build compiles successfully and the logic works as intended.
@claude are you able to implement the suggested change above to the validation - e.g. using other GitHub APIs to get the user's private org memberships.
Adding a data point since this is still biting people: confirmed org membership public via three separate GitHub API checks (orgs/{org}/public_members/{user} -> 204, orgs/{org}/memberships/{user} -> role=admin/state=active, users/{user}/orgs -> lists the org), then attempted mcp-publisher publish under io.github.<Org>/* six times over several hours, including a full mcp-publisher logout + fresh device-flow login each time. Every attempt returned the identical 403 ("You have permission to publish: io.github.
This suggests whatever permission check runs at publish time either caches per-user (not re-evaluated on new logins) or isn't picking up membership visibility changes at all, rather than a short propagation delay — happy to share more detail (org name, timestamps) if useful for debugging.