Copilot appears to not use github mcp server
Describe the bug
Even when prompted, copilot cli appears unable to use its built-in github mcp server and instead defaults to using gh on the command line.
Affected version
0.0.325 Commit: 16ceace
Steps to reproduce the behavior
- Open a branch you want copilot to make changes on. I'm commonly using it to address simple feedback on a PR.
- Ask copilot to address feedback and paste a link to a github PR.
Expected behavior
Copilot uses its built-in MCP server to retrieve information about the PR, as it did in earlier versions.
What I get now is prompts to authorize it using gh on the command line to retrieve the information. When prompted to use its MCP server, I get output ranging from other, random command lines to denials that has a tool available for this:
│ > Remember to use your MCP server │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
● I understand you want me to use the MCP server for GitHub interactions, but I
don't see any MCP server tools available in my function list. The available
tools I have are:
* bash - for running bash commands
* write_bash - for sending input to bash sessions
* read_bash - for reading bash output
* stop_bash - for stopping bash commands
* str_replace_editor - for file editing
Additional context
No response
Hey, 0.0.325 is pretty old with us releasing every day. Would you mind trying again? I can't reproduce this.
Well, good news, 0.0.340 doesn't repro this problem immediately. Bad news, it's because nothing is working at all:
LGTM! 😅
If you run copilot --log-level all and grab your session id from /session slash command, then you can check your logs in ~/.copilot/logs/<session_id>.log and see what the underlying error is here.
2025-10-14T16:04:45.209Z [INFO] Starting Copilot CLI: 0.0.340
Commit: fac8111
2025-10-14T16:04:45.210Z [INFO] Node.js version: v22.19.0
2025-10-14T16:04:45.572Z [LOG] Using Copilot API endpoint: https://api.individual.githubcopilot.com/mcp/readonly
2025-10-14T16:04:45.573Z [LOG] Starting remote MCP client for github-mcp-server with url: https://api.individual.githubcopilot.com/mcp/readonly
2025-10-14T16:04:45.573Z [LOG] Creating MCP client for github-mcp-server...
2025-10-14T16:04:45.575Z [LOG] Connecting MCP client for github-mcp-server...
2025-10-14T16:04:46.109Z [LOG] MCP transport for github-mcp-server closed
2025-10-14T16:04:46.110Z [ERROR] Failed to start MCP client for remote server github-mcp-server: TypeError: fetch failed
2025-10-14T16:04:46.110Z [LOG] GitHub MCP server configured after authentication
2025-10-14T16:04:46.393Z [DEBUG] Creating copilot-client for integration ID copilot-developer-cli with token authentication. User-agent: copilot/0.0.340 (linux v22.19.0) OpenAI/5.20.1
2025-10-14T16:04:46.801Z [ERROR] Failed to list models:
2025-10-14T16:06:31.788Z [LOG] Using Copilot API endpoint: https://api.individual.githubcopilot.com/mcp/readonly
2025-10-14T16:06:31.788Z [LOG] Starting remote MCP client for github-mcp-server with url: https://api.individual.githubcopilot.com/mcp/readonly
2025-10-14T16:06:31.788Z [LOG] Creating MCP client for github-mcp-server...
2025-10-14T16:06:31.789Z [LOG] Connecting MCP client for github-mcp-server...
2025-10-14T16:06:31.994Z [LOG] MCP transport for github-mcp-server closed
2025-10-14T16:06:31.994Z [ERROR] Failed to start MCP client for remote server github-mcp-server: TypeError: fetch failed
2025-10-14T16:06:31.994Z [LOG] GitHub MCP server configured after authentication
2025-10-14T16:06:32.234Z [DEBUG] Creating copilot-client for integration ID copilot-developer-cli with token authentication. User-agent: copilot/0.0.340 (linux v22.19.0) OpenAI/5.20.1
2025-10-14T16:06:32.615Z [ERROR] Failed to list models:
On a hunch, I tried re-logging in, under the assumption that the internal preview had a different key or something vs the public preview. No dice, the second set of errors are from after that.
Thanks, looks like it might be the same as https://github.com/github/copilot-cli/issues/116. Pretty unhelpful error message there, will merge something today to improve that.
@333fred can you try again and check the logs to see if there is any more info?
Sorry @williammartin, was out Thurs-Tues, so I just got around to this. Some more data this time:
2025-10-22T18:35:13.882Z [INFO] Starting Copilot CLI: 0.0.348
Commit: 946b5dc
2025-10-22T18:35:13.883Z [INFO] Node.js version: v22.19.0
2025-10-22T18:35:13.913Z [INFO] Login status unknown
2025-10-22T18:35:14.238Z [LOG] Using Copilot API endpoint: https://api.individual.githubcopilot.com/mcp/readonly
2025-10-22T18:35:14.239Z [LOG] Starting remote MCP client for github-mcp-server with url: https://api.individual.githubcopilot.com/mcp/readonly
2025-10-22T18:35:14.239Z [LOG] Creating MCP client for github-mcp-server...
2025-10-22T18:35:14.241Z [LOG] Connecting MCP client for github-mcp-server...
2025-10-22T18:35:14.707Z [LOG] MCP transport for github-mcp-server closed
2025-10-22T18:35:14.707Z [ERROR] Failed to start MCP client for remote server github-mcp-server: TypeError: fetch failed
2025-10-22T18:35:14.707Z [LOG] GitHub MCP server configured after authentication
2025-10-22T18:35:14.713Z [INFO] Logged in as user: 333fred
2025-10-22T18:35:14.942Z [DEBUG] Creating copilot-client for integration ID copilot-developer-cli with token authentication. User-agent: copilot/0.0.348 (linux v22.19.0) OpenAI/5.20.1
2025-10-22T18:35:15.278Z [ERROR] Failed to list models: 421 : Misdirected Request
2025-10-22T18:35:15.278Z [ERROR] Verify the authenticated user against subscription-based Copilot API endpoint used: https://api.individual.githubcopilot.com
@williammartin this is still happening, with 0.0.353. Any updates/suggestions?
Well,
2025-10-22T18:35:14.707Z [ERROR] Failed to start MCP client for remote server github-mcp-server: TypeError: fetch failed
Is the obvious culprit here, but it's not a very informative error again, sadly. I'll open a PR to get more information in there. Is it possible that you have a network proxy that might be rejecting requests to "https://api.individual.githubcopilot.com/mcp/readonly" ?
I'm somewhat sus that you are hitting api.individual.githubcopilot.com because seeing that you are a Microsoft employee, most of the time I would expect an enterprise member to end up at api.enterprise.githubcopilot.com. I think in some other issues we've seen problems getting the right endpoint with no obvious answer. In the meantime maybe you could try to hit those endpoints and see whether anything interesting pops up.