unstale

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

@unstale/cli on npm

@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.

    2.0.1release notes

  • Zod 4 validation rejects unknown or inapplicable options, conflicting transports, empty server maps, and setting both servers and mcpServers; loadMcpTools options are validated too.

    2.0.0release notes

  • Read server configuration from adapter.config.servers; the returned snapshot no longer has mcpServers, and changing it does not reconfigure the adapter.

    2.0.0release notes

  • This legacy connection option now requires mode legacy; automatic HTTP-to-SSE fallback in auto mode is limited to HTTP 404 and 405.

    2.0.0release notes

  • This setting no longer emits logs; use onConnectionError and per-server notification callbacks for diagnostics.

    2.0.0release notes

  • Duplicate names exposed across servers or repeated by one server now throw MCPClientError when server-name prefixing is disabled.

    2.0.0release notes

  • 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.

    2.0.0release notes

  • Now returns an SDK 2 client; SDK clients negotiate only the legacy protocol by default unless configured for automatic version negotiation.

    2.0.0release notes

  • A server-reported tool failure now returns a ToolMessage with status error for agent calls; direct invocation still throws ToolException.

    2.0.0release notes

  • Now surfaces server errors instead of returning an empty list and logging only under DEBUG.

    2.0.0release notes

  • Read structuredContent from this artifact entry; protocol metadata and structured output no longer appear in model-visible single-text-block content.

    2.0.0release notes

  • Use the new client package import when creating an SDK client yourself for loadMcpTools.

    2.0.0release notes

  • Images and audio now expose data and mimeType, while resource links become file blocks; update consumers of the former content fields.

    2.0.0release notes

  • Configure this notification callback on each server rather than at the adapter level.

    2.0.0release notes

  • Resource conversion no longer fetches URIs automatically; call readResource explicitly when you need to fetch a resource.

    2.0.0release notes

  • Throws on servers using the modern protocol; set the server's logLevel instead.

    2.0.0release notes

  • The type now describes SSE only; use StreamableHTTPConnection for HTTP or Connection for any transport.

    2.0.0release notes

  • Schemas now reach the model as declared by the server instead of being simplified by inlining or flattening schema constructs.

    2.0.0release notes

  • Tool names now include the server name by default, such as docs__search; update references or disable prefixing.

    2.0.0release notes

  • Remove this option; it is no longer supported.

    2.0.0release notes

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.

    2.0.0release notes

  • Use refresh to refresh discovery or bypass to skip the cache; a failed refresh leaves previously returned tools usable.

    2.0.0release notes

  • Resume an interrupted LangGraph run with elicitation responses supplied inside a LangGraph Command.

    2.0.0release notes

  • Replaces getTools as the recommended API and returns a flat list of executable LangChain tools.

    2.0.0release notes

  • Replaces initializeConnections as the recommended API and groups tools by server.

    2.0.0release notes

  • Use MCPAdapter for new code; it replaces MultiServerMCPClient as the recommended adapter API.

    2.0.0release notes

  • Replaces ClientConfig as the recommended adapter configuration type.

    2.0.0release notes

  • Each server can negotiate independently; mode defaults to auto, or can require modern protocol or skip probing a known legacy server.

    2.0.0release notes

  • Use this server option to list URIs to watch on modern servers, which reject resources/subscribe.

    2.0.0release notes

  • Now exported so callers can identify authentication failures by walking an error's cause chain.

    2.0.0release notes

  • Set mode to auto when constructing an SDK 2 Client to negotiate with modern servers; its default negotiates only the legacy protocol.

    2.0.0release notes

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.

    2.0.0release notes

  • Set to false to retain unprefixed tool names; duplicate names then cause listTools and getTools to throw MCPClientError.

    2.0.0release notes

  • Hooks now preserve ToolMessage and LangGraph Command results instead of flattening or rejecting them; hook state is typed unknown.

    2.0.0release notes

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.

    2.0.1release notes