代理框架
LangChain 1.4 Alpha Brings MCP Tool Adapters into the Core, Allowing Servers to Request Human Input Mid-Call
The new `langchain.mcp` provides a unified way to connect to one or multiple MCP servers and converts mid-execution tool prompts into resumable LangGraph interrupts. The interface remains in Alpha, with consecutive releases changing method names and elicitation behavior, so it is not yet suitable for stable production environments.

LangChain’s 1.4.0 Alpha series introduces the first-party `langchain.mcp` namespace, bringing MCP tool conversion—previously handled by a separate adapter package—into the main package. `MCPAdapter` can accept a remote URL, a local stdio process, an in-process server, a multi-server configuration, or an existing FastMCP client. The resulting tools can be passed directly to `create_agent`. This allows authentication, timeouts, progress reporting, and transport connections to remain managed by FastMCP, while LangChain focuses on converting tool objects and agent state.
The more technically significant change is elicitation. If an MCP tool requires a directory, an authorization choice, or other structured parameters while it is running, the server can request additional information from the user. LangChain represents such requests as LangGraph interrupts, pausing and saving the agent state before resuming after a human response is received. FastMCP documentation indicates that the protocol revision dated 2026-07-28 adopts an “input-required round”: the tool first ends the current round with a normal response, after which the client issues a new call containing the answer, rather than leaving a long-lived connection suspended.
The adapter layer can also aggregate multiple servers under a ClientGroup and store tool annotations, server identity, and the original `_meta` under `metadata["mcp"]`. Tool-list caching offers use, refresh, and bypass modes and can honor TTL hints supplied by the server. For large tool catalogs, this can reduce the latency caused by rediscovering tools on every turn.
However, this is not a stable release. Alpha 3 renamed `get_tools` to `list_tools`, while Alpha 4 immediately added fixes for FastMCP 4.0.1, multi-server elicitation, and negotiation between old and new protocol versions, while removing the elicitation flag that previously had to be specified manually. Users must install the package with `--pre` and include the `mcp` extra. At this stage, it is better suited to isolated testing. Before production deployment, teams should still verify idempotency after interrupts, duplicate tool calls, credential lifecycles, and whether metadata returned by servers could cross existing authorization boundaries.