{
"issuer": "https://github.com/login/oauth",
"authorization_endpoint": "https://github.com/login/oauth/authorize",
"token_endpoint": "https://github.com/login/oauth/access_token",
"response_types_supported": ["code"],
"grant_types_supported": ["authorization_code"],
"service_documentation": "https://docs.github.com/apps/creating-github-apps/registering-a-github-app/registering-a-github-app",
"code_challenge_methods_supported": ["S256"]
}
Summary
Details
I have seen #269593 and #255465. I can't really tell what the resolution was for those; the tickets just seemed to get closed after some discussion without an explanation for what the plan was. Regardless, I am testing on the current VSCode and I still see some problems.
VSCode does not use the RFC8414-prescribed https://myhost/.well-known/oauth-protected-resource/path/to/mcp in order to ascertain the Authorization servers for the MCP server at https://myhost/path/to/mcp . It should. That is the prescribed way to discover the issuer endpoints for authorization and token redemption.
Let's consider the example of https://api.githubcopilot.com/mcp . Per the 06-18 MCP spec, for the MCP server at
https://api.githubcopilot.com/mcp, the client shouldhttps://github.com/login/oauth) and interjecting a.well-known/oauth-authorization-serverin the left-most path position, resulting inhttps://github.com/.well-known/oauth-authorization-server/login/oauth./authorizeURL starting from theauthorize_endpointshown there.INSTEAD of following that path, Vscode appears to perform a GET on
https://myhost/.well-known/oauth-authorization-serverThis seems wrong . (BTW, In the case of Github MCP Server, that URL (https://api.githubcopilot.com/.well-known/oauth-authorization-server) returns 404, as I think it should. ) VSCode may be doing this to accommodate backwards-compatibility with an old, poorly conceived version of the MCP spec. But in my experience when that URL returns 404, VSCode does not then tryhttps://myhost/.well-known/oauth-protected-resource/path/to/mcp. I have never been able to get VSCode to use that URL.In fact the order of preference should be the other way. It should use the oauth-protected-resource URL FIRST, and then fallback to the URL for the old, ill-designed pattern (pre 06-18). It makes no sense for the MCP Server to know all the things that are supposed to be in the oauth-authorization-server metadata. That information is owned by and managed by the Authorization server. The best the MCP Server will know is what the issuer is. That's what it returns in the oauth-protected-resource response.
When connecting to an MCP Server that requires OAuth, there is no way for a configuration to specify an audience for the token. When that happens, some Identity Providers do not issue appropriate tokens.
If I set up an MCP server and then manually copy/paste in the client ID and Secret when prompted, that client ID +secret pair seems to be re-used for every MCP server. If I change the configuration for global MCP Servers and provide a new name, but keep the same MCP URL endpoint, the old client ID and Secret is used, and it's not possible for me to update them or tell VSCode to forget them. It seems to me the cache should be (a) accessible so that I can clear it, and (b) keyed on the MCP Server NAME in the MCP.json file, and not on the URL, as I imagine it is.
Does this issue occur when all extensions are disabled?: Yes
Steps to Reproduce: