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 authwithcopilotscope - Re-adding the MCP with correct flags
- Using
/mcpdialog to reconnect
Steps to reproduce
- Have a working GitHub MCP:
claude mcp add github -s user --transport http https://api.githubcopilot.com/mcp - Remove it:
claude mcp remove github -s user - Re-add it:
claude mcp add github -s user --transport http https://api.githubcopilot.com/mcp - Restart Claude Code
claude mcp listshows: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
copilotscope - Transport: HTTP
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗