Fix incorrect mcp method_name (#22736)

This commit is contained in:
Will 2025-07-21 21:14:38 +08:00 committed by GitHub
parent 308f1340dd
commit 29f0a9ab94
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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)