How to connect the GitHub MCP server
To connect the official GitHub MCP server, add https://api.githubcopilot.com/mcp/ to your MCP client as a Streamable HTTP server, then sign in with OAuth when your client prompts you. If your client can't use GitHub OAuth, use a personal access token. GitHub documents setup for VS Code, Claude Code, Cursor, Codex and Windsurf.
Docs reviewed 5 Nov 2026Not a tested connection.
Try in the browser with your key →
Endpoint https://api.githubcopilot.com/mcp/ · Registry io.github.github/github-mcp-server 2.1.0
Add GitHub MCP to your client
{
"servers": {
"github": {
"type": "http",
"url": "https://api.githubcopilot.com/mcp/"
}
}
}Connect GitHub MCP step by step
Before you start
- A GitHub account. GitHub Enterprise Cloud can use the remote server; GitHub Enterprise Server doesn't support it, so use the local server there. github.com/github
- Any applicable GitHub MCP policies must be enabled for your account, organization or enterprise. If the connection is refused, ask an administrator to check the policies. github.com/githubgithub.com/github
- An MCP host with remote server support, such as VS Code 1.101 or later. OAuth works only in hosts that have registered a GitHub App or OAuth App; other hosts need a personal access token. github.com/github
Authentication
- Your client → GitHub MCP
- OAuth sign-in, handled by your MCP client. github.com/githubmodelcontextprotocol.io/specification
- GitHub MCP → GitHub API
- Not established by this guide.
Steps
- Open GitHub's remote MCP server instructions
- Add the GitHub MCP server to your client
Add https://api.githubcopilot.com/mcp/ as a remote MCP server that uses the Streamable HTTP transport (often labelled "http"). VS Code has a one-click install. To limit tools, add /readonly to the URL or send the X-MCP-Readonly header, and choose toolsets with a /x/<toolset> path or the X-MCP-Toolsets header.
- Sign in to GitHub and approve access in the OAuth window
- If your client can't use GitHub OAuth, use a personal access token
Create a GitHub personal access token with only the access the client needs and send it as a bearer token in the Authorization header. Keep the token in an environment variable or secret store, not in shared configuration. GitHub says any host that supports remote MCP servers should work with a token.
- If you use a personal access token: Authorization
- GitHub Enterprise Cloud with data residency: use your tenant's endpoint
On a ghe.com tenant, connect to your tenant's Copilot API host instead (for example copilot-api.<your-subdomain>.ghe.com/mcp) with a personal access token. For OAuth in VS Code, point VS Code's GitHub Enterprise settings at your instance.
- List the server's tools
Your client should list the server's tools. That confirms the connection, not every API permission.
What we observed
- 5 Nov 2026: HTTP 401 with WWW-Authenticate resource_metadata https://api.githubcopilot.com/.well-known/oauth-protected-resource/mcp/, which names the authorization server https://github.com/login/oauth and scopes including repo, read:org and read:user.
GitHub MCP questions
What is the GitHub MCP server URL?
The official GitHub MCP server is at https://api.githubcopilot.com/mcp/ and uses the Streamable HTTP transport.
How do I authenticate with the GitHub MCP server?
Sign in with OAuth when your client prompts you. If your client can't use GitHub OAuth, use a personal access token: Create a GitHub personal access token with only the access the client needs and send it as a bearer token in the Authorization header. Keep the token in an environment variable or secret store, not in shared configuration. GitHub says any host that supports remote MCP servers should work with a token.
Which AI clients can use the GitHub MCP server?
GitHub's documentation covers VS Code, Claude Code, Cursor, Codex and Windsurf. Other clients that support remote Streamable HTTP MCP servers may also work.
What do I need before connecting GitHub MCP?
A GitHub account. GitHub Enterprise Cloud can use the remote server; GitHub Enterprise Server doesn't support it, so use the local server there. Any applicable GitHub MCP policies must be enabled for your account, organization or enterprise. If the connection is refused, ask an administrator to check the policies. An MCP host with remote server support, such as VS Code 1.101 or later. OAuth works only in hosts that have registered a GitHub App or OAuth App; other hosts need a personal access token.
Has this GitHub MCP guide been tested?
GitHub's documentation was reviewed on 2026-11-05. It is not a tested connection; your account and permissions decide which tools work.
Sources and review
GitHub's documentation was checked on the dates shown. This guide follows the MCP Connect connection-guide draft, bound to the exact Registry record it describes. It is not a tested connection: your account and permissions decide which tools work.
Guide source and binding
MCP connection guide (draft 0.1) for io.github.github/github-mcp-server 2.1.0, bound to /remotes/0 of the Registry record by SHA-256 bf9d7f52b2fc….
- github.com/github/github-mcp-server · checked 5 Nov 2026
- github.com/github/github-mcp-server/blob/main/docs/remote-server.md · checked 5 Nov 2026
- github.com/github/github-mcp-server/blob/main/docs/installation-guides/install-claude.md · checked 5 Nov 2026
- github.com/github/github-mcp-server/blob/main/docs/policies-and-governance.md · checked 5 Nov 2026
- registry.modelcontextprotocol.io/v0.1/servers/io.github.github%2Fgithub-mcp-server/versions/2.1.0 · checked 5 Nov 2026
- modelcontextprotocol.io/specification/2026-07-28/basic/authorization · checked 5 Nov 2026