github / github/copilot-cli

MCP OAuth intermittently fails on Windows with socket error 10013

Abierto
#4,463 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

area:authentication area:mcp area:platform-windows
Lenguaje dominante
Shell
Estrellas
11.2k
Forks
1.9k
Merge medio
14 h 16 min
PR fusionados (30 d)
6

Descripción

Describe the bug

OAuth authentication for a remote HTTP MCP server intermittently fails before the browser authorization flow opens.

OAuth authentication failed: MCPOAuthError: An attempt was made to 
access a socket in a way forbidden by its access permissions. (os error 10013)
Affected version

1.0.79

Steps to reproduce the behavior
  1. Configure an OAuth-enabled remote HTTP MCP server without specifying auth.redirectPort.
  2. Start a new Copilot CLI session.
  3. Run /mcp auth <server-name>.
  4. Authentication may fail while creating the local OAuth callback listener.
Expected behavior

Copilot CLI should select an available callback port. If binding fails, it should retry using another port and report the attempted port if all retries fail.

Additional context
Workaround

Pinning a known-available port and restarting Copilot CLI allowed authentication to complete:

"auth": {
  "redirectPort": 47000
}

The problem is intermittent. Authentication later worked without the override, possibly because credentials were cached or automatic port selection chose a usable port.

Environment
  • Copilot CLI: 1.0.79
  • Package: 1.0.79-9
  • OS: Windows x64

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza con el flujo de /mcp auth y el manejo de auth.redirectPort que crea el listener local de callback de OAuth; reproduce el fallo en Windows usando un servidor MCP HTTP remoto con OAuth habilitado y sin sobrescritura de puerto. Se considera terminado cuando la selección automática de puerto vuelve a intentarlo después de un fallo de bind e informa del puerto intentado si todos los reintentos fallan.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Área
authentication, cli, networking
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Tranquilo
Claridad
Bastante claro
Aptitud para principiantes
67/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.