GitHub MCP Server

Official

GitHub's official server — repos, issues, pull requests, Actions and code security, straight from your assistant.

Local + remotestdiostreamable-httpGoMIT 20.0k

What is the GitHub MCP server?

The GitHub MCP server is the one most developers install first, and the official version (built by GitHub, in Go) has grown into a genuinely deep integration: repository browsing, file contents, issue and PR management, code and issue search across all of GitHub, Actions workflow runs, code-scanning alerts, Dependabot findings, notifications and discussions.

The workflow change is bigger than it sounds. Instead of alt-tabbing to github.com to check CI, you ask "why did the last workflow run fail on main?" and get the failing step's logs interpreted in context. PR reviews become conversational: the assistant reads the diff, summarises the risk areas, drafts review comments, and can request changes or merge when you say so. Issue triage — labelling, deduplicating, drafting responses — is the kind of tedium this quietly absorbs.

Two ways to run it. The remote server at api.githubcopilot.com/mcp/ is the low-friction option: OAuth in the browser, no local install, always current. The local version runs as a Docker container with a personal access token — the right choice for GitHub Enterprise Server or when you want tight control over scopes via a fine-grained PAT.

A practical tip: the server supports toolsets — flags that trim which tool groups are exposed (just repos and PRs, say). Trimming unused toolsets reduces prompt clutter and keeps the assistant from reaching for tools you never intended it to use. Scope your PAT minimally and this becomes a very comfortable daily driver.

Tuning the toolset surface

  • Set GITHUB_TOOLSETS=repos,issues,pull_requests to expose only what you need; all turns everything on, and dynamic toolset discovery lets the model switch groups on mid-session instead of loading them all upfront.
  • The remote endpoint has per-toolset paths such as /mcp/x/issues and /mcp/x/actions, plus a read-only variant — so you can register a browsing-only GitHub server next to a write-capable one.
  • Fine-grained PAT permissions have to match the toolsets you enable: Contents for file reads, Pull requests for review flows, and Actions read access before job logs will come back at all.
  • get_job_logs can return only the failed steps with a tail limit. Reach for that rather than pulling a 40,000-line workflow log into the conversation.

What you can do with it

Conversational PR review

The assistant reads the diff, flags risky changes, drafts comments, and merges when you approve.

CI failure diagnosis

Pull the failing job's logs and get the actual error explained, not just a red X.

Issue triage at scale

Label, deduplicate and draft responses across a busy issue tracker.

Cross-repo code archaeology

Find where a function is used across your org without cloning everything.

Available tools

ToolWhat it does
search_code / search_issuesSearch code and issues across GitHub
get_file_contentsRead files from any accessible repository
create_issue / update_issueOpen and manage issues
create_pull_requestOpen PRs from existing branches
get_pull_request_diffRead a PR's full diff for review
merge_pull_requestMerge approved pull requests
list_workflow_runs / get_job_logsInspect Actions runs and failing job logs
list_code_scanning_alertsReview code security findings

How to install the GitHub MCP server

claude mcp add --transport http github https://api.githubcopilot.com/mcp/

Authorises via browser OAuth — no token to manage.

Configuration

Remote: just OAuth. Local: Docker and a fine-grained personal access token. Enterprise Server requires local mode.

VariableDescriptionRequired
GITHUB_PERSONAL_ACCESS_TOKENPAT for local mode (remote mode uses OAuth instead)e.g. github_pat_...Optional
GITHUB_TOOLSETSComma-separated toolsets to enable (e.g. repos,issues,pull_requests)e.g. repos,issues,pull_requests,actionsOptional

Example prompts to try

  • Summarise open PRs on our main repo and flag any that touch the auth code.
  • Why did the latest deploy workflow fail? Show me the relevant log lines.
  • Find every repository in our org that still imports the deprecated payments SDK.

Frequently asked questions

Remote (api.githubcopilot.com/mcp/) for most people — OAuth sign-in, zero install, always up to date. Local via Docker makes sense for GitHub Enterprise Server or when you want precise PAT scoping.