You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MCP OAuth: authorize request sends resource with a trailing slash that differs from the resource #5337
For a remote HTTP MCP server configured with a bare-origin URL, the OAuth authorize request carries resource=https://mcp.example.com/ (trailing slash). The server's protected-resource metadata advertises "resource": "https://mcp.example.com" (no slash). The authorization server compares resource indicators exactly, so it rejects the request and the browser lands on its error page. The sign-in never starts.
The CLI seems to re-serialize the configured URL, where an empty path becomes /, instead of using the PRM resource value as published. I haven't confirmed the cause in the source.
Affected version
GitHub Copilot CLI 1.0.105 and 1.0.106-2 (prerelease), macOS arm64
The authorization server rejects it with: Invalid resource identifier "https://mcp.example.com/". It is either not found, not enabled, or does not support any of the requested scopes. The redirect_uri, scope and client all validate. Only the trailing slash differs.
The CLI reports only MCP OAuth authorization failed.
Expected behavior
The resource parameter should be the PRM resource value exactly as published (RFC 9728 §3, RFC 8707 §2). Resource identifiers are absolute URIs compared as-is, so the CLI should not alter them. Other MCP clients, such as VS Code, send the PRM value without the slash and work against the same server.
Workaround
None in config. The per-server OAuth fields (oauthClientId, oauthPublicClient, oauthGrantType, oauthScopes) don't control resource.
Additional context
The CLI log shows a 401 challenge with resource_metadata and then MCP OAuth authorization failed. It does not log the authorize URL.
changed the title [-]MCP OAuth: authorize request sends resource with a trailing slash that differs from the PRM resource[/-][+]MCP OAuth: authorize request sends resource with a trailing slash that differs from the resource[/+]on Nov 2, 2026
Activity
[-]MCP OAuth: authorize request sends resource with a trailing slash that differs from the PRM resource[/-][+]MCP OAuth: authorize request sends resource with a trailing slash that differs from the resource[/+]vinayakapai-sf commentedon Nov 3, 2026
Hi, I see the triage label was removed, Is there an update on its status or next steps? Thanks.