copilot-cli ignores grant_types_supported and attempts authorization_code flow for client_credentials-only MCP servers
- 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
Hello. I am trying to set up an corporate MCP server in copilot. This MCP server is protected using an OAuth authorization server that advertises only client_credentials in `grant_types_supported`
Copilot-cli still attempts to initiate an interactive `authorization_code` flow instead.
Expected behavior:
copilot-cli should check [grant_types_supported] from the OAuth server metadata
If only client_credentials is listed, it should use that flow
It should NOT launch a browser for interactive auth
Actual behavior:
Launches a browser window for authorization code flow
This fails because the MCP server only permits client_credentials
Even when explicitly configured with "oauthGrantType": "client_credentials", oauthPublicClient": false, and "oauthClientId" in the config file as per https://docs.github.com/en/copilot/reference/copilot-cli-reference/cli-command-reference#headless-oauth-client_credentials-grant, the browser still launches
### Affected version
_No response_
### Steps to reproduce the behavior
_No response_
### Expected behavior
_No response_
### Additional context
_No response_
Guía de contribución
Línea de trabajo
Comienza en las rutas de configuración de OAuth y gestión de metadatos de copilot-cli, centrándote en grant_types_supported y en las opciones oauthGrantType, oauthPublicClient y oauthClientId. Reprodúcelo con un servidor MCP que anuncie únicamente client_credentials y, a continuación, verifica que la CLI seleccione el flujo compatible y no inicie un navegador.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- shell
- Área
- authentication, cli
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Tranquilo
- Claridad
- Bastante claro
- Aptitud para principiantes
- 48/100