add default transport
This commit is contained in:
parent
9c3715d9b0
commit
66b816c3b2
@ -27,8 +27,8 @@ async def init_agent(model_name="qwen3-next", api_key=None,
|
||||
if mcp and "mcpServers" in mcp[0]:
|
||||
for cfg in mcp[0]["mcpServers"].values():
|
||||
if "type" in cfg:
|
||||
cfg["transport"] = cfg.pop("type")
|
||||
elif "transport" not in cfg:
|
||||
cfg.pop("type")
|
||||
if "transport" not in cfg:
|
||||
cfg["transport"] = "http" if "url" in cfg else "stdio"
|
||||
|
||||
mcp_client = MultiServerMCPClient(mcp[0]["mcpServers"])
|
||||
|
||||
Loading…
Reference in New Issue
Block a user