Skip to content

Not able to publish Server from Github Org #398

Closed

Description

@Kylejeong2

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:

  1. 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.

Activity

  1. added
    bug
    on Sep 9, 2025
  2. strickvl commented on Sep 9, 2025

    @strickvl

    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"}
    
  3. strickvl commented on Sep 9, 2025

    @strickvl

    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.

  4. MatthewDailey commented on Sep 9, 2025

    @MatthewDailey

    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 #399

  5. Kylejeong2 commented on Sep 9, 2025

    @Kylejeong2
    Author

    Was this a work around? Or how did you publish the org server?

  6. strickvl commented on Sep 9, 2025

    @strickvl

    The main README says:

    "to publish io.github.domdomegg/my-cool-mcp you must log in as domdomegg or publish from a GitHub Action in domdomegg’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.

  7. MatthewDailey commented on Sep 9, 2025

    @MatthewDailey

    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?

  8. strickvl commented on Sep 9, 2025

    @strickvl
  9. zhongweili commented on Sep 10, 2025

    @zhongweili

    I can publish my org server using GitHub Actions by following instruction.

  10. added 2 commits that reference this issue on Sep 10, 2025
    120c4e6
    1236f37
  11. domdomegg commented on Sep 10, 2025

    @domdomegg
    Member

    @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

  12. Kylejeong2 commented on Sep 14, 2025

    @Kylejeong2
    Author

    It works now! This has been fully resolved.

  13. ossamalafhel commented on Sep 14, 2025

    @ossamalafhel
    Contributor

    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!

  14. joakimriedel commented on Nov 17, 2025

    @joakimriedel

    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.

  15. domdomegg commented on Nov 17, 2025

    @domdomegg
    Member

    @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.

  16. claude commented on Nov 17, 2025

    @claude
    Contributor

    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

    • Set up development environment and understand codebase structure
    • Find where permission error messages are generated in the code
    • Locate the specific GitHub org permission validation logic
    • Modify error message to include helpful hint about making org membership public
    • Test the changes and run any available linters
    • Commit and push changes
    • 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:

    1. Detect when a user is trying to publish to a GitHub organization namespace (starts with io.github.)
    2. Check if they have personal GitHub permissions but not org permissions
    3. Extract the organization name from the attempted resource
    4. 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.

  17. domdomegg commented on Nov 17, 2025

    @domdomegg
    Member

    @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.

  18. claude commented on Nov 17, 2025

    @claude
    Contributor

    Claude Code is working…

    I'll analyze this and get back to you.

    View job run

  19. added a commit that references this issue on Nov 17, 2025
    09c9fd6
  20. added a commit that references this issue on Nov 17, 2025
    e7de754
  21. added a commit that references this issue on Nov 20, 2025
    685215c
  22. scenicstay commented on Aug 16, 2026

    @scenicstay

    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./*"). Publishing under the personal namespace works fine throughout.

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions