GitHub MCP
GitHub's official MCP server: repos, issues, pull requests and Actions, hosted or local
BestMCPTools
GitHub MCP
bestmcptools.org
Last verified: November 10, 2026
Maintenance status
ActivePoints to GitHub's official github/github-mcp-server, README and docs read November 10, 2026. The previous npm reference server (modelcontextprotocol/servers-archived) was archived May 29, 2025.
How to Install GitHub MCP
$docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN=<your-token> ghcr.io/github/github-mcp-serverCompatible with: VS Code, JetBrains IDEs, Visual Studio, Eclipse, Xcode, Claude Code, Claude Desktop, Cursor, Windsurf, Zed, Gemini CLI, Codex.
Setup by client
Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"github-mcp": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"GITHUB_PERSONAL_ACCESS_TOKEN=<your-token>",
"ghcr.io/github/github-mcp-server"
]
}
}
}Cursor (~/.cursor/mcp.json)
{
"mcpServers": {
"github-mcp": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"GITHUB_PERSONAL_ACCESS_TOKEN=<your-token>",
"ghcr.io/github/github-mcp-server"
]
}
}
}VS Code (.vscode/mcp.json)
{
"servers": {
"github-mcp": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"GITHUB_PERSONAL_ACCESS_TOKEN=<your-token>",
"ghcr.io/github/github-mcp-server"
]
}
}
}Claude Code (terminal)
claude mcp add github-mcp -- docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN=<your-token> ghcr.io/github/github-mcp-serverAdd any API keys or environment variables the server's README lists.
About GitHub MCP
GitHub MCP is GitHub's own official MCP server, maintained in the github/github-mcp-server repository. It lets an AI client read repositories and code, work with issues and pull requests, look at Actions runs and security alerts, and automate GitHub workflows. You can use the version GitHub hosts at https://api.githubcopilot.com/mcp/ or run the server yourself with Docker or a Go binary. It is MIT licensed. An earlier GitHub server from the MCP project's own servers repository has been archived; see below.
Quick facts (as of November 10, 2026)
| GitHub MCP | |
|---|---|
| Maker | GitHub (repository github/github-mcp-server) |
| Hosted (remote) endpoint | https://api.githubcopilot.com/mcp/ |
| Local options | Docker image ghcr.io/github/github-mcp-server, or build from source with Go |
| Auth | OAuth or a personal access token (PAT); GitHub App auth for non-interactive local setups |
| Organization | Toolsets, enabled with --toolsets / GITHUB_TOOLSETS locally or X-MCP-Toolsets / /x/{toolset} remotely |
| Default toolsets | context, repos, issues, pull_requests, users |
| Read-only mode | Yes: --read-only locally; X-MCP-Readonly header or /readonly URL path remotely |
| Enterprise | GHES and ghe.com supported by the local server through --gh-host / GITHUB_HOST |
| License | MIT |
| Price | Free, open source (MIT), as of November 2026 |
Tools
The README groups tools into toolsets. Names below are taken from its Tools section (the list is long, so this is a selection, not every tool).
- repos:
get_file_contents,create_or_update_file,delete_file,create_branch,create_repository,fork_repository,get_commit,get_latest_release,delete_repository - issues:
issue_read,issue_write,list_issues,search_issues,add_issue_comment,sub_issue_write - pull_requests:
pull_request_read,create_pull_request,list_pull_requests,search_pull_requests,update_pull_request,merge_pull_request,pull_request_review_write - actions:
actions_get,actions_list,actions_run_trigger,get_job_logs - code_security:
get_code_scanning_alert,list_code_scanning_alerts - dependabot:
get_dependabot_alert,list_dependabot_alerts - discussions, gists, notifications, projects, labels, git, governance: for example
list_discussions,create_gist,list_notifications,projects_list,projects_write,get_repository_tree - context:
get_me,get_teams,get_team_members. The README strongly recommends keeping this one enabled. - copilot:
assign_copilot_to_issue,request_copilot_review
The full set of toolsets listed is: context, actions, code_quality, code_security, copilot, copilot_issue_intents, dependabot, discussions, gists, git, governance, issues, labels, notifications, orgs, projects, pull_requests, repos, secret_protection, security_advisories, stargazers, users. copilot_spaces and github_support_docs_search are remote only. The value all enables every toolset. Individual tools can be added with --tools / GITHUB_TOOLS.
Setup
Remote (hosted by GitHub)
The README calls the remote server the easiest method. In VS Code, the OAuth form is:
{
"servers": {
"github": {
"type": "http",
"url": "https://api.githubcopilot.com/mcp/"
}
}
}
For a PAT, send an Authorization: Bearer <your token> header (the Claude Code guide does this). GitHub's Copilot docs list setup pages for VS Code, JetBrains IDEs, Visual Studio 17.14 or later, Eclipse 2024-09 or later and Xcode. Members of Copilot Business or Enterprise organizations need the "MCP servers in Copilot" policy enabled.
Local with Docker
Docker must be running. With a PAT:
docker run -i --rm \
-e GITHUB_PERSONAL_ACCESS_TOKEN=<your-token> \
-e GITHUB_TOOLSETS="repos,issues,pull_requests,actions,code_security" \
ghcr.io/github/github-mcp-server
With OAuth on github.com, the README publishes a fixed callback port to loopback and sets GITHUB_OAUTH_CALLBACK_PORT=8085:
docker run -i --rm -p 127.0.0.1:8085:8085 -e GITHUB_OAUTH_CALLBACK_PORT ghcr.io/github/github-mcp-server
To build from source, run go build -o github-mcp-server ./cmd/github-mcp-server, then github-mcp-server stdio with GITHUB_PERSONAL_ACCESS_TOKEN set. If a Docker pull fails with an expired token, the README says to run docker logout ghcr.io.
Other clients
The repository has per-client install guides covering Copilot CLI, JetBrains, Visual Studio, Eclipse, Xcode, Claude Code and Claude Desktop, Cursor, Gemini CLI, OpenCode, Windsurf, Zed, Codex and Rovo Dev CLI (remote only). For Claude Code the guide uses claude mcp add-json github with the HTTP URL and an Authorization header. For Claude Desktop the guide says the remote server is not supported through that setup, so it gives a local Docker configuration.
Read-only, toolsets and lockdown
- Read-only:
--read-onlyorGITHUB_READ_ONLYlocally; theX-MCP-Readonlyheader or a/readonlysuffix remotely. The docs say it overrides other configuration, so write tools are excluded even when their toolset is on (the docs' own example namescreate_issue; in the current tool list issue writes go throughissue_write). - Remote toolsets:
https://api.githubcopilot.com/mcp/x/issuesselects one toolset by path; combine several with theX-MCP-Toolsetsheader. - Excluding tools:
--exclude-tools/GITHUB_EXCLUDE_TOOLSorX-MCP-Exclude-Tools. - Lockdown mode:
--lockdown-mode/GITHUB_LOCKDOWN_MODEor theX-MCP-Lockdownheader. On public repositories it limits content to users with push access. The docs call it a best-effort content filter, not a security boundary.
Limitations and things to watch
- Write tools exist. Tools can merge pull requests and delete files or repositories. Use read-only mode, narrow toolsets or
--exclude-toolsif you want a safer setup. - PAT scopes. The README lists
repo,read:packagesandread:orgas minimum scopes. A PAT set in the environment takes precedence over OAuth. - Enterprise. The README says the remote server does not support GHES. For GHES, use the local server with
--gh-hostand anhttps://host (non-HTTPS hosts are refused except loopback). For ghe.com, usehttps://YOURSUBDOMAIN.ghe.com, and the README's remote example for GitHub Enterprise Cloud with data residency uses a URL likehttps://copilot-api.octocorp.ghe.com/mcp. OAuth on GHES or ghe.com needs your own OAuth or GitHub App. - Policies. Enterprise Managed Users have PATs disabled by default unless an administrator enables them, and OAuth access restrictions can require enabling each client's OAuth App.
- Tool count. More toolsets means more tool definitions in your model's context. The defaults are a smaller set for that reason; this is our reading of the design, not a documented figure.
Pros and cons
Pros
- Maintained by GitHub, with a hosted endpoint and no local install needed.
- Both OAuth and PAT sign-in.
- Granular controls: toolsets, individual tools, exclusions, read-only and lockdown.
- Local Docker or source builds for custom environments and GHES.
- MIT license.
Cons
- Broad write access unless you restrict it.
- The remote server does not support GHES.
- Claude Desktop uses the local Docker route per GitHub's guide.
- Some setups depend on Copilot policies, such as the "MCP servers in Copilot" policy.
Who it is for
A good fit if:
- Your code lives on GitHub and you want an assistant to read code, triage issues and review pull requests.
- You want a read-only setup for research, or tight toolsets for automation.
Not the right tool if:
- You need to run git commands on a local clone. See the Git MCP server.
- Your code is on GitLab or Azure DevOps. See GitLab MCP or Azure DevOps MCP.
About the old npm package
The MCP project's modelcontextprotocol/servers-archived repository lists a GitHub server among its archived servers. The repository states it was archived on May 29, 2025 and is read-only, with no security guarantees for the archived servers. We could not confirm the npm package name @modelcontextprotocol/server-github from that page. Use GitHub's own server for new setups. See also Official MCP servers.
To bring code quality and security findings into the same workflow, see SonarQube MCP.
What we could not verify
- Whether the npm package
@modelcontextprotocol/server-githubis the archived server or carries a deprecation notice (the npm page could not be fetched and the archive page does not name the package). - Whether dynamic toolset discovery is current; the pages we read did not describe it.
- Every tool name: the tools shown above were checked, but the README is long and we did not confirm each tool in every toolset.
- Pricing of Copilot-dependent features, GitHub plan requirements, and any API rate limits.
- Behavior in practice.
How this page was put together
We read the GitHub MCP server README and docs, GitHub's Copilot docs page and the archived servers repository page on November 10, 2026, and compared the documented behavior. This page is based on documentation, not on running the software.
Sources
Pricing
Open Source: from Free (open source, as of November 2026)
Our Take on GitHub MCP
A broad, officially maintained GitHub server with a hosted option and fine-grained controls such as toolsets and read-only mode. It can write and delete, so restrict it for sensitive repositories.
Alternatives to GitHub MCP
GitLab's official MCP server for merge requests, work items, repos and CI/CD
View GitLab MCP →