新闻

langchain-ai/langchain langchain==1.4.0a2

1 分钟阅读
Alpha preview of `langchain.mcp` — a first-party adapter that turns any MCP server into LangChain tools you can hand straight to `create_agent`. Connection handling is [FastMCP](https://gofastmcp.com/clients/client)'s, so its client features are available as-is rather than re-implemented behind a narrower interface. ```bash pip install "langchain[mcp]==1.4.0a2" ``` ## Connect `MCPAdapter` takes any target `fastmcp.Client` accepts — transport is inferred, so there is one entry point rather than one per protocol. ```python from langchain.agents import create_agent from langchain.mcp import MCPAd