github / github/copilot-cli

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

Open
#3,838 7 comments 0 reactions 0 assignees View on GitHub
area:authentication area:mcp
Dominant language
Shell
Stars
11.2k
Forks
1.9k
Avg merge
14h 16m
Merged PRs (30d)
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`).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.