npm / @langchain/mcp-adapters
@langchain/mcp-adapters
What changed in @langchain/mcp-adapters 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-19.
20 breaking11 new APIs and options3 behavior and defaults1 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@langchain/mcp-adapters 235 changes
Breaking changes 20
MCP server and tool names are joined with a single underscore instead of two; the additionalToolNamePrefix separator remains unchanged.
Zod 4 validation rejects unknown or inapplicable options, conflicting transports, empty server maps, and setting both servers and mcpServers; loadMcpTools options are validated too.
Read server configuration from adapter.config.servers; the returned snapshot no longer has mcpServers, and changing it does not reconfigure the adapter.
This legacy connection option now requires mode legacy; automatic HTTP-to-SSE fallback in auto mode is limited to HTTP 404 and 405.
This setting no longer emits logs; use onConnectionError and per-server notification callbacks for diagnostics.
Duplicate names exposed across servers or repeated by one server now throw MCPClientError when server-name prefixing is disabled.
Modern MCP elicitation is enabled by default and pauses a run with a LangGraph interrupt when a tool requests user input; set elicitation false to opt out.
Now returns an SDK 2 client; SDK clients negotiate only the legacy protocol by default unless configured for automatic version negotiation.
A server-reported tool failure now returns a ToolMessage with status error for agent calls; direct invocation still throws ToolException.
Now surfaces server errors instead of returning an empty list and logging only under DEBUG.
Read structuredContent from this artifact entry; protocol metadata and structured output no longer appear in model-visible single-text-block content.
Use the new client package import when creating an SDK client yourself for loadMcpTools.
Images and audio now expose data and mimeType, while resource links become file blocks; update consumers of the former content fields.
Configure this notification callback on each server rather than at the adapter level.
Resource conversion no longer fetches URIs automatically; call readResource explicitly when you need to fetch a resource.
Throws on servers using the modern protocol; set the server's logLevel instead.
The type now describes SSE only; use StreamableHTTPConnection for HTTP or Connection for any transport.
Schemas now reach the model as declared by the server instead of being simplified by inlining or flattening schema constructs.
Tool names now include the server name by default, such as docs__search; update references or disable prefixing.
Remove this option; it is no longer supported.
New APIs and options 11
Accepts token providers as well as OAuth providers; a provider token takes precedence over a configured Authorization header once available.
Use refresh to refresh discovery or bypass to skip the cache; a failed refresh leaves previously returned tools usable.
Resume an interrupted LangGraph run with elicitation responses supplied inside a LangGraph Command.
Replaces getTools as the recommended API and returns a flat list of executable LangChain tools.
Replaces initializeConnections as the recommended API and groups tools by server.
Use MCPAdapter for new code; it replaces MultiServerMCPClient as the recommended adapter API.
Replaces ClientConfig as the recommended adapter configuration type.
Each server can negotiate independently; mode defaults to auto, or can require modern protocol or skip probing a known legacy server.
Use this server option to list URIs to watch on modern servers, which reject resources/subscribe.
Now exported so callers can identify authentication failures by walking an error's cause chain.
Set mode to auto when constructing an SDK 2 Client to negotiate with modern servers; its default negotiates only the legacy protocol.
Behavior and default changes 3
Await close to stop active discovery and pending reconnects and clear connections and caches; the adapter can be reused by discovering tools again.
Set to false to retain unprefixed tool names; duplicate names then cause listTools and getTools to throw MCPClientError.
Hooks now preserve ToolMessage and LangGraph Command results instead of flattening or rejecting them; hook state is typed unknown.
Fixes and other changes 1
After an HTTP-to-SSE fallback fails, the thrown MCPClientError now exposes the SSE attempt's SDK error as cause, allowing checks such as UnauthorizedError.isInstance(error.cause) to work.