Repository navigation
Copilot appears to not use github mcp server #268
Description
Activity
LGTM! 😅
If you run
copilot --log-level alland grab your session id from/sessionslash command, then you can check your logs in~/.copilot/logs/<session_id>.logand 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 #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 failedIs 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.combecause seeing that you are a Microsoft employee, most of the time I would expect an enterprise member to end up atapi.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.We've since made improvements both to logging and to using proper URL's for your Copilot SKU -- going to close this issue, @333fred please let us know if you're still encountering similar problems on the latest versions!


Describe the bug
Even when prompted, copilot cli appears unable to use its built-in github mcp server and instead defaults to using
ghon the command line.Affected version
0.0.325 Commit: 16ceace
Steps to reproduce the behavior
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
ghon 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:Additional context
No response