Skip to content

conflicts between built-in and workspace github mcp server #1807

@cajetzer

Description

@cajetzer

Describe the bug

on startup, I am informed that github mcp server failed to connect, but upon more inquiry I see there are two, and one is operational - but I believe one failing forces copilot to default to using gh cli instead. this is not ideal and is causing confusion and is making github mcp unusable in this scenario.

Based on the official GitHub documentation: GitHub MCP Server Availability

  • Copilot CLI: GitHub MCP server ships built-in and connects automatically using your CLI login.
  • VS Code (and other IDEs): You must manually install the GitHub MCP server either MCP marketplace or by adding config to .vscode/mcp.json

So it will be a common setup that the .vscode/mcp.json config exists because VS Code still needs it - it's not built-in there. The problem is:

  • In VS Code: The config is needed and should work
  • In Copilot CLI: The config conflicts with the built-in server

Recommendation: Auto-detect and skip duplicate GitHub MCP configs by default with a way to override in case it is desired for some reason

Affected version

GitHub Copilot CLI 0.0.421-2

Steps to reproduce the behavior

  1. include .vscode/mcp.json file in workspace/repo with github mcp configured as:
    "github": { "type": "http", "url": "https://api.githubcopilot.com/mcp/" }
  2. run copilot cli in the terminal in the workspace
  3. upon startup, the following warning will always be seen, and copilot will revert to using gh cli instead of mcp
    ! Failed to connect to MCP server 'github'. Execute '/mcp show github' to inspect or check the logs.
  4. /mcp shows:
 MCP Servers

 No user-configured servers.

 Workspace:
 ❯ ✗ github             http   https://api.githubcopilot.com/mcp/

 Built-in:
   ✓ github-mcp-server  http   https://api.enterprise.githubcopilot.com/mcp/readonly
   ✓ ide                http   http://localhost/mcp

Expected behavior

github mcp server is built in so it will work without user configuration. this should account for existing user configuration due to needing it in other copilot surfaces and just work as expected.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions