Loomal

GitHub MCP server in Claude Code repos, issues, and PRs by prompt.

GitHub's official MCP server is remote — no npx, no local process. One claude mcp add command, an OAuth handshake via /mcp, and Claude Code can manage repos, issues, pull requests, and Actions.

The GitHub MCP Server (github.com/github/github-mcp-server, 30.6k stars) is GitHub's official bridge between AI assistants and the GitHub API — triage issues, review and create pull requests, inspect Actions runs, and query repos in natural language. Claude Code plus this server covers a surprising amount of daily GitHub work without opening a browser tab.

Unlike most MCP servers, the recommended setup is remote: GitHub hosts the server at https://api.githubcopilot.com/mcp/ and you authenticate with OAuth. Nothing to install, nothing to keep running.

Add the remote server

One command registers it: `claude mcp add --transport http github https://api.githubcopilot.com/mcp/`. If you'd rather make it project-scoped so teammates get it from the repo, commit this .mcp.json at the project root instead:

.mcp.json (project root)
{
  "mcpServers": {
    "github": {
      "type": "http",
      "url": "https://api.githubcopilot.com/mcp/"
    }
  }
}

Authenticate with OAuth

Start a Claude Code session and run `/mcp`. The github entry will show as needing authentication — select it and Claude Code opens a browser window for GitHub's OAuth flow. Approve it, and the token is stored for future sessions; no personal access token to mint, paste, or rotate.

If you're in an environment where the browser flow is awkward (remote SSH boxes, CI), you can instead pass a fine-grained PAT as an Authorization header when adding the server — but for a laptop, OAuth is less to manage.

Try it on something real

Good first prompts: "list my open PRs across this org," "summarize the discussion on issue #42 in this repo," or "why did the last Actions run fail?" Each exercises a different toolset — pull requests, issues, and Actions respectively — and confirms both auth and permissions in one pass.

The server exposes a lot of tools, grouped into toolsets (repos, issues, pull_requests, actions, code security, and more). That breadth has a cost — a large tool surface eats context and can dilute tool selection — so GitHub also publishes scoped variants of the remote endpoint, including a read-only one; check the server's documentation if you want Claude Code limited to specific toolsets or to reads. You can see the live tool list on its Loomal listing at https://loomal.ai/marketplace/github.

Troubleshooting in Claude Code

401 or "needs authentication" that won't clear: run `/mcp`, pick github, and re-run the OAuth flow — tokens do expire, and re-auth fixes the bulk of failures. If the browser never opens, you're likely on a headless machine; switch to the PAT-header approach for that environment.

Server missing entirely: `claude mcp list` shows what's registered and at which scope — a server added with project scope only exists inside that project directory, which catches people who add it in one repo and expect it elsewhere. For .mcp.json setups, remember Claude Code asks for one-time approval of project servers; if it was declined, reset with `claude mcp reset-project-choices`. And if a specific call fails with a permissions error, the limiting factor is your GitHub account's access to that repo — the server can't see anything you can't.

FAQ

How do I install the GitHub MCP server in Claude Code?

Run `claude mcp add --transport http github https://api.githubcopilot.com/mcp/`, then `/mcp` inside a session to complete GitHub's OAuth flow. There's no package to install — the server is hosted by GitHub.

Do I need a personal access token?

Not for the standard setup — the remote server uses OAuth, which Claude Code initiates from the /mcp menu. A fine-grained PAT passed as an Authorization header is the fallback for headless environments where a browser flow isn't practical.

Can I run the GitHub MCP server locally instead?

Yes — GitHub publishes a Docker image of the same server for local stdio use with a PAT. The remote endpoint is the simpler default for Claude Code since there's nothing to run or update, but air-gapped or policy-restricted setups may prefer local.

Why do some tools fail with permission errors after OAuth succeeds?

The server acts with your GitHub identity, so per-repo access, org policies, and OAuth app restrictions all apply. If your org requires app approval, an admin may need to allow the integration before org-private repos become visible.

More MCP servers for Claude Code.

Browse developer tools, scraping, and search servers with live tool lists.

Browse the marketplace