You can connect GitHub to Claude using the Model Context Protocol (MCP), and once it’s connected, Claude can look up issues, read pull requests, and check repo activity without you pasting diffs or ticket links into the chat. The setup is a little different from most MCP servers, though: GitHub’s remote server doesn’t hand out one-click OAuth sign-in to every client the way Notion or Linear do. This guide covers what that means in practice and both ways to connect: directly, or through a gateway.

What the GitHub MCP server actually does

GitHub’s remote MCP server lives at api.githubcopilot.com/mcp/. It exposes your repos, issues, and pull requests as tools Claude can call directly, instead of you copying commit messages or PR descriptions into the conversation by hand. In practice that means prompts like:

  • “What’s changed on the main branch since yesterday?”
  • “Summarize the open PRs waiting on my review.”
  • “Find the issue about the login bug and tell me the latest comment.”
  • “Open an issue for this and tag it as a bug.”

Claude reads and writes through the same permissions your GitHub account already has — it isn’t a separate export or read-only mirror, it’s your account acting on your behalf, which means it can also comment, label, and open issues if you prompt it to.

The part that’s different: no one-click OAuth here

Most of the servers in our directory — Notion, Linear, Airtable — let any AI client register itself and send you through a standard OAuth consent screen. GitHub’s Copilot MCP endpoint doesn’t open up that way today: the connect path we’ve verified for it uses a personal access token rather than a one-click sign-in. That’s the same gap we wrote about in MCP OAuth scopes explained — a server supporting OAuth in principle doesn’t mean every client can walk through it today, and GitHub’s Copilot infrastructure is a case where a token is currently the reliable path.

In practice, that means before you connect GitHub anywhere, you’ll generate a personal access token (PAT) from your GitHub account settings, scoped to what you actually want Claude to touch — read-only on repos you’re just querying, write access only if you want it opening issues or commenting on your behalf.

Option 1: Connect GitHub to Claude directly

The short version of the setup:

  • Generate a GitHub personal access token with the scopes you want to grant.
  • Open Claude’s connector or MCP settings and add a remote server pointing at GitHub’s MCP endpoint.
  • Paste in the token when prompted for credentials, instead of an OAuth sign-in screen.

That’s workable for one person on one client. The tradeoff shows up the moment you add a second AI client or a second person: each one needs its own copy of that token, stored somewhere, and if you ever need to rotate it, you’re updating it in every place it was pasted.

Option 2: Connect it once, through a gateway

If you’re already connecting more than one MCP server, or using more than one AI client, wiring each pair directly gets old fast — that’s the connection sprawl we wrote about in what an MCP gateway is. The alternative is connecting GitHub (and everything else) to one gateway URL, then pointing every AI client at that single URL instead of reconfiguring each one.

With gate specifically, connecting GitHub looks like this: add gate’s gateway URL to Claude once, then pick GitHub from the GitHub server page in the directory and paste in your personal access token there instead of in each client separately. From then on, GitHub’s tools are available in every client connected to your gate URL — Claude, ChatGPT, or Cursor — and the token lives in one place instead of scattered across config files. You can see the full list of servers set up this way on the MCP servers page.

Why the token matters more than it looks

A GitHub personal access token is a broader grant than it feels like when you’re pasting it into a settings field. Depending on the scopes you pick, it can read private repos, push commits, close issues, and comment as you — across every repo those scopes cover, not just the one you had in mind when you generated it. A few things worth checking before or right after you connect:

  • Scope it narrowly. Fine-grained personal access tokens let you limit a token to specific repositories and specific permissions (read issues, but not push code, for example). Start narrow and widen it only if you actually need to.
  • Know what it can write, not just read. A prompt like “clean up stale issues” can mean bulk-closing things you didn’t intend, if the token has write access and the AI client isn’t asking before it acts.
  • Treat it like the credential it is. A token pasted into one client config is a token you now have to remember to rotate everywhere it was pasted, which is exactly the access-control problem we cover in MCP access control for teams.

You can run a quick, no-signup check on any server’s tool list with gate’s free MCP security scanner, which looks for prompt injection and hidden instructions in tool descriptions before you rely on a server day to day.

Troubleshooting the connection

  • “Unauthorized” or 401 errors. Usually means the token expired or wasn’t granted the scope the tool call needs — check the token’s permissions before assuming the server is down.
  • Claude can’t see a repo you know exists. The token’s scope controls what Claude can see, the same as it would for any other app using that token — a private repo the token wasn’t granted access to simply won’t show up.
  • Tools disappear after a GitHub update. Remote servers can change their tool list without warning. If you’re connected through a gateway, that kind of change is exactly what drift detection is meant to catch.

The bottom line

Connecting GitHub to Claude with MCP takes a few extra minutes compared to a server with one-click OAuth, because you’re generating and pasting a personal access token instead of clicking “Allow.” Do it directly if you’re on one client, or once through a gateway if you want the same token and the same GitHub access available in every AI client you use, without pasting it in more than one place. Either way, scope the token narrowly — it’s a broader grant than it looks like at first glance.