Skip to content

github-mcp-server fails with "fetch failed" since 1.0.51 update #3455

Open

Description

@bartuszekj

Describe the bug

Since updating to 1.0.51 the built-in github-mcp-server fails to connect on Windows with "fetch failed". This was not present in any previous version. Logs confirm no github-mcp-server connection attempts existed before 1.0.51.

Affected version

GitHub Copilot CLI 1.0.51.

Steps to reproduce the behavior

  1. Run copilot on Windows with version 1.0.51
  2. Observe "Failed to connect to MCP server 'github-mcp-server'" on startup
  3. Run /mcp show github-mcp-server
  4. Observe:

MCP Server: github-mcp-server
Type: http
URL: https://api.business.githubcopilot.com/mcp/readonly
Status: ✗ Failed
Error: fetch failed
Tools: Server failed to connect

Log shows:
2026-05-21T15:42:09.074Z [ERROR] Starting remote MCP client for github-mcp-server with url: https://api.business.githubcopilot.com/mcp/readonly
2026-05-21T15:42:09.456Z [ERROR] MCP transport for github-mcp-server closed
2026-05-21T15:42:09.457Z [ERROR] Failed to start MCP client for remote server github-mcp-server: TypeError: fetch failed

Expected behavior

github-mcp-server connects successfully

Additional context

  • curl to https://api.business.githubcopilot.com/mcp/readonly returns 401 (expected, endpoint reachable)
  • node fetch to same endpoint returns 401 (expected, Node.js networking works)
  • node --use-system-ca fetch returns 401 (expected, no SSL inspection issue)
  • Fresh login via copilot login performed, credential confirmed in Windows Credential Manager
  • No corporate proxy environment variables set
  • Previous logs (1.0.40, May 12-20) show no github-mcp-server connection attempts at all
  • Issue began when 1.0.51 binary was installed

Windows (win32-x64)
Node.js v24.14.0

Potential regression for #2282 ?

Activity

  1. added theissue type on May 21, 2026
  2. added
    area:mcpMCP server configuration, discovery, connectivity, OAuth, policy, and registry
    area:platform-windowsWindows-specific: PowerShell, cmd, Git Bash, WSL, Windows Terminal
    area:networkingProxy, SSL/TLS, certificates, corporate environments, and connectivity issues
    on May 21, 2026
  3. melscoop commented on Jun 12, 2026

    @melscoop

    👋 Another report of this - experiencing an issue with GitHub Copilot CLI 1.0.60 (latest) where the built-in GitHub MCP server github-mcp-server fails to initialize.

    Running /mcp show github-mcp-server consistently reports:

    Status: Failed
    Error: fetch failed
    

    Reauthentication attempts also fail with:

    MCPOAuthError: Failed to discover authorization server metadata
    

    However, manual validation confirms that network connectivity, TLS, OAuth metadata discovery, and authenticated MCP requests are all working outside of Copilot CLI. This suggests the failure is specific to Copilot CLI MCP initialization or OAuth handling, rather than a customer network, certificate, proxy, VPN, or account issue.

    Environment

    • GitHub Copilot CLI: 1.0.60
    • GitHub CLI: latest confirmed installed
    • Third-party MCP servers: working
    • Built-in github-mcp-server: failing consistently

    Troubleshooting performed

    Network and TLS validation

    The following checks succeeded:

    • curl https://api.githubcopilot.com/_ping
    • curl -vI https://api.business.githubcopilot.com/mcp/readonly

    The unauthenticated MCP request returned 401 as expected.

    Additional validation:

    • TLS handshake succeeds.
    • Certificate validation succeeds using the system trust store.
    • No proxy-related environment variables are present.
    • Issue reproduces both with and without the company VPN.

    OAuth metadata validation

    The OAuth protected resource metadata endpoint succeeds:

    curl https://api.githubcopilot.com/.well-known/oauth-protected-resource/mcp/readonly

    Result:

    • HTTP 200
    • Valid OAuth metadata returned

    Authenticated MCP validation

    The customer retrieved a token using:

    gh auth token

    They then performed an authenticated MCP initialize request directly against the GitHub Copilot MCP endpoint:

    curl -N -v 'https://api.githubcopilot.com/mcp/readonly' \
      --header 'Content-Type: application/json' \
      --header 'Accept: application/json, text/event-stream' \
      --header 'Authorization: Bearer <token>' \
      --data '{
        "jsonrpc": "2.0",
        "id": 1,
        "method": "initialize",
        "params": {
          "capabilities": {},
          "clientInfo": {
            "name": "torc-mcp-cli-debug",
            "version": "0.0.1"
          }
        }
      }'

    Result:

    • HTTP 200
    • MCP session created successfully
    • Server returned a valid JSON-RPC response
    • Response included capabilities and serverInfo
    • Server identified itself as github-mcp-server

    Relevant response details:

    {
      "jsonrpc": "2.0",
      "id": 1,
      "result": {
        "capabilities": {
          "completions": {},
          "prompts": {},
          "resources": {},
          "tools": {}
        },
        "protocolVersion": "2025-11-25",
        "serverInfo": {
          "name": "github-mcp-server",
          "title": "GitHub MCP Server",
          "version": "github-mcp-server/remote-020eb95790f7c817b0dd5bc3675b3d7ec88fbf0f"
        }
      }
    }

    CLI state validation

    The customer performed the following without resolving the issue:

    • Logged out and fully reauthenticated multiple times.
    • Ran /mcp reload repeatedly.
    • Confirmed third-party MCP servers continue to work.
    • Confirmed latest GitHub CLI and Copilot CLI versions are installed.

    Summary

    Manual testing confirms the GitHub Copilot MCP endpoint is reachable and functional from the customer’s environment, including OAuth metadata discovery and authenticated MCP initialization.

    The failure appears isolated to GitHub Copilot CLI’s handling of the built-in github-mcp-server, specifically during MCP initialization and/or OAuth metadata discovery.

    Requesting engineering investigation into Copilot CLI 1.0.60 behavior for built-in GitHub MCP server initialization, particularly around the fetch failed and MCPOAuthError: Failed to discover authorization server metadata errors.

  4. melscoop commented on Jun 19, 2026

    @melscoop

    FYI: This issue has been resolved for the client I'd mentioned above after updating to the latest Copilot CLI ☝️

  5. patniko commented on Oct 26, 2026

    @patniko
    Collaborator

    Thanks for the report. We've shipped fixes in this area since this was filed (most recently in Copilot CLI v1.0.71), and we believe this may now be resolved. Could you retest on the latest release (Copilot CLI v1.0.103) and let us know whether you still see it? If we don't hear back in a couple of weeks, we may close this issue — you can always reopen it.

    Triaged as part of a Copilot SDK backlog review, with help from GitHub Copilot.

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

    area:mcpMCP server configuration, discovery, connectivity, OAuth, policy, and registryarea:networkingProxy, SSL/TLS, certificates, corporate environments, and connectivity issuesarea:platform-windowsWindows-specific: PowerShell, cmd, Git Bash, WSL, Windows Terminalmore-info-needed

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions