On this page
We have all tried the obvious way to connect Claude.ai or ChatGPT to a private GitHub repo: the built-in GitHub integration. Claude's copies the files you pick into the chat and hits token limits on a real codebase, and ChatGPT's reads files one at a time. A remote MCP server answers from an index of the whole repo instead.
| Option | Private repos | Whole repo or picked files | Stays current | Works in |
|---|---|---|---|---|
| Claude GitHub integration | Yes, through Claude's GitHub App | Files you pick, copied into context | Manual sync (Sync button) | Claude.ai chats and Projects |
| ChatGPT GitHub app (directory) | Yes | Searches and reads files on demand | Reads live from GitHub | ChatGPT, plan-dependent |
| GitMCP | No, public only | Docs files (README, llms.txt) plus on-demand search | Live | Any MCP client |
| GitHub's official MCP server | Yes, with a token | Raw files, issues and PRs through the API | Live | Any MCP client |
| Hosted codebase index over MCP (e.g. repowise) | Yes, read-only GitHub App | Whole repo, pre-indexed: graph, docs, history | Re-indexed on every push | Claude.ai, Claude Desktop, Claude Code, ChatGPT, Cursor, VS Code |
Scroll the table sideways to see every column.
Below, I go through why the first option stops working on large repos and what each of the others gives the model, and then the setup steps for Claude.ai and ChatGPT.
We build repowise, so weigh our entry accordingly. The measurements we publish about it, with their methods, are on the benchmarks page.
Why the built-in GitHub connector runs out of room
Claude's GitHub integration is upfront about how it works. In a chat or a Project you click "+", choose "Add from GitHub", and pick files and folders in a file browser, and those files become part of the conversation. Anthropic's own help article tells you to "avoid selecting unnecessary files to keep within token limits", and the files only update when you click the Sync button. It brings over current file contents, without commit history or pull requests.
That design is fine for a small library or one folder of a bigger project. The question people usually want to ask is something like "where does a checkout request get its tax rate from?", and to answer it the model needs to know which of 3,000 files are involved. The integration can only tell it by copying them in, so you end up guessing which folders matter, which was the exact question you wanted the model to answer.
ChatGPT's GitHub app pulls code, READMEs and docs live from your repositories when a question needs them, so there is no manual sync. OpenAI notes that its availability varies by plan and by experience (Deep Research and agent mode can have it when the standard chat doesn't). It still reads raw files one at a time, so a question that spans many modules spends most of its effort finding the right files before it can answer.
Underneath both, a chat model can only reason about text inside its context window. Anything you want it to know has to be placed there, either by you up front or by a tool on request. File pickers do the first, and MCP does the second.
What MCP changes
MCP (Model Context Protocol) is a standard way for a chat app to call tools on another server. You give Claude or ChatGPT the address of a server, and the model calls that server's tools when a question needs them, so nobody has to paste files in. Our MCP primer has the longer explanation.
For a private repo, what matters is what the server does when the model calls it. There are three kinds:
- GitHub's official MCP server reads files, issues and pull requests through the GitHub API. It is good for actions (open an issue, read a PR) and for questions where you already know the file. For "how does this work?" questions, the model still searches and reads file by file, and each file it reads costs context.
- GitMCP turns a GitHub URL into an MCP server that reads
llms.txt,llms-full.txt, the README and other docs, and it can search the code. It is free and quick to try, and its homepage says it works with "any public GitHub repository", so a private repo is out. - A pre-indexed server parses the repo ahead of time into a dependency graph, documentation pages, git history and search embeddings. The model asks "give me an overview", "what depends on this file" or "find code about tax rates", and gets back a short, structured answer made from those parts. Of the three, it is the only kind that gives a whole-repo view of a large codebase without filling the context window.
The catch with a pre-indexed server is where it runs, because Claude.ai and ChatGPT run on someone else's servers and cannot reach an MCP server on your laptop. That is why we host repowise's index at https://api.repowise.dev/mcp/{owner}/{repo}: it parses the code into a graph, reads the git history, writes a page per module, and serves all of that over MCP.
Step 1: index the repo
The repo has to be indexed first, whichever chat app you use.
- Sign in at repowise.dev with GitHub.
- For a public repo, paste its URL. This works on the free plan.
- For a private repo, you need Pro. Install the repowise GitHub App (read-only) on the account or org that owns the repo, and pick the repo from your dashboard.
- Wait for the first index. After that, every push re-indexes within about 30 seconds, so answers follow the code.
After indexing, repowise keeps documentation pages, the dependency graph, git metadata like hotspots and ownership, decision records, health findings and search embeddings. The clone itself is deleted at the end of every run. The full list, and which features call a model, is on the data handling page.
Step 2a: connect Claude.ai (web, desktop and mobile)
Claude.ai calls these "custom connectors". According to Anthropic's help center, they are available on Free, Pro, Max, Team and Enterprise, with Free limited to one custom connector. Claude connects over OAuth, so there is no API key to copy.
-
In Claude.ai, open Customize > Connectors.
-
Click + Add, then Add custom connector.
-
Name it (for example,
repowise acme/billing-api) and paste the server URL:texthttps://api.repowise.dev/mcp/OWNER/REPO -
Click Continue, leave authentication on sign-in, and click Add.
-
A repowise sign-in window opens. Approve access.
On Team and Enterprise, an owner first adds the connector under Organization settings > Connectors, and then each member connects with their own sign-in. Access stays per person, so someone who can't see the repo on repowise doesn't get answers from it.
To use the connector in a chat, click "+" at the bottom left of the message box, open Connectors, and make sure the repowise connector is on. The same connector then works in Claude Desktop and the mobile apps, because it lives on your account and not on one device.
Step 2b: connect ChatGPT
ChatGPT's support for custom MCP servers has changed several times since developer mode launched in September 2025, so check this section against OpenAI's help article "Developer mode and MCP apps in ChatGPT" before you start. As of October 2026, that article lists full custom MCP apps for Business and Enterprise/Edu workspaces on ChatGPT web. On Plus and Pro, developer mode allows read-only custom MCP apps, which is all repowise needs; we have only verified the Business path. We have not yet run a full question from ChatGPT through to a repowise answer ourselves, so treat the steps below as the documented route and not yet a tested one.
On a Business or Enterprise workspace:
-
A workspace admin or owner opens Workspace settings > Apps > Create. (On Enterprise/Edu, developer mode is switched on under Settings > Apps > Advanced settings.)
-
Enter a name, a short description, and the server URL:
texthttps://api.repowise.dev/mcp/OWNER/REPO -
Choose OAuth as the authentication method and save.
-
ChatGPT scans the server and lists its tools. The repowise tools you'll see by default only read, which matters because write actions on custom apps are still limited on several plans.
-
Publish the app to the workspace, or keep it to yourself while testing.
-
In a chat, open the tools menu, pick the repowise app, and ask your question. The first call opens a repowise sign-in window.
Step 3: check that it is really using the index
Ask something the model cannot know without calling the server:
What are the current hotspot files in this repo, and who owns them?
A working connection calls get_overview or get_risk and answers with real file names, churn and owners. If the model answers in general terms, or says it can't see the repo, the connector is off for that chat. In Claude, check the Connectors toggle under "+". In ChatGPT, check that the app is selected in the tools menu.
These questions show what a pre-indexed server can answer that a file picker struggles with:
- "Give me a tour of this codebase. Where are the entry points?"
- "What breaks if I change
src/billing/tax.py?" - "Why does the payments module use a queue instead of calling the provider directly?" (answered from decision records and commit history, when they exist)
- "Which exports in this repo does nothing import?"
Limits of this setup
These limits decide whether this is the right setup for you, so I'd read them before installing anything.
- The chat model can explain the code and point at files, but it won't open a pull request. For edits, use a coding agent like Claude Code or Cursor against the same MCP address.
- Answers are only as fresh as the last index. On Pro the repo re-indexes on every push, but a question asked mid-push can see the previous commit, and every response says which commit it describes.
- Model features send excerpts to a model provider. The graph, git analysis, health and dead-code tools don't call a model. AI-written docs and
get_answerdo, and on hosted repowise those calls go to OpenAI or Google Gemini through our business accounts. If code can't leave your network at all, run the open-source version on your own machine:repowise initwrites the MCP config for Claude Code and Cursor, and nothing leaves the laptop, though Claude.ai and ChatGPT can't reach it there. - ChatGPT's plan rules change often. If your plan doesn't allow custom apps, Claude.ai's custom connectors work on every tier, so they are the fallback.
How we tested
On 6 October 2026 we checked Anthropic's help articles for the GitHub integration and for custom connectors, OpenAI's help center and developer docs for developer mode and MCP apps, GitMCP's homepage, and the repowise connection docs. The Claude.ai steps match the current menu names. The ChatGPT steps follow OpenAI's documented path for Business workspaces, and because OpenAI renames these menus often, the menu names above are the ones we saw on that date. We didn't measure token use for this post. For measured numbers on what a pre-indexed MCP server changes in an agent loop, see our benchmarks page.
At no point in this setup do you have to guess which folders matter, which was the question we all opened the file picker with.
FAQ
Can Claude.ai read my whole private GitHub repo?
Not through the built-in GitHub integration on a large repo. It copies the files you pick into the conversation, and Anthropic advises picking only what you need to stay within token limits. Through a remote MCP server that has indexed the repo, Claude can ask about any part of it on demand, because only the answers enter the context and the files stay on the server.
Does the Claude GitHub connector have a token limit?
Yes, indirectly, because selected files count against the conversation's context window, the same as pasted text. Anthropic doesn't publish a separate file or size cap for the integration, but its help article tells you to avoid unnecessary files "to keep within token limits", and you have to click the Sync button to pick up new commits.
Does GitMCP work with private repos?
GitMCP doesn't support private repos; its homepage says it works with any public GitHub repository. For a private repo you need a server that can authenticate to GitHub, such as GitHub's own MCP server with a personal access token, or a hosted index that reads the repo through a GitHub App.
Can ChatGPT connect to an MCP server for my GitHub codebase?
Yes, on plans that allow custom MCP apps. As of October 2026, OpenAI's help center lists them for Business and Enterprise/Edu workspaces, created under Workspace settings > Apps > Create with the server URL and OAuth. On Plus and Pro, developer mode allows read-only custom MCP apps, which is all repowise needs. We have only verified the Business path, so check your plan's settings first.
How do I add a custom connector for a codebase in Claude.ai?
Open Customize > Connectors, click + Add, then Add custom connector, paste the MCP server URL (for repowise, `https://api.repowise.dev/mcp/OWNER/REPO`), and sign in when prompted. Free accounts can add one custom connector, and paid plans can add more.
Is it safe to connect a private repo this way?
It depends on where the index lives. A hosted index stores derived data (docs, graph, git metadata, embeddings) and deletes the raw clone, and features that call a model send excerpts to that model's provider. If your code can't leave your network, self-host the index. Your chat app then has to be a local agent like Claude Code, because Claude.ai and ChatGPT can't reach a server on your machine.