LangChain adds support for the stateless MCP spec
- Source
- x.com
- Publisher
- LangChain
- Date
Today, we're making some exciting updates to MCP in LangChain, including support for the new stateless MCP spec! @SydneyRunkle with everything you need to know ⤵️ https://t.co/GhYCivYVMW
Context
is the standard many AI agents use to call outside tools, and its July revision removed the sessions that every call used to run inside. Under the old spec, a opened a session with a handshake, the server handed back a session ID, and every later request had to carry that ID, which tied the client to the one server instance that issued it. LangChain says in its write-up of the update that this forced anyone running a remote at scale to use sticky routing and a shared session store. Under the new spec there is nothing to pin, so a redeploy no longer kills live sessions. Our explanation of the revision covers how the spec now carries what each request needs inside the request itself.
LangChain says the stateless spec made two features possible, and both are now in its langchain.mcp module. The first is caching. A server can now say how long its tool list stays fresh, so an agent can serve that list from a cache instead of making a round trip to rediscover its tools before every run. The second is elicitation, MCP's term for a tool that stops to ask the caller something, such as confirming a delete or supplying a parameter the model left out. The new spec turns that question into an ordinary request that the client retries with the answer attached, so no connection has to stay open while a person decides. LangChain surfaces the question as a LangGraph interrupt, the same pause-and-resume mechanism its agents already use: the run pauses, whoever is reviewing the agent's work answers, and the run resumes. The only is a checkpointer, which gives the paused run somewhere to wait.
Developers do not have to wait for every server to upgrade. LangChain's MCP client is built on the FastMCP client library, which tries the new protocol on each connection and falls back to the old handshake for a server that has not upgraded, so the developer's code is the same either way. The support is in beta and its API may still change. It requires `langchain[mcp]` version 1.4.0 or later and ships for Python now, with TypeScript "soon to follow," according to LangChain. LangChain's companion post on the same release covers the packaging change: MCP support moving out of the separate langchain-mcp-adapters package and into the main library.
- Model Context Protocol (MCP) — A published agreement for an AI application to discover what a separate program offers and ask it to run one of those offerings.
- Client — The program that sends a request to a server and receives its response.
- MCP server — A program that provides tools, resources and prompt templates to an MCP client; it may run on the same machine as the application or remotely.
- Setup — The combination of a model, a harness, its connections and the path the task's data takes, considered together for a task.





