github / github/copilot-cli

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

オープン
#3,838 コメント 7 件 リアクション 0 件 担当者 0 名 GitHub で見る
area:authentication area:mcp
主要言語
Shell
スター
11.2k
フォーク
1.9k
平均マージ
14時間 16分
マージ済み PR(30日)
6

説明

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

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Start with the remote HTTP MCP connection and reauthentication flow described in the issue, using ~/.copilot/mcp-config.json and the OAuth artifacts under ~/.copilot/mcp-oauth-config/ and ~/.copilot/config/mcp-oauth-config/. Compare the Drive log entries in ~/.copilot/logs/process-1781705105054-31431.log with the successful Atlassian auth events. Done means Drive tool requests include the OAuth credential after reauth.

索引モデルが issue の本文から書いたものです。

評価

領域
api, authentication, cli
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。