The Agent_MCP_Server_Auth sample fails with the error:
ModelContextProtocol.McpException Message=Failed to handle unauthorized response with 'Bearer' scheme. The AuthorizationRedirectDelegate returned a null or empty authorization code.
This is caused by the trailing slash in the resource segment of the authorization URL: resource=http://localhost:7071/.
The same issue (modelcontextprotocol/csharp-sdk#1122) in the MCP repo has been recently fixed, but the fix has not been released yet. Update AF to the latest (>0.8.0-preview.1) MCP package when it is released.
The Agent_MCP_Server_Auth sample fails with the error:
This is caused by the trailing slash in the resource segment of the authorization URL:
resource=http://localhost:7071/.The same issue (modelcontextprotocol/csharp-sdk#1122) in the MCP repo has been recently fixed, but the fix has not been released yet. Update AF to the latest (>0.8.0-preview.1) MCP package when it is released.