Fix incorrect mcp method_name (#22736)
This commit is contained in:
@@ -69,7 +69,7 @@ class MCPClient:
|
||||
|
||||
parsed_url = urlparse(self.server_url)
|
||||
path = parsed_url.path or ""
|
||||
method_name = path.removesuffix("/").lower()
|
||||
method_name = path.rstrip("/").split("/")[-1] if path else ""
|
||||
if method_name in connection_methods:
|
||||
client_factory = connection_methods[method_name]
|
||||
self.connect_server(client_factory, method_name)
|
||||
|
Reference in New Issue
Block a user