Description
I am attempting to use GitHub's remote MCP server at https://api.githubcopilot.com/mcp/
During the OAuth discovery flow, it correctly grabs the resource metadata URL from the response header:
www-authenticate: Bearer error="invalid_request", error_description="No access token was provided in this request", resource_metadata="https://api.githubcopilot.com/.well-known/oauth-protected-resource/mcp"
However, the version of @modelcontextprotocol/sdk
currently in use has a bug where it rewrites this to https://api.githubcopilot.com/.well-known/oauth-protected-resource
and subsequently fails.
This has been fixed in the following commit: modelcontextprotocol/typescript-sdk@354318f
However, it looks like mcp-remote is configured with a custom version from here modelcontextprotocol/typescript-sdk#570
Could you either update that PR with the latest changes from main and update the version used here? (Ideally that other PR would just get merged, but you can take an intermediate step if thats going to take a while).