How to Use the LangGraph Cloud (Stateful AI Agents) MCP in LangChain
Build stateful multi-step reasoning pipelines using LangChain and LangGraph Cloud agents.
Works with every AI agent you already use
…and any MCP-compatible client
Connect LangGraph Cloud (Stateful AI Agents) MCP to LangChain
Create your Vinkius account to connect LangGraph Cloud (Stateful AI Agents) to LangChain and route execution through our secure gateway. The platform manages server hosting, runtime updates, and security layers. Configuration requires no manual server provisioning.
Stateful Context Tracking
This MCP server provides the `create_thread` tool to initialize isolated memory spaces for your LangChain agents. When building complex ReAct loops, you need persistent context between steps. Calling `list_threads` shows you every active conversation happening across your infrastructure. Your chains can inspect the exact variables inside those conversations using `get_thread_state`. Passing that state directly into LangSmith gives you full observability over what the graph actually did.
Remote Graph Execution via MCP Server
Triggering remote endpoints requires the `create_run` tool to send input payloads to a specific thread. Your LangChain agent decides which assistant config to target after pulling the options via `list_assistants`. It fires off the request and moves to the next step in your pipeline. Long-running tasks demand supervision. You poll `get_run` to check completion status while the rest of your chain continues working. If a step takes too long or hits a rate limit, the agent fires `cancel_run` to kill the process and try another path.
Human-in-the-Loop Interventions
Sometimes an agent gets stuck in a loop and needs a human to fix the trajectory. The `update_thread_state` tool writes manual overrides directly into the graph variables. Your LangChain pipeline pauses, waits for a user decision, and injects the corrected state back into the remote server. Scheduled workflows also need visibility. Running `list_crons` pulls down all active automated jobs targeting your agents through this MCP connection. You combine this with `list_runs` to audit exactly what your scheduled tasks accomplished overnight.
Set up LangGraph Cloud (Stateful AI Agents) MCP in LangChain
Prerequisites
- Python 3.10+ installed
-
langchain-mcp-adapters+langgraphpackages - Active Vinkius subscription with a valid endpoint token
- 1
Install dependencies
Run
pip install langchain-mcp-adapters langgraph langchain-openai. The MCP adapters package converts MCP tools into native LangChainBaseToolobjects. - 2
Connect via HTTP transport
Use
MultiServerMCPClientwith"transport": "http"pointing to your Vinkius endpoint. Replace[YOUR_TOKEN_HERE]with your token from cloud.vinkius.com. - 3
Create a ReAct agent
Pass the discovered tools to
create_react_agent()from LangGraph. The agent automatically routes LangGraph Cloud (Stateful AI Agents) tool calls through the MCP protocol. - 4
Run with any LLM
Swap
ChatOpenAIforChatAnthropic,ChatGoogleGenerativeAI, or any LangChain-compatible model. The MCP tools work identically across all providers.
from langchain_mcp_adapters.client import MultiServerMCPClient
from langgraph.prebuilt import create_react_agent
from langchain_openai import ChatOpenAI
async with MultiServerMCPClient({
"langgraph-cloud-stateful-ai-agents-mcp": {
"transport": "http",
"url": "https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp",
}
}) as client:
tools = client.get_tools()
agent = create_react_agent(
ChatOpenAI(model="gpt-4o"),
tools,
)
result = await agent.ainvoke({
"messages": "List recent LangGraph Cloud (Stateful AI Agents) transactions"
})
print(result["messages"][-1].content) Independent Platform Disclaimer: Vinkius is an independent platform and is not affiliated with, endorsed by, sponsored by, verified by, or otherwise authorized by LangGraph Cloud. All third-party trademarks, logos, and brand names are the property of their respective owners. Their use on this website is strictly for informational purposes to identify service compatibility and interoperability.
Why Choose Vinkius
Vinkius connects your tools to AI with real-time monitoring and automatic cost savings — all from one dashboard.
Real-time monitoring
Live
visibility into every interaction
Connect your favorite tools to your AI and see exactly what's happening — every request, every response, in real time.
Built-in savings
60%
lower AI costs
Vinkius compresses data between your apps and your AI automatically. Lower bills every month — no configuration required.
Single dashboard
One
place for every integration
Every tool your AI connects to, managed from a single screen. One account, complete control.
Common questions about LangGraph Cloud (Stateful AI Agents) MCP in LangChain
Use it with your favorite AI tools
Connect this server to Cursor, Claude, VS Code, and more.
Start using the LangGraph Cloud (Stateful AI Agents) MCP today
We host it, we monitor it, we maintain it. You just paste one token.