fix: add RFC 9728 compliant well-known URL discovery with path insertion fallback (#29960)
This commit is contained in:
@@ -59,7 +59,7 @@ class MCPClient:
|
||||
try:
|
||||
logger.debug("Not supported method %s found in URL path, trying default 'mcp' method.", method_name)
|
||||
self.connect_server(sse_client, "sse")
|
||||
except MCPConnectionError:
|
||||
except (MCPConnectionError, ValueError):
|
||||
logger.debug("MCP connection failed with 'sse', falling back to 'mcp' method.")
|
||||
self.connect_server(streamablehttp_client, "mcp")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user