Skip to content

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

Description

@ari-luokkala

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions