Skip to content

Test: GitHub MCP Server built-in to Copilot Chat #279705

@TylerLeonhardt

Description

@TylerLeonhardt

refs: #254836

Complexity: 4

Create Issue


Some Context

This iteration we brought the GitHub Remote MCP Server definition into the Copilot Chat extension. This is nice because:

  • There are features of Copilot like Copilot CLI & Copilot Cloud Agent that already leverage GH MCP built-in and they depend on it... but it's not available in VS Code's agent mode unless you manually install it there. Good for alignment and consistency as you delegate to other agents.
  • we can re-use auth state so that the user doesn't have to see another auth prompt by adding GH MCP
  • we can support Proxima (and other GH MCP skus) in a completely transparent way rather than the user having to manually configure which endpoint to use.

It's not quite ready to be enabled by default, read the known issues section below, but you can enable it on-demand and give it a try in its current state.

Prereq

First things first, enable the MCP Server:

"github.copilot.chat.githubMcpServer.enabled": true

Doing this, the GitHub MCP Server should automatically be enabled and checked in the tool picker in Agent mode.

Base case

Go ahead and ask it a question about issues in the repo or something.

If you have already done "big auth" which happens when you sign in to:

  • GH PR
  • GH Repos
  • GH built-in "push" extension
  • Copilot features that require/ask it like Copilot Cloud Agent, codesearch

You will notice that GH MCP "just works". No additional auth flow.

If you haven't done that "big auth" and instead did only "small auth" like:

  • Signing in to Settings Sync
  • Signing in to Copilot Chat for the first time

You will get an auth prompt for the "big auth", which is required for GH MCP since it wants details about your repo, etc. Subsequent reloads will not ask you for auth anymore.

Speaking of auth, if you sign out, the GH MCP Server connection should be closed (MCP: List Servers)... and when you sign in again, it should kick back in.

This is the simple case.

Additional things to try

GitHub MCP Configuration

GitHub MCP has a way to configure what tools comeback and also the behavior of the tools. When you manually installed GH MCP, the only way to really do this was to either modify the URL of the server or add certain headers in the headers section of the MCP Server config. We've abstracted away that detail by providing VS Code settings. There are 3 of them:

Note, there's already an issue I opened on "extending" MCP Servers... which could solve this same problem by allowing users to just configure the headers directly for this server (and prevent us from being out of sync with GitHub should they ever change it... ie changing "toolsets" to be called "toolgroups" or whatever).

Step-up auth (skip for now as this is not lit up yet)

The GitHub MCP Server support step up auth... meaning if it is given an auth token that is not good enough, then it will respond in a well-defined OAuth-y way that VS Code is able to handle. When this happens, you'll see an auth prompt.

The best way to get this to trigger is to:

  • add the orgs toolset
  • ask something that uses an org tool

When you do this, VS Code will ask you to re-auth and the tool call should then go through.

Important to note that re-authing is pretty rare. The vast majority of GH MCP tools will be satisfied with the "big auth" I referred to before. However, there are some that are not and that's what this flow is for.

Known issues

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions