MCP with LangChain and LangGraph

The langchain-mcp-adapters package converts MCP capabilities into LangChain-compatible tools, prompts, and resources and provides a MultiServerMCPClient.

pip install langchain-mcp-adapters

Multiple servers

Configure stdio or HTTP servers, call get_tools(), and pass the resulting tools into a LangChain agent or LangGraph workflow.

Session behavior

The current adapter client is stateless by default at the adapter level; explicit session management is available when you need a persistent connection pattern.

Why this pairing is useful

LangGraph can own orchestration and persistence while MCP standardizes external capability access.

Reference

LangChain MCP docs