File size: 333 Bytes
47bae79
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
from langchain_mcp_adapters.client import MultiServerMCPClient
import os

client = MultiServerMCPClient({
    "tavily_mcp": {
        "command": "npx",
        "args": ["-y", "tavily-mcp@latest"],
        "env": {"TAVILY_API_KEY": os.environ["TAVILY_API_KEY"]}
    }
    # Or use remote URL instead of local command...
})