LangChain
The MCP adapters, turning the six tools into LangChain tools.
Kind Framework
Transport langchain-mcp-adapters, streamable HTTP.
Config —
Setup
- pip install langchain-mcp-adapters langgraph
- Construct a MultiServerMCPClient pointing at the endpoint.
- Await get_tools() and hand them to an agent.
import os, asyncio
from langchain_mcp_adapters.client import MultiServerMCPClient
from langgraph.prebuilt import create_react_agent
async def main():
client = MultiServerMCPClient({
"unzoi": {
"transport": "streamable_http",
"url": "https://api.unzoi.com/mcp",
"headers": {"x-api-key": os.environ["UNZOI_KEY"]},
}
})
tools = await client.get_tools()
agent = create_react_agent("anthropic:claude-sonnet-5", tools)
result = await agent.ainvoke({
"messages": [{"role": "user", "content": "What happened with port congestion this week?"}]
})
print(result["messages"][-1].content)
asyncio.run(main())What differs here
- get_tools() is one round trip and the result is static. Call it at startup, not per request.
- The tools arrive with their MCP descriptions intact, which is most of why the model picks between them sensibly — do not overwrite them with shorter ones.
- A ReAct agent will happily loop. Cap its steps, or it will spend a monthly quota exploring.
Next
- Get a key at console.unzoi.com, if you have not.
- The tool reference — what the model is reading when it chooses between the six tools.
- Stories for context windows — the one habit that most changes how well an agent works against this API.
- Limits — an agent that loops can spend a monthly quota faster than you expect.
- LangChain's own MCP documentation — authoritative for anything about the client itself, including config paths, which move.
Endpoint, for copying: https://api.unzoi.com/mcp