github / github/copilot-cli

Drive MCP OAuth not attached: tools fail with 'missing required authentication credential' after successful reauth

Ouverte
#3,838 7 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
area:authentication area:mcp
Langage dominant
Shell
Étoiles
11.2k
Forks
1.9k
Merge moyen
14 h 16 min
PR mergées (30 j)
6

Description

## 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`).

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.