The LangChain team has shipped a rapid sequence of alpha releases, culminating in langchain 1.4.0a4, with a major focus on native Model Context Protocol (MCP) support and a much more capable agent middleware system.
A new langchain.mcp namespace introduces the MCPAdapter, which lets LangChain agents connect to MCP servers built with FastMCP. The adapter now accepts a full ClientGroup as a target, requires FastMCP 4.0.0 or newer, and exposes tool metadata under an mcp namespace. It also supports answering MCP elicitation requests through LangGraph interrupts, enabling human-in-the-loop workflows without custom polling loops. The implementation was reworked across several alpha versions to simplify construction, rename methods like get_tools to list_tools, and gate interrupt routing on the negotiated protocol era.
Middleware received widespread hardening and new capabilities. New additions include ToolErrorMiddleware, ProviderToolSearchMiddleware, and ModelFallbackMiddleware, while existing pieces gained features such as custom token counters in ContextEditingMiddleware, a trace_policy on AgentMiddleware, and async support across many hooks. Notable fixes address retry behavior, human-in-the-loop approval gates, PII redaction, summarization triggers, tool-call limits, and shell session race conditions. The create_agent factory now supports dynamic tool registration, state updates from wrapped model calls, and improved response format handling.
Core improvements include standard model exception types, a new reasoning_effort chat model parameter, content-block-centric streaming v2, and model profile distribution across packages. OpenAI integration gained explicit prompt caching, server-side compaction support, and a built-in apply_patch tool. Numerous dependency bumps across the monorepo addressed security advisories and compatibility, including updates to cryptography, aiohttp, pygments, and other libraries.



