MCP server · GitHub
GitHub MCP Server
Pick it for issues, PRs and Actions from the agent; limit toolsets or use read-only mode for review tasks.
Tools: 46, ~11,131 tokens of tool definitions loaded into the model's context (release binary, default toolsets; measured 2026-10-27, v2.0.3). Compare all servers →
All 46 tools, by token cost
- issue_write803
- pull_request_read557
- list_issues545
- pull_request_review_write476
- search_issues436
- search_pull_requests400
- list_commits398
- search_code381
- search_commits375
- list_pull_requests374
- sub_issue_write373
- create_or_update_file367
- issue_read332
- add_comment_to_pending_review330
- add_issue_comment270
- get_file_contents269
- search_repositories262
- add_reply_to_pull_request_comment256
- get_commit242
- list_repository_collaborators241
- assign_copilot_to_issue233
- update_pull_request224
- list_releases210
- create_pull_request195
- search_users194
- push_files182
- merge_pull_request167
- list_issue_fields151
- ui_get150
- update_issue_comment144
- create_repository127
- delete_file126
- list_branches125
- list_tags125
- update_pull_request_branch119
- list_issue_types115
- request_copilot_review111
- create_branch107
- get_release_by_tag104
- get_label90
- get_tag89
- fork_repository88
- get_team_members77
- get_latest_release73
- get_teams63
- get_me55
Same server, other documented flags (measured 2026-10-27):
--read-only(read-only): 27 tools, ~6,433 tokens (42% less than the default)--toolsets=repos,issues,pull_requests --read-only(repos + issues + pull_requests, read-only): 22 tools, ~5,894 tokens (47% less than the default)--toolsets=all(all toolsets): 91 tools, ~23,138 tokens (108% more than the default)
Install
Remote: add https://api.githubcopilot.com/mcp/ in your client; local: Docker image ghcr.io/github/github-mcp-server (see README). Cursor: the install guide adds the remote URL with an Authorization: Bearer PAT header in ~/.cursor/mcp.json. Official install docs ↗
Credentials: GitHub OAuth (remote server, in hosts that register an OAuth app; Cursor's guide uses a PAT) or a Personal Access Token (GITHUB_PERSONAL_ACCESS_TOKEN); the local Docker server can also log in with OAuth in the browser.
What it can access
Acts on GitHub with the scopes of your token/OAuth app: repos, issues, PRs, Actions (toolsets configurable, read-only mode available).
Minimal safe setup
- Start with
--read-only(write tools are skipped even if requested via --tools) and only the toolsets you need, e.g.--toolsets=repos,issues,pull_requests. source ↗ - With a PAT, grant only what you use: the README's minimum list is
repo(repository operations),read:packages(Docker image access) andread:org(organization teams); use separate tokens per project and rotate them. source ↗ - When the agent reads public repositories, add
--lockdown-mode(Docker: GITHUB_LOCKDOWN_MODE=1): it withholds issue/PR content from authors without push access to reduce prompt-injection risk. GitHub says it is a best-effort filter, not an authorization boundary. source ↗
Common setup errors
- Docker pull of ghcr.io/github/github-mcp-server fails.
- The image is public; a failed pull usually means an expired ghcr.io login. Run
docker logout ghcr.ioand pull again. source ↗ - Your --toolsets flag seems to be ignored.
- The GITHUB_TOOLSETS environment variable takes precedence over the --toolsets argument when both are set; remove one of them. source ↗
- GitHub Enterprise Server does not connect.
- GHES is not supported by the remote server: run the local server with --gh-host / GITHUB_HOST set to your host with the https:// prefix (non-HTTPS hosts are refused, except loopback). ghe.com data-residency tenants use https://copilot-api.<subdomain>.ghe.com/mcp remotely. source ↗
- The token from your shell environment is not picked up.
- Environment-variable expansion in MCP config varies by client; the README notes some (for example Windsurf) need the token written in the config file. If you do that, restrict the file (chmod 600) and keep it out of Git. source ↗
How it differs from alternatives
- Git (reference server): Works on a local repository (status, diff, commit, branch) with no GitHub account or token; it cannot touch issues, PRs or Actions. Measured: 12 tools, ~1,137 tokens.
- GitLab MCP: The equivalent for GitLab: a hosted endpoint only, authenticated with OAuth (mcp scope) or a fine-grained PAT.
Notes written from the official sources linked above, checked 2026-10-27.
Details
- Type
- MCP server
- Tasks
- Git & GitHub reposCode reviewCI/CD
- Compatible agents
- Claude Code, Claude Desktop, Cursor, VS Code, Windsurf, Codex, Gemini CLI, GitHub Copilot, Zed (source: clients with a setup heading or install/config instructions in the official README)
- Maintenance
- Release v2.3.0 on 2026-11-24; last commit 2026-12-03
- License
- MIT
- Source
- https://github.com/github/github-mcp-server
- Verified on
- 2026-12-03
No independent security audit: entries summarize official sources only. Review permissions and code before installing.
Compared in: Best MCP servers for CI/CD in Cursor · Best MCP servers for Git & GitHub repos · Best MCP servers for Code review · Best MCP servers for CI/CD
Badge for your README (maintainers)
The badge only says it's listed; it is not a security review or an endorsement.