langchain==1.4.0a3
Mirrored from LangChain releases for archival readability. Support the source by reading on the original site.
- Notifications You must be signed in to change notification settings
- Fork 24.3k
langchain==1.4.0a3
Choose a tag to compare
Sorry, something went wrong.
Loading
Sorry, something went wrong.
No results found
Third alpha of the 1.4.0 line. This release focuses on the new langchain.mcp namespace for adapting MCP servers into LangChain tools.
langchain.mcp highlights
MCPAdapteradapts any targetfastmcp.Clientaccepts — a URL, a local script, an in-process server, anMCPConfignaming several servers, or a pre-built client — as well as a FastMCPClientGroupfor a fleet of servers behind one client.MCPAdapter.list_tools(*, cache_mode="use")discovers and adapts tools, with optional client-side response caching (SEP-2549):useserves a cached list within the server's TTL hint,refreshrepopulates it,bypassskips it.as_langchain_tool(tool, client, *, elicitation=None)converts a single MCP tool for callers managing their own client.- Tool metadata is grouped under an
mcpnamespace on each tool: the tool'sannotations(snake_case) and_metaundermetadata["mcp"]["tool"], and the serving server's identity undermetadata["mcp"]["server"]. elicitation="interrupt"surfaces a server's mid-call questions as LangGraph interrupts, so a human answers and the run resumes.
from langchain.agents import create_agent from langchain.mcp import MCPAdapter async with MCPAdapter("https://example.com/mcp") as adapter: agent = create_agent("anthropic:claude-sonnet-5", await adapter.list_tools())
Requires the mcp extra: pip install "langchain[mcp]" (and fastmcp>=4.0.0).
Install
pip install --pre "langchain==1.4.0a3"This is a pre-release; install with --pre.
Release notes curated with the assistance of an AI agent.
Assets
4
Loading
Discussion (0)
Sign in to join the discussion. Free account, 30 seconds — email code or GitHub.
Sign in →No comments yet. Sign in and be the first to say something.