github / github/copilot-cli

MCP OAuth 3LO (Authorization Code) fails with MCP error -32042: This request requires more information.

未关闭
#4,371 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

area:authentication area:mcp
主要语言
Shell
星标
11.2k
派生
1.9k
平均合并
14 小时 16 分钟
30 天内合并 PR
6

描述

Describe the bug

When connecting to an MCP Gateway that has targets configured with OAuth 3LO (Authorization Code grant), tool invocations fail with error -32042 because the client does not support URL elicitation required for the OAuth 3LO flow.

Client should show user URL to authenticate.

Affected version

GitHub Copilot CLI 1.0.78

Steps to reproduce the behavior
  1. Configure an MCP server target with OAuth 3LO (Authorization Code grant) authentication
  2. Connect GitHub Copilot CLI to an MCP gateway that includes this target
  3. Invoke any tool from the OAuth 3LO protected target

In this case AWS Bedrock AgentCore GW with MCP protocol version 2025-11-25 was used.
Correct behaviour has been verified with MCP inspector tool.

Expected behavior

Handle URLElicitationRequiredError (-32042) responses by presenting the elicitation URL to the user and allow the user to complete the OAuth flow in a browser.

Additional context

No response

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

按照 issue 中的描述,使用 OAuth 3LO 的 MCP 网关目标复现该故障,并调用一个受保护的工具。首先跟踪 CLI 如何处理 -32042 URLElicitationRequiredError 响应;当客户端呈现 elicitation URL,让用户在浏览器中完成身份验证,然后允许继续调用工具时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
aws
领域
authentication, cli
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
50/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。