Shared memory for LangChain & LangGraph agents
A LangGraph agent your team built is just as amnesiac across sessions as any other agent — it doesn't know what a teammate's agent (LangGraph, Claude Code, or Cursor) already learned. threadctx is a standard MCP server, so it plugs into a LangGraph agent's tool list the same way it plugs into any MCP client — no custom integration to build.
$ pip install langchain-mcp-adaptersWhy LangGraph teams add threadctx
- MCP is the interface LangChain already built for this. LangGraph's official langchain-mcp-adapters package connects any agent to any MCP server, and LangChain's Fleet product documents support for extending with "any MCP server." threadctx doesn't need a bespoke LangChain integration — it's already speaking the protocol LangChain built for exactly this.
- It bridges outside LangGraph too. threadctx is one server behind every client. A teammate's LangGraph agent writes a memory with memory_write, and a teammate running Claude Code or Cursor can recall it with memory_query — cross-framework sharing that nothing framework-specific can do on its own.
- Two tools, not a platform to learn. memory_write(content, tags?) and memory_query(task_description, max_results?) bind into your graph like any other LangChain tool — call memory_query before a node that does risky or repeated work, and memory_write after one that resolves something worth remembering.
Add it to a LangGraph agent
langchain-mcp-adapters is LangChain's own package for connecting agents to MCP servers over stdio or HTTP. For local mode, drop the env block — no key needed.
from langchain_mcp_adapters.client import MultiServerMCPClient
client = MultiServerMCPClient({
"threadctx": {
"command": "npx",
"args": ["-y", "threadctx-mcp"],
"env": {
"THREADCTX_MODE": "cloud",
"THREADCTX_API_KEY": "tctx_...",
},
"transport": "stdio",
}
})
tools = await client.get_tools() # memory_write, memory_query — ready to bind to your graphSame idea if you're driving threadctx from LangChain's Fleet instead of raw LangGraph — Fleet's docs describe extending it "with any MCP server," and the config shape is the same stdio command threadctx already ships.
Give your LangGraph agents team memory.
Free and local for solo use. Team plans start at $11/seat/month when the memory needs to be shared.