How to Use the GetStream MCP in LangChain
Build scalable social networks and activity feeds directly inside your LangChain reasoning pipelines.
Works with every AI agent you already use
…and any MCP-compatible client
Connect GetStream MCP to LangChain
Create your Vinkius account to connect GetStream 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.
Tie GetStream Into LangChain Pipelines
This MCP Server connects LangChain directly to GetStream's activity feed infrastructure. You write chains that generate content and instantly push it to user feeds using `add_activity_to_feed`. Your ReAct agents decide when a user action warrants an update, formatting the payload and firing it off without breaking context. The real advantage here is chaining these operations. You can pull an external URL, scrape its metadata with `get_open_graph`, and pipe that exact data into a new post. LangSmith logs the token usage and latency for every single API call, so you know exactly how fast your social graph updates are running in production.
Automate Complex Follower Graphs
Managing follower relationships requires precise execution. Your LangChain agent handles bulk operations by passing lists of user IDs directly into the `batch_follow` tool. If a user joins a new community, the agent automatically wires up their timeline by subscribing them to the relevant target feeds. You don't have to write custom loop logic. You just instruct your agent on the mapping rules. It reads the current state with `list_feed_follows` and decides who needs to be added or removed. It then calls `unfollow_feed` to clean up stale connections.
Manage Collections and Media
Social apps need object storage and media processing. Your agent handles this by passing raw image data to `upload_image` and resizing it on the fly with `process_image`. It takes the resulting URLs and attaches them to collection objects using this MCP integration. You manage the entire lifecycle of these objects through `batch_post_collections`. When an agent detects deleted or banned accounts, it fires off `batch_delete_collections` to wipe their associated data. Every step feeds into the next tool in your sequence.
Set up GetStream 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 GetStream 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({
"getstream-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 GetStream 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 GetStream. 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 GetStream MCP in LangChain
Use it with your favorite AI tools
Connect this server to Cursor, Claude, VS Code, and more.
Start using the GetStream MCP today
We host it, we monitor it, we maintain it. You just paste one token.