GitHub MCP Server: Remote vs Local, Auth and Toolsets (2026)

Last updated 2026-10-26

Quick answer

The official GitHub MCP Server (github/github-mcp-server) connects AI tools to repositories, issues, pull requests and Actions. The fastest path is GitHub's hosted remote server at api.githubcopilot.com/mcp/ — sign in with OAuth and you're done. The local Docker image suits hosts without remote support or people who want everything on-machine. Facts on this page are from the official README, checked 2026-10-26.

Which install path fits you

Remote (recommended first): the server is hosted by GitHub at https://api.githubcopilot.com/mcp/ — no container, no token file, and OAuth sign-in happens in your browser when you add it. VS Code 1.101+ has one-click install buttons; Claude Desktop, Cursor and Windsurf support it as a remote (HTTP) server.

Local: the official image is ghcr.io/github/github-mcp-server. Pick this when your host can't reach remote servers, or policy requires the process to run on your machine. On github.com the image handles OAuth itself (browser login on first use, token kept in memory only); a personal access token via GITHUB_PERSONAL_ACCESS_TOKEN also works and takes precedence over OAuth.

  • ▸Everyday coding assistant → remote + OAuth: zero token management.
  • ▸Automation scripts and CI → local + a fine-grained PAT stored in an environment variable (never pasted into config files you commit).
  • ▸GitHub Enterprise Server or ghe.com → remote URL must point at your instance with a PAT, or you bring your own OAuth/GitHub App for local runs.

Authentication, concretely

OAuth (github.com): nothing to create up front. Your host opens GitHub's consent screen; the token stays in memory. For Docker local runs, the image publishes a fixed callback port (127.0.0.1:8085) so the browser login can reach the container.

PAT path: create a fine-grained token at github.com/settings/personal-access-tokens and set GITHUB_PERSONAL_ACCESS_TOKEN. Grant only the permissions your tasks need — repository contents and issues for read/write work, Actions if you want workflow data. The README's own hygiene rules: keep tokens in environment variables, use separate tokens per project, and rotate them.

Scope it down with toolsets

The server groups its tools into toolsets: context (who am I talking to — strongly recommended), repos, issues, pull_requests, actions, code_security, dependabot, notifications, users, orgs and more. If you specify none, a default set is loaded; the special value all enables everything. Passing an explicit toolset list is the practical way to keep an agent from touching areas it shouldn't — for a code-review assistant, context + repos + pull_requests + actions covers most sessions.

Failure modes worth knowing

Four account for most first-day trouble:

  • ▸Docker image pull fails with auth errors → the README calls this an expired ghcr.io token on your machine: run docker logout ghcr.io and retry.
  • ▸401 on tool calls with a PAT → check the token's permissions and expiry; fine-grained tokens need explicit repository access.
  • ▸Host without remote support → don't fight it; run the local image instead.
  • ▸Enterprise (GHES / ghe.com) → the one-click flows assume github.com; you must point configuration at your instance URL and supply a PAT or your own OAuth app.

The picks, one by one

G
GitHub
DockerStreamable HTTP

The official server this guide covers: remote endpoint plus the reference local image, maintained by GitHub.

Best for: Anyone who wants GitHub issues, PRs and Actions driven from an AI tool with first-party support.

G

Community read-only GitHub server — a narrower tool surface by design.

Best for: Situations where the agent must not be able to write to repositories at all.

G

Third-party GitHub MCP implementation with its own tool selection.

Best for: Comparing implementations when the official toolsets don't fit a workflow.

Watch out: Community-maintained — review the code and keep its token scoped.

Frequently asked questions

Is the GitHub MCP server free?+

Yes — it's open source (github/github-mcp-server) and the hosted remote endpoint is provided by GitHub at no extra cost. Your existing GitHub plan's API rate limits still apply to what the tools do.

Remote or local — which should I use?+

Start remote: api.githubcopilot.com/mcp/ with OAuth is the least setup and stays current. Go local only when your host lacks remote support, you need GHES/ghe.com, or policy requires on-machine processes.

How do I stop the agent from touching parts of GitHub?+

Use toolsets. Pass an explicit list (for example context, repos, pull_requests) instead of all, and if you authenticate with a PAT, grant only the permissions the job needs.

Does it work with GitHub Enterprise?+

Yes, with extra configuration: remote access points at your ghe.com or GHES URL with a PAT, and local OAuth login on enterprise instances requires bringing your own OAuth or GitHub App — the README documents both.

More guides