-
Notifications
You must be signed in to change notification settings - Fork 545
Description
Describe the bug
The OAuth flow does not work for both Atlassian MCP and Github MCP when using the C# SDK. After initiating the authentication process, the redirect or token exchange does not complete successfully, resulting in authentication failure. It throws an error:
throw new McpException($"Failed to find .well-known/openid-configuration or .well-known/oauth-authorization-server metadata for authorization server: '{authServerUri}'");
Error Message is as follows:
ModelContextProtocol.McpException: 'Failed to find .well-known/openid-configuration or .well-known/oauth-authorization-server metadata for authorization server: 'https://github.com/login/oauth/''
To Reproduce
Steps to reproduce the behavior:
- Clone the csharp-sdk Repo
- Execute the "ProtectedClient" Repo and set the serverurl to
var serverUrl = "https://api.githubcopilot.com/mcp/";
- Error is thrown, no OAuth flow gets initiated
Expected behavior
I expected it to launch an authorization URL that I can use to authenticate against Github or Atlassian, just like it works with FastMCP.