Drive MCP OAuth not attached: tools fail with 'missing required authentication credential' after successful reauth
- Linguagem predominante
- Shell
- Estrelas
- 11.2k
- Forks
- 1.9k
- Merge médio
- 14h 16min
- PRs com merge (30d)
- 6
Descrição
## Summary
Drive MCP in Copilot CLI connects successfully, OAuth browser flow reports success, and local OAuth cache files are created, but Drive tool calls still fail because requests are sent without auth credentials.
## Environment
- Copilot CLI: `1.0.63`
- Install method: Homebrew (up to date)
- OS: macOS (Darwin)
- Drive server URL: `https://drivemcp.googleapis.com/mcp/v1`
## Repro
1. Configure Drive MCP in `~/.copilot/mcp-config.json` with:
- `type: "http"`
- `url: "https://drivemcp.googleapis.com/mcp/v1"`
- `oauthClientId: `
- `oauthPublicClient: false`
2. Run `/mcp show` -> select `drive` -> reauth (`r`) and complete Google OAuth in browser (shows authentication success).
3. Call Drive tool (example): `drive-list_recent_files`.
## Expected
Drive tool call succeeds (or fails with a token/permissions error if account/scopes invalid).
## Actual
Drive tool call fails consistently with:
`Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential.`
## Diagnostics performed
- Verified Drive MCP config is loaded via:
- `copilot mcp list` (shows `drive (http)`)
- `copilot mcp get drive` (shows expected URL + source)
- Verified OAuth store artifacts exist under:
- `~/.copilot/mcp-oauth-config/` (including Drive JSON + secrets)
- `~/.copilot/config/mcp-oauth-config/` (compatibility mirror secrets)
- Verified complete runtime reset and reauth:
- removed session/runtime DB/state files, restarted CLI, reauth again
- issue persists identically
## Log evidence
From process log (`~/.copilot/logs/process-1781705105054-31431.log`):
- Drive client connects:
- `Starting remote MCP client for drive with url: https://drivemcp.googleapis.com/mcp/v1`
- `MCP client for drive connected`
- But Drive tool call fails with missing credential:
- `MCP client for drive errored: ... Request is missing required authentication credential ...`
Notably, the same log contains explicit auth success events for Atlassian, but no corresponding Drive auth success event, suggesting token handoff is not occurring for Drive.
## Impact
Drive MCP is unusable even after successful reauth and clean reset.
## Request
Please investigate Drive MCP OAuth token attachment/handoff for remote HTTP MCP servers using static OAuth client settings (`oauthClientId` + `oauthPublicClient: false`).
Guia de contribuição
Direção de pesquisa
Comece pela conexão MCP HTTP remota e pelo fluxo de reautenticação descritos na issue, usando ~/.copilot/mcp-config.json e os artefatos OAuth em ~/.copilot/mcp-oauth-config/ e ~/.copilot/config/mcp-oauth-config/. Compare as entradas de log do Drive em ~/.copilot/logs/process-1781705105054-31431.log com os eventos de autenticação bem-sucedidos do Atlassian. Está concluído quando as solicitações das ferramentas do Drive incluírem a credencial OAuth após a reautenticação.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Domínio
- api, authentication, cli
- Tipo de issue
- Bug
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Status de atividade
- Pouca atividade
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 45/100