Introduction
Claude.ai (chat) official GitHub connector sometimes fails to read private repositories even when authentication is successful (as of July 2026).
While there is information online suggesting it can connect, there are cases where it factually returns a 404 error.
This issue was not resolved even after changing the repository access settings on the GitHub App side.
The workaround was to create my own OAuth App, paste the Client ID / Secret into the detailed settings of Claude's custom connector, and replace the entire authorization foundation.
This article describes how to isolate the cause of the connection failure and the steps for the replacement.
[Terminology]
・Connector: A feature that connects external services to Claude in chat. It can be added from the settings screen
・MCP (Model Context Protocol): The communication standard used by the connector; the connector itself is a connection to an MCP server
・Official GitHub Connector: A pre-installed integration in Claude that connects to an MCP server provided by GitHub. The main culprit that returned the 404 this time
Target Cases
You want to connect Claude chat to GitHub
You want to show your repositories to Claude and have a conversation while having it read the contents
You are already using the GitHub connector, but you are having trouble because you can read public repositories but private repositories return a 404
You have information being pushed to GitHub from Claude Code, and you want to read and write the same way in Claude chat
This is about letting Claude chat (claude.ai / desktop app) read repositories via a connector, not Claude Code (CLI)
[Verification Environment]
・Personal account on claude.ai (Max plan)
・Personal GitHub account
・Repositories not belonging to an organization
・Behavior as of July 2026
Symptoms
The official GitHub connector is already connected and get_me succeeds—meaning authentication is passing
get_file_contents for private repositories results in a 404 Not Found error
When searching for user:me using search_repositories, only public repositories are returned, and not a single private repository is included
The number of public_repos returned by get_me matches the number of search results—meaning not a single private repository is visible
Public repositories can be read normally
Reports of private repositories not being visible or returning 404 errors have been raised multiple times in the Issues of the GitHub MCP server repository (github/github-mcp-server).
-
Access to Private Organization Repositories in GitHub MCP Server #153
Cannot access private organization repositories. One of the most reacted-to issues in this repository (over 80 reactions)
-
Unable to access file via get_file_contents in private repository (404 error) #1285
get_file_contents for private repositories returns 404 (reported in organization + IP allowlist environments)
-
get_file_contents throws MCP error: resource not found #1176
get_file_contents results in resource not found
Although the environments and conditions differ slightly, the common issue is that authentication succeeds but access to private repositories fails.
While I could not find a report with the exact same conditions as my case (personal account x claude.ai connector), the problem where permissions fail somewhere along the authorization path has been reported in multiple environments.
As a premise, GitHub returns 404 (not found) instead of 403 (forbidden) for private repositories.
If it explicitly stated insufficient permissions, the existence of the repository itself would be leaked. It seems GitHub uses 404 consistently to prevent this.
Therefore, a 404 alone cannot distinguish between "the repository does not exist" and "it is not visible from the token."
You can isolate the cause by performing the following.
Compare the number of public_repos from get_me with the count of repositories found by searching user:me using search_repositories. If they match, it means no private repositories are visible.
Run git ls-remote https://github.com/<owner>/<repo> without authentication. As a control experiment, you can check the list of refs for a public repository (like octocat/Hello-World) even anonymously. If only the target repository requires authentication, it confirms that the repository exists and is private.
Once these two conditions are met, I think it is safe to conclude that "the repository exists, authentication is successful, but it is still not visible."
Things I tried that did not work
Everything that someone hitting the same wall would likely try failed completely.
Workarounds that do not use the connector were all unsuccessful.
Changes to the settings of the connector and the GitHub App were also unsuccessful.
Due to the nature of GitHub Apps, it should be able to access the repositories selected during installation, and the settings allow for private repositories. Even so, it does not work.
The root cause has not been identified, and it is unclear whether it is an issue with how GitHub App settings are applied or a limitation in the MCP server implementation.
Workaround: Replace the authorization method with an OAuth App
There are two mechanisms for external app integration with GitHub.
GitHub App: A new method that allows narrowing down access scope by repository, which is what the official connector uses.
OAuth App: A classic method where authorized scopes apply to the entire account, with no option to restrict access to specific repositories.
Regardless of what was happening with the official connector's path, using your own OAuth App as the basis for authorization allows access to all repositories through a different route.
I kept chasing the root cause on the GitHub App side, but it was getting nowhere, so I switched to this method.
Steps
1. Create an OAuth App on GitHubGitHub → Settings → Developer settings → OAuth Apps → New OAuth App
Application name: Any name
Homepage URL: Any URL (it is not verified for reachability)
Authorization callback URL: Paste the following as is
Enable Device Flow: Leave it off (not needed because Claude uses the authorization code flow + PKCE)
1. Click Register application → Client ID is displayed
2. Click Generate a new client secret → Client Secret is generated
The secret is only displayed once immediately after generation, so make sure to note it down at this time.
3. Add a custom connector in ClaudeClaude → Settings → Connectors → Add custom connector
Name: Any name
Remote MCP server URL: Paste the following as is
Advanced settings OAuth Client ID: Client ID from step 2
Advanced settings OAuth Client Secret: Client Secret from step 2
The server URL can remain the official GitHub MCP server.
4. Connect and authorizeOnce connected, you will be redirected to the GitHub authorization screen; please grant permission.
VerificationOnce connected, try having Claude read the contents of a private repository in your conversation.
In this environment, I confirmed that 'get_file_contents' for the private repository, which previously returned a 404, succeeded and allowed me to see the file list in the root directory.
If it still does not work, please try opening a new conversation or logging out of Claude and logging back in.
Points to note
Broad permissionsUnlike GitHub Apps, OAuth Apps cannot be restricted to specific repositories. Therefore, all repositories in your account will be authorized.
You will have to give up on controlling access to only specific repositories with this method.
When no longer needed, revoke it from GitHub → Settings → Applications → Authorized OAuth Apps, or delete the OAuth App entirely.
GitHub OAuth Apps can only have one Authorization callback URL.
If Claude's callback URL migrates to 'claude.com' in the future, you may need to update it.
The OAuth Client ID / Secret field in the custom connector is originally for MCP servers that do not support DCR (Dynamic Client Registration). Since the GitHub MCP server supports DCR, it is usually fine to leave this blank.
What succeeded this time was repurposing this field to 'intentionally replace the authorization entity with your own OAuth App'.
Anthropic's documentation does not explain this field for such purposes, and GitHub's documentation guides you to authorize via a GitHub App.
I found a gap that is not quite covered by either official documentation.
As mentioned earlier, there are multiple reports of similar symptoms in GitHub Issues, but I could not find any information in either Japanese or English suggesting that this replacement would work (as of July 2026). That is also the reason I wrote this article.
Summary
If Claude's official GitHub connector returns a 404 for private repositories, changing the repository access settings on the GitHub App side may not resolve the issue.
Since GitHub is designed to return a 404 for private repositories, you can determine that only private repositories are invisible by having Claude check the number of 'public_repos' and whether it can see an anonymous 'git ls-remote' in the chat.
You can avoid the above issue by pasting your own OAuth App's Client ID / Secret into the custom connector's advanced settings.
Be careful as OAuth Apps have broad permissions covering all repositories; revoke them when no longer needed.
After investigating with Claude Code and Claude chat, searching for articles myself, and trying countless methods to no avail, I thought it might be impossible. However, I suddenly had an idea, tried it, and it worked on the first attempt. It went straight through.
I hope this reaches others stuck at the same 404 error.
Being able to reference and discuss the same repository in both Claude Code and Claude chat is great.
-
Get started with custom connectors using remote MCP | Claude Help Center
This is where the official custom connector guide mentions detailed settings (OAuth Client ID / secret).
-
Creating an OAuth app - GitHub Docs
Official documentation for the OAuth App creation procedure.
-
github/github-mcp-server
The official GitHub MCP server repository. Refer to the links in the body for issues with similar symptoms.