MCP
GitHub’s official MCP server
Lets an agent read repositories, issues, and pull requests without pasting a token into chat.
github/github-mcp-server is GitHub’s official MCP server, MIT licensed and written in Go. Repository, issue, and pull-request operations are tools the agent calls through the protocol, instead of you pasting a personal access token into the conversation.
Grant only the permission the task needs. Summarizing an issue and merging a pull request are not the same scope.
This page is a guide, not the original text.
What problem it solves
The official GitHub MCP Server lets a coding agent call GitHub directly: read repositories and files, inspect or work on issues and pull requests, and look at Actions, without pasting a personal access token (PAT) into the chat. You can use GitHub’s hosted remote server, or run the official Docker image locally.
The default toolsets are context, repos, issues, pull_requests, and users. Common tools include get_file_contents, list_issues, and list_pull_requests. Add further toolsets only when you need Actions, security scanning, or similar capabilities; you do not have to enable everything at first.
Who it is for
It is for people who already use an MCP client such as VS Code, Cursor, or Claude Code, and who want an agent to read GitHub repositories or work on issues and pull requests. The repository is MIT licensed. The remote server is hosted by GitHub. Official install guides do not list a separate MCP fee, but GitHub API rate limits still apply, and an organization can disable MCP with policy. This review did not find a per-call price, so the page does not invent one.
Authentication depends on the client. Copilot hosts such as VS Code can use OAuth with the remote server. Official Cursor docs say that although Cursor can use OAuth with some MCP servers, the GitHub remote server currently requires a PAT. The official Claude Code guide also shows a remote setup with a PAT. Local Docker can use OAuth instead: the official image already includes app credentials, opens a browser on first use, and keeps the token in memory only. If a PAT is present, it takes precedence over OAuth.
How to install it
Checked on 15 November 2026 (Asia/Shanghai) against the repository README and the official Claude and Cursor guides. The remote URL is https://api.githubcopilot.com/mcp/. Create a PAT in GitHub settings first, and do not commit it.
In Claude Code 2.1.1 or later, add the remote server from your terminal, not from inside a session:
claude mcp add-json github '{"type":"http","url":"https://api.githubcopilot.com/mcp","headers":{"Authorization":"Bearer YOUR_GITHUB_PAT"}}'If that command returns Invalid input — official docs note this can happen on Windows — use the legacy claude mcp add --transport http ... form instead. Add --scope user to keep it across projects. Restart Claude Code and check with claude mcp list.
In Cursor, you need v0.48.0 or later for Streamable HTTP. Put the following in ~/.cursor/mcp.json, or in .cursor/mcp.json at the project root, replace YOUR_GITHUB_PAT, and restart:
{
"mcpServers": {
"github": {
"url": "https://api.githubcopilot.com/mcp/",
"headers": {
"Authorization": "Bearer YOUR_GITHUB_PAT"
}
}
}
}For a local server, the official image is ghcr.io/github/github-mcp-server, and Docker needs to be running. Do not install @modelcontextprotocol/server-github. Official docs say that npm package has not been supported since April 2025 and is no longer functional.
A worked example
The official Cursor guide uses this prompt to verify the install: List my GitHub repositories. This review did not run it against a real account, so the page does not invent a repository list.
- Finish the remote or local setup above, and confirm GitHub tools are visible. In Cursor, look for a green status on the MCP server.
- Send:
List my GitHub repositories. - With the default toolsets, the agent should list repositories your token can see through the GitHub MCP server, instead of asking you to paste a token into the chat.
- Check the list yourself: is it complete, and is the visibility what you expect? If it is empty or returns 403, inspect the PAT scopes and any organization policy before sending the token to the model again.
Common pitfalls
- Still using the old npm package. Official install guides repeat that
@modelcontextprotocol/server-githubhas been unsupported since April 2025. Use the remote URL orghcr.io/github/github-mcp-serverinstead. - Remote calls return 403. Issue #672 reported 403 responses for some users on the remote MCP server. Check PAT scopes, organization policy, and, in Copilot environments, whether MCP access is enabled.
- Cursor cannot reach the remote server. Official troubleshooting asks for Cursor v0.48.0 or later, valid JSON, and a full restart after the change.
- Local Docker fails to pull or start. Confirm Docker is running. Official docs suggest
docker logout ghcr.ioand a retry if the image pull fails. - Putting a token in chat or in git. Official guides exist so you do not paste a PAT into the conversation. Keep it in local config or an environment variable, with only the scopes you need.
FAQ
Do I always need a PAT for the remote server?
It depends on the client. Hosts such as VS Code can use OAuth with the remote server. Official Cursor docs say a PAT is still required for the GitHub remote server today. Official Claude Code remote examples also use a PAT. Local Docker can use OAuth; see the official OAuth guide.
Do I need a paid Copilot plan?
In some Copilot hosts, admin policy can control MCP access. When you follow the official Claude Code or Cursor PAT instructions, the documented requirements are a compatible MCP client and a GitHub token, not a Copilot subscription as a hard prerequisite. An organization policy can still block access. Those guides do not publish a separate MCP price.
What can it do by default?
If you do not set toolsets, the defaults are context, repos, issues, pull_requests, and users. get_file_contents reads a file; list_issues lists issues. Other toolsets have to be enabled separately.
Can I paste the token into the chat and let the agent store it?
No. The official setup is designed to keep the token out of the conversation. Put it in the client config or an environment variable, and keep those files out of git.
Does the old npm package still work?
Official docs say it has been unsupported since April 2025 and is no longer functional. Use the remote server or the official Docker image.
Sources and license
github/github-mcp-server is licensed under MIT. This page follows the README and the official Claude and Cursor install guides as of 15 November 2026, rewritten for CQBase — Context & Query Base. If the remote URL, auth method, or npm deprecation note changes, follow the repository.
In this category
- MCP
Awesome MCP Servers
The MCP server list people most often cite, under MIT.
punkpeye - MCP
MCP reference servers
Reference servers from the protocol organization, for seeing the smallest shape of an MCP server.
modelcontextprotocol - MCP
Context7
An MCP that feeds current library docs to an agent so it writes against the API you have.
upstash