-
Notifications
You must be signed in to change notification settings - Fork 670
Access to Private Organization Repositories in GitHub MCP Server #153
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
Comments
@adamklepacz you can already use the server with private repos that belong to orgs. You just need to make sure that:
|
How do I get access to those private repos under my company org? I'm generating PAT using my GitHub account. I'm a member of my company organization, but still I don't see the company repos through MCP. Should I ask company to generate a member PAT token for me instead? |
Does your organization use SSO? Sometimes after generating a PAT you also need to give it specific access to restricted orgs. |
I also failed fine-grained PAT with full (read-only) permisson. and it worked after change to classic token. what should I request my organization? 😅 |
I did everything with my PAT from my company's organization account but I couldn't use github MCP properly. |
I also tried a fine-grained PAT and a classic PAT, gave both all of the permissions, and I still cannot list issues under my private repo under my organization.
What's interesting is that claude sees that the organization exists, and search_repositories even succeeds in finding my private repo. But list_issues fails with 404.
And this query:
|
I also faced this issue with the fine grained token. Our org uses SSO, so I had to switch to the Classic tokens which support enabling SSO. However, I still faced issues initially with the scopes I enabled in the beginning. Then I realized, it seems we need to check the top level |
@adamklepacz I successfully made it work by using a fine-grained personal access token with "Resource Owner" pointing to my company's organization. |
@thiagoscodelerae I tried setting up in both ways Classic tokens / Fine grained PAT and gave all permissions , still facing the same issue . |
@saivarsha17 do you know if your organization allows API/Git access through PAT? See settings below: ![]() ![]() Also, if you are using docker to run the MCP server, did you restart the server after adding the generated PAT? This is required to get the environment variable GITHUB_PERSONAL_ACCESS_TOKEN correctly:
|
I think this is more of a discussion and possible documentation gap, so I have removed the bug label. As @thiagoscodelerae has shared, orgs can have different rules for PATs, and you can selected different permissions when creating them too (which may well block certain actions as intended), and then there are also issues like SSO and other considerations like your individual access level for various repositories, so I think largely this is case of auth working as GitHub intends, and it sometimes causes confusion for end users - but it's not really in the scope of the MCP server to fix, and you would find the same issues calling the API directly with the same tokens. |
@thiagoscodelerae Yes , my organization allows access through PAT . And also I'm using node package instead of docker . But still i restarted after updating the token . Still facing the same issue (MPC -32603: Authentication Failed: Bad credentials) |
Access to Private Organization Repositories in GitHub MCP Server
Describe the feature or problem you'd like to solve
Currently, GitHub MCP Server lacks the ability to access private repositories that belong to organizations where a user is a member. This is a significant limitation for professional developers who primarily work with company repositories.
A clear and concise description of what the feature or problem is:
As professional developers, the majority of our work happens in private repositories owned by our employers or client organizations. Without access to these organization-owned private repositories, GitHub MCP Server's functionality is severely limited for enterprise users and professional developers. We need a way to securely access and work with private repositories within organizations we belong to, just as we can with personal repositories.
Proposed solution
Extend GitHub MCP Server's capabilities to support authentication and access to private repositories owned by organizations where the user has appropriate permissions. This should include:
How will it benefit GitHub MCP Server and its users?
This enhancement would dramatically increase MCP Server's utility for professional developers and enterprise users. Most professional development work happens in private organizational repositories, not personal ones. By enabling access to these repositories, MCP Server would become a viable tool for daily professional use rather than just for personal projects.
Benefits include:
Additional context
Most professional developers spend 90%+ of their working time on company repositories. Without organization repository access, MCP Server is effectively unavailable for our main development activities. This creates a significant gap between the tool's potential and its current practical utility.
This feature would transform MCP Server from a tool that's primarily useful for personal projects to one that can be integrated into professional development workflows, greatly expanding its relevance and impact in the development community.
The text was updated successfully, but these errors were encountered: