mcp-hub for LangChain
io.github.ni-c/mcp-hub
Many stdio MCP servers from one container, published over HTTPS with OAuth 2.1 for any MCP client
client:LangChain
transport:stdio
runtime:npm
Install mcp-hub in LangChain
pip install langchain-mcp-adapters
from langchain_mcp_adapters.client import MultiServerMCPClient
client = MultiServerMCPClient({
"mcp-hub": {
"transport": "stdio",
"command": "npx",
"args": ["-y", "@ni-c/mcp-hub"],
}
})
tools = await client.get_tools()
get_tools() returns the server's tools as LangChain tools, ready for an agent. LangChain docs