GitHub MCP Server: Remote vs Local Setup, Auth and Toolsets
October 25, 2026

The GitHub MCP server is GitHub's own official MCP server. It lets an AI assistant read your repositories, manage issues and pull requests, check Actions runs and review security alerts, all through plain-language requests.
It comes in two forms, and picking the right one is most of the setup:
- Remote (hosted by GitHub): you point your AI tool at
https://api.githubcopilot.com/mcp/. Nothing to install. GitHub calls this "the recommended option for most users." - Local: you run the server yourself, usually as a Docker container or a downloaded binary. You'll need it for GitHub Enterprise Server, or when you want full control over the setup.
On plans, GitHub's docs are clear: "The GitHub MCP server is available to all GitHub users regardless of plan type." The catch is per tool. A tool that wraps a paid feature needs the same subscription that feature does.
Below: how remote and local differ, how to authenticate, how to trim the toolsets, and the exact setup for Claude Code and VS Code.
What the GitHub MCP server does
MCP (Model Context Protocol) is the open standard that lets AI assistants call outside tools. If it's new to you, start with our plain-English MCP explainer.
The github/github-mcp-server repository is GitHub's implementation, released under the MIT license. Once it's connected, your assistant can:
- Browse code: search files, read contents, analyze commits across any repository you can access
- Work issues and PRs: create, update, comment on, and review issues and pull requests
- Check CI/CD: watch GitHub Actions runs, dig into build failures, manage releases
- Review security: read code scanning findings and Dependabot alerts
- Handle team activity: discussions, notifications, projects
A practical example: "Find the failing workflow on my last PR, read the log, and open an issue describing the error." That's three GitHub API calls the assistant chains for you.
If you saw older guides using the npm package @modelcontextprotocol/server-github, GitHub's own install guide notes it "is no longer supported as of April 2025." Use the official server instead.
Remote vs local GitHub MCP server
GitHub's setup docs describe the local server as "recommended for users who want to customize their setup or have specific security requirements." Here's how the two compare:
| Remote (hosted) | Local | |
|---|---|---|
| Where it runs | GitHub's infrastructure | Your machine (Docker or binary) |
| Setup | Add one URL to your client | Install Docker or the binary, then configure |
| Auth | OAuth (in clients that support it) or PAT | OAuth login on first use, or PAT |
| Extra tools | Copilot coding agent, Copilot Spaces, GitHub support docs search | Not included |
| GitHub Enterprise Server | Not supported | Supported via GITHUB_HOST |
| Needs remote MCP support in your client | Yes | No (uses stdio) |
Two details matter here:
- The remote server has tools the local one doesn't. GitHub's remote server docs list
copilot_spacesandgithub_support_docs_searchas toolsets only available remotely, plus extra Copilot tools such ascreate_pull_request_with_copilot, which hands a task to the Copilot coding agent. - Enterprise Server is local-only. Per the README, "GitHub Enterprise Server does not support remote server hosting." GitHub Enterprise Cloud with data residency (
ghe.com) can use the remote server at a tenant-specific URL.
Authentication: OAuth vs personal access token
You have two options, and they decide what the AI can touch.
OAuth. In Copilot's own IDE integrations (VS Code, Visual Studio, JetBrains IDEs, Xcode and Eclipse), GitHub says you "do not need to create a PAT or install any additional software to use the remote GitHub MCP server with OAuth." You sign in through a browser, and the server can only use the scopes you approve. Other clients need their own registered GitHub App or OAuth App to offer this, so support varies by tool.
The local server can also log in with OAuth now. The official Docker image ships with app credentials for github.com, runs a browser login on first use, and keeps the token in memory only.
Personal access token (PAT). Works with any client that supports remote MCP servers. You create a token and pass it as a Bearer header (remote) or the GITHUB_PERSONAL_ACCESS_TOKEN environment variable (local). The server gets exactly what the token grants, so scope it tightly.
GitHub's policy docs recommend fine-grained PATs over classic tokens. Their reasoning: classic tokens have broader scopes. Read GitHub's token documentation before you create one, and keep it out of any file you commit.
Plan and policy requirements
This is where many guides overstate things. Here's what GitHub actually says:
- Base access: "available to all GitHub users regardless of plan type"
- Paid tools: "If a feature requires a paid GitHub or Copilot license, the equivalent MCP tool will require the same subscription." GitHub's example is tools that drive the Copilot cloud agent
- Business and Enterprise orgs: if your account is part of a Copilot Business or Copilot Enterprise organization, "the 'MCP servers in Copilot' policy must be enabled in order to use MCP with Copilot." GitHub's MCP concepts page adds that this policy is off by default and doesn't govern Copilot Free, Pro, Pro+ or Max users
- Enterprise Managed Users: PATs are disabled by default unless an enterprise admin enables them
So a personal account can connect today. If you're on a company Copilot seat and it fails, ask your admin about that policy before you debug anything else.
Toolsets, read-only mode and lockdown mode
Turning on every tool is the easiest way to confuse a model. The README says enabling only what you need "can help the LLM with tool choice and reduce the context size."
Default toolsets. With no configuration, you get context, repos, issues, pull_requests and users. Other toolsets include actions, code_security, dependabot, discussions, gists, labels, notifications, orgs, projects, secret_protection and more. all turns on everything.
How to choose them:
| Setting | Local server | Remote server |
|---|---|---|
| Pick toolsets | --toolsets repos,issues or GITHUB_TOOLSETS | X-MCP-Toolsets header, or /x/<toolset> URL path |
| Pick single tools | --tools or GITHUB_TOOLS | X-MCP-Tools header |
| Read-only | --read-only or GITHUB_READ_ONLY=1 | /readonly URL path or X-MCP-Readonly header |
| Lockdown | --lockdown-mode or GITHUB_LOCKDOWN_MODE=1 | X-MCP-Lockdown header |
Read-only mode offers only read tools, so nothing can modify repositories, issues or pull requests. It takes priority: write tools stay off even if you request them by name. For a first setup, https://api.githubcopilot.com/mcp/readonly is a sensible place to start.
Lockdown mode filters public-repo content from authors without push access, to reduce prompt-injection risk from issues and comments written by strangers. Private repos are unaffected. GitHub is explicit that it's "a best-effort content filter, not a security boundary." Your token's permissions don't change. Our MCP security risks guide covers why that distinction matters.
Set up the GitHub MCP server in Claude Code and VS Code
Claude Code
GitHub's Claude install guide uses a PAT for the remote server. Run this in your terminal, not inside a Claude Code session:
claude mcp add-json github '{"type":"http","url":"https://api.githubcopilot.com/mcp","headers":{"Authorization":"Bearer YOUR_GITHUB_PAT"}}'
That add-json format is for Claude Code 2.1.1 and newer. On older versions, the guide uses claude mcp add --transport http instead. Add --scope user to make the server available in every project, or --scope project to share it with your team through .mcp.json.
For the local server with OAuth login (Docker required):
claude mcp add github -e 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
Restart Claude Code, then run claude mcp list to confirm the server shows up. Inside a session, /mcp shows its status. Anthropic's Claude Code MCP docs cover scopes and config files in more depth, and our Claude Code MCP configuration guide walks through the settings themselves.
VS Code
VS Code 1.101 or later supports remote MCP servers with OAuth. Use the one-click install button in the README, or add this to your MCP configuration:
{
"servers": {
"github": {
"type": "http",
"url": "https://api.githubcopilot.com/mcp/"
}
}
}
Then switch Copilot Chat into Agent mode and the server starts. VS Code's MCP server docs explain where that file lives and how to manage servers. To use a PAT instead of OAuth, add an Authorization: Bearer header to the same block.
Other clients
The repo has install guides for Cursor, Codex, Windsurf, Zed, Copilot CLI and others. Claude Desktop is the exception worth knowing: GitHub's guide says its remote connector flow isn't currently supported for this server, and recommends the local Docker setup instead. For other servers worth running alongside GitHub's, see our roundup of the best MCP servers.
FAQ
What is the GitHub MCP server?
It's GitHub's official Model Context Protocol server. It connects AI tools such as Copilot, Claude Code, Cursor and Codex to GitHub, so they can read code, manage issues and pull requests, and check workflows for you.
Is the GitHub MCP server free?
GitHub's docs say it's "available to all GitHub users regardless of plan type." Individual tools that depend on paid features, like Copilot cloud agent, need the matching paid license.
Do I need GitHub Copilot to use the GitHub MCP server?
No, not for the server itself. You can connect it to non-Copilot clients like Claude Code. Copilot-specific tools need a Copilot license, and Copilot Business or Enterprise members need the "MCP servers in Copilot" policy enabled.
What's the GitHub Copilot MCP server URL?
The remote endpoint is https://api.githubcopilot.com/mcp/. Add /readonly for read-only mode, or /x/<toolset> for a single toolset.
Should I use the remote or local GitHub MCP server?
Use remote unless you need GitHub Enterprise Server, your client lacks remote MCP support, or you have specific security requirements. Local gives you more control but loses the remote-only tools.
Is it safe to give an AI write access to my repos?
Start read-only, limit toolsets to what you need, and use a fine-grained PAT scoped to specific repositories. Turn on write tools only when you have a task that needs them.
Key takeaways
- The GitHub MCP server is GitHub's official, MIT-licensed MCP server. It replaced the deprecated
@modelcontextprotocol/server-githubpackage. - Remote is the default choice. One URL, OAuth in VS Code, plus Copilot-specific tools. Local is for Enterprise Server and custom setups.
- It's available on every GitHub plan. Paid features still need paid licenses, and Copilot Business or Enterprise orgs must enable the MCP policy.
- Trim before you trust. Pick toolsets, start read-only, and treat lockdown mode as a filter, not a security wall.
Wiring up MCP servers is exactly the kind of setup step where good AI workflows stall. If you'd rather start from a configuration someone already got working, Taku mirrors a working AI setup into a desktop workspace and runs it, so you skip rebuilding their environment. Taku is in Beta, and the Mac app is available now.