LangChain MCP Adapters is a Python library that converts Model Context Protocol (MCP) tools into LangChain tools for use in LangChain and LangGraph agents. The repository is no longer actively maintained: MCP support has moved into LangChain itself under the langchain.mcp namespace, with a migration guide for existing users. A JavaScript and TypeScript version lives in LangChainJS.
The library provides a multi-server client that connects to several MCP servers at once and loads their tools into one list for an agent. It supports stdio, SSE, and streamable HTTP transports, with custom headers for authentication or tracing on the HTTP-based transports. By default each tool call opens a new MCP session, and a session can also be held open explicitly for a given server.
MCP tool execution errors are returned to the model as an error tool message so the agent can see what went wrong and correct course, while transport and session failures still raise. The tools work in prebuilt agents, in hand-built LangGraph state graphs, and in agents served from a LangGraph API server.
Features
- Tool conversion: turns MCP tools into LangChain tools usable by LangGraph agents
- Multi-server client: connects to several MCP servers and loads all their tools at once
- Transports: stdio, SSE, and streamable HTTP, with runtime headers on the HTTP-based transports
- Session control: a new session per tool call by default, or an explicitly held session per server
- Error handling: MCP execution errors come back to the model as error tool messages instead of crashing the run
- LangGraph server support: MCP tools can back a graph served from a LangGraph API server


