Fix incorrect mcp method_name (#22736)
This commit is contained in:
parent
308f1340dd
commit
29f0a9ab94
1 changed files with 1 additions and 1 deletions
|
|
@ -69,7 +69,7 @@ class MCPClient:
|
||||||
|
|
||||||
parsed_url = urlparse(self.server_url)
|
parsed_url = urlparse(self.server_url)
|
||||||
path = parsed_url.path or ""
|
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:
|
if method_name in connection_methods:
|
||||||
client_factory = connection_methods[method_name]
|
client_factory = connection_methods[method_name]
|
||||||
self.connect_server(client_factory, method_name)
|
self.connect_server(client_factory, method_name)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue