Skip to content

Copilot appears to not use github mcp server #268

Description

@333fred

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

  1. Open a branch you want copilot to make changes on. I'm commonly using it to address simple feedback on a PR.
  2. 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

Activity

  1. added theissue type on Oct 10, 2025
  2. williammartin commented on Oct 13, 2025

    @williammartin

    Hey, 0.0.325 is pretty old with us releasing every day. Would you mind trying again? I can't reproduce this.

    Image
  3. 333fred commented on Oct 13, 2025

    @333fred
    Author

    Well, good news, 0.0.340 doesn't repro this problem immediately. Bad news, it's because nothing is working at all:

    Image
  4. williammartin commented on Oct 14, 2025

    @williammartin

    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.

  5. 333fred commented on Oct 14, 2025

    @333fred
    Author
    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.

  6. williammartin commented on Oct 15, 2025

    @williammartin

    Thanks, looks like it might be the same as #116. Pretty unhelpful error message there, will merge something today to improve that.

  7. williammartin commented on Oct 16, 2025

    @williammartin

    @333fred can you try again and check the logs to see if there is any more info?

  8. 333fred commented on Oct 22, 2025

    @333fred
    Author

    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
    
  9. 333fred commented on Oct 31, 2025

    @333fred
    Author

    @williammartin this is still happening, with 0.0.353. Any updates/suggestions?

  10. williammartin commented on Nov 3, 2025

    @williammartin

    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.

  11. RyanHecht commented on Feb 25, 2026

    @RyanHecht
    Collaborator

    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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions