# 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.

- Endpoint: https://api.githubcopilot.com/mcp/
- Transport: Streamable HTTP
- Registry: io.github.github/github-mcp-server 2.1.0
- Publisher documentation reviewed: 2026-11-05 (not a tested connection)
- Guide page: https://apitracker.io/mcp-guides/github-mcp

## 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.
- 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.

## Steps

1. **Open GitHub's remote MCP server instructions** <https://github.com/github/github-mcp-server>
2. **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.
3. **Sign in to GitHub and approve access in the OAuth window**
4. **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.
5. **If you use a personal access token: Authorization**
6. **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.
7. **List the server's tools**

## 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

- https://github.com/github/github-mcp-server (checked 2026-11-05)
- https://github.com/github/github-mcp-server/blob/main/docs/remote-server.md (checked 2026-11-05)
- https://github.com/github/github-mcp-server/blob/main/docs/installation-guides/install-claude.md (checked 2026-11-05)
- https://github.com/github/github-mcp-server/blob/main/docs/policies-and-governance.md (checked 2026-11-05)
- https://registry.modelcontextprotocol.io/v0.1/servers/io.github.github%2Fgithub-mcp-server/versions/2.1.0 (checked 2026-11-05)
- https://modelcontextprotocol.io/specification/2026-07-28/basic/authorization (checked 2026-11-05)

Guide JSON: https://github.com/apideck-libraries/mcp-connect/blob/626f6a146170ded34891b30dca3af26f09e07466/proposals/connection-guide/0.1/reviewed/guides/github-mcp.json
