Skip to content

OAuth Flow not working for Atlassian MCP and Github MCP #842

@Julian-Schaefer

Description

@Julian-Schaefer

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:

  1. Clone the csharp-sdk Repo
  2. Execute the "ProtectedClient" Repo and set the serverurl to var serverUrl = "https://api.githubcopilot.com/mcp/";
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions