-
Notifications
You must be signed in to change notification settings - Fork 669
McpClientFactory.CreateAsync connecting to the Microsoft learn mcp server just hangs #784
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't workingneeds confirmationUnclear if still relevantUnclear if still relevant
Description
Describe the bug
Described in the title.
To Reproduce
Steps to reproduce the behavior:
- Code below using sse using the Microsoft learn mcp server was working and now the code just hangs, trying to configure a timeout doesn't seem to change anything.
Expected behavior
It was working last week and you'd get a response from the learn server. The issue is even if the mcp server is having issues, this shouldn't just cause an application hang.
"https://learn.microsoft.com/api/mcp
Additional context
Add any other context about the problem here.
` IMcpClient client;
// Step 4: Create appropriate transport client
if (transport.Equals("sse", StringComparison.OrdinalIgnoreCase))
{
this.ReportProgress($"🌐 Setting up SSE transport for {serverName}", "MCP-Provider");
var endpoint = section["Endpoint"] ?? throw new InvalidOperationException($"Endpoint required for '{serverName}'");
this.ReportProgress($"📡 Connecting to endpoint: {endpoint}", "MCP-Provider");
var sse = new SseClientTransport(new SseClientTransportOptions
{
Endpoint = new Uri(endpoint),
TransportMode = HttpTransportMode.AutoDetect,
Name = serverName
});
McpClientOptions options = new()
{
// You can set additional options here if needed
InitializationTimeout = TimeSpan.FromSeconds(30)
};
this.ReportProgress($"🔗 Creating MCP client connection...", "MCP-Provider");
client = await McpClientFactory.CreateAsync(sse, options, null, new CancellationToken()); < - This line of code hangs, the call is made and never returns and hangs if you run it. It was working last week and the source could be the Microsoft Learn MCP server, but whatever is going on, can't cause this call to just hang and never time out.
this.ReportProgress($"✅ SSE client connected successfully", "MCP-Provider");
}`
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingneeds confirmationUnclear if still relevantUnclear if still relevant