We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b103913 commit e2ff79cCopy full SHA for e2ff79c
template_langgraph/tools/mcp_tool.py
@@ -31,6 +31,7 @@ def __init__(
31
if settings is None:
32
settings = get_mcp_settings()
33
self.settings = settings
34
+ self.client = None
35
36
def get_tools(self) -> list[BaseTool]:
37
if self.settings.mcp_config_path == "":
@@ -39,6 +40,6 @@ def get_tools(self) -> list[BaseTool]:
39
40
config = json.load(f)
41
for _, value in config["servers"].items():
42
value["transport"] = "stdio"
- client = MultiServerMCPClient(config["servers"])
43
- tools = asyncio.run(client.get_tools())
44
- return tools
+ self.client = MultiServerMCPClient(config["servers"])
+ self.tools = asyncio.run(self.client.get_tools())
45
+ return self.tools
0 commit comments