-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
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
- include .vscode/mcp.json file in workspace/repo with github mcp configured as:
"github": { "type": "http", "url": "https://api.githubcopilot.com/mcp/" } - run copilot cli in the terminal in the workspace
- 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. /mcpshows:
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/mcpExpected 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