Skip to content

Connect GitHub MCP (remote) to VS Code

GitHub's hosted MCP server. Agents read code, issues and pull requests and open PRs with nothing to run on your machine, connecting with a personal access token.

MCP serverOfficialChecked 2026-11-16

Before you start

  • VS Code installed (see its MCP documentation (opens in a new tab)).
  • GitHub MCP (remote) is available on macOS, Windows, Linux and the web.
  • Create a fine-grained personal access token with only the repositories and permissions you need, and set it as GITHUB_PERSONAL_ACCESS_TOKEN in your environment. For read-only tools, end the URL with /readonly. GitHub Enterprise Server doesn't support the hosted server.
  1. Step 1: Add GitHub MCP (remote) to VS Code

    Add it to the workspace

    Add this to .vscode/mcp.json. It holds no token, so you can commit it to share it with your team.

    .vscode/mcp.json
    {
      "inputs": [
        {
          "type": "promptString",
          "id": "github-remote-token",
          "description": "Token for github-remote",
          "password": true
        }
      ],
      "servers": {
        "github-remote": {
          "type": "http",
          "url": "https://api.githubcopilot.com/mcp/",
          "headers": {
            "Authorization": "Bearer ${input:github-remote-token}"
          }
        }
      }
    }
    Good to know
    • VS Code asks for the token the first time the server starts and stores it for you, so the file holds no secret.
  2. Step 2: Check it's connected

    Run MCP: List Servers from the Command Palette, then open Copilot Chat in Agent mode and check the tools picker.

  3. Step 3: Try a first request

    Ask VS Code something that only works with GitHub MCP (remote) connected:

    Say to VS Code
    List the open issues in this repository that mention design and group them by label.

If it doesn't work

  • VS Code asks you to trust a server the first time it starts. Accept it, or the tools stay hidden.
  • code --add-mcp writes to your user profile, so the server works in every workspace.
  • Use MCP: List Servers → Show Output to see startup errors.