GitHub Copilot HTTP MCP server fails to reconnect after remove/re-add

Resolved 💬 3 comments Opened Mar 23, 2026 by marbaji Closed Mar 26, 2026

Description

The GitHub Copilot MCP server (https://api.githubcopilot.com/mcp) fails to connect after being removed and re-added via claude mcp remove / claude mcp add. The connection cannot be restored even after:

  • Restarting Claude Code multiple times
  • Refreshing gh auth with copilot scope
  • Re-adding the MCP with correct flags
  • Using /mcp dialog to reconnect

Steps to reproduce

  1. Have a working GitHub MCP: claude mcp add github -s user --transport http https://api.githubcopilot.com/mcp
  2. Remove it: claude mcp remove github -s user
  3. Re-add it: claude mcp add github -s user --transport http https://api.githubcopilot.com/mcp
  4. Restart Claude Code
  5. claude mcp list shows: github: https://api.githubcopilot.com/mcp (HTTP) - ✗ Failed to connect

Evidence the endpoint works

Direct MCP handshake via curl succeeds:

TOKEN=$(gh auth token)
curl -s -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -X POST \
  -d '{"jsonrpc":"2.0","method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"0.1"}},"id":1}' \
  https://api.githubcopilot.com/mcp

Returns a valid MCP initialize response with serverInfo.name: "github-mcp-server".

gh auth status confirms valid token with copilot scope.

Expected behavior

After removing and re-adding the MCP server, it should reconnect on next Claude Code restart, just as it did on initial setup.

Environment

  • Claude Code version: 2.1.79
  • Platform: macOS (Darwin 24.6.0)
  • gh CLI: authenticated with copilot scope
  • Transport: HTTP

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗