How to Use the Zerion (DeFi Portfolio) MCP in LangChain
Build complex DeFi logic with LangChain and Zerion (DeFi Portfolio)
Works with every AI agent you already use
…and any MCP-compatible client
Connect Zerion (DeFi Portfolio) MCP to LangChain
Create your Vinkius account to connect Zerion (DeFi Portfolio) 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.
Multi-Step Reasoning for LangChain
The `get_wallet_portfolio` tool provides the total value of a wallet. You can then chain this output into `get_wallet_pnl` to figure out realized versus unrealized gains. This allows your agent to build complex, multi-step reasoning pipelines that determine if a trade is profitable based on multiple data points. LangChain excels here because every tool call acts like a link in a chain. The output of checking total assets feeds directly into calculating PnL or determining the most active chains via `list_chains`. This gives you full observability into how your agent arrives at its final decision.
Tracking DeFi Assets with MCP Server
Need to track holdings across multiple wallets? Use `get_wallet_set_portfolio` to get an aggregated view of assets. This single call gives you the total value and distribution for a set of addresses, which is critical when managing complex institutional accounts. Don't just check one wallet; aggregate them all at once. Your agent can compare multiple portfolio snapshots using `get_wallet_set_positions` against real-time gas estimates from `list_gas_prices` before recommending a cross-chain swap quote via `get_swap_quotes`.
Analyzing Transaction Chains for LangChain
To build an accurate historical view, start with the `get_wallet_transactions` tool. This gives you a human-readable history of activities across a specific address. Your agent can then read those transactions and use that data to inform subsequent calls. For example, if a transaction shows movement into a new NFT collection, your next step is automatically calling `get_nft` to grab the metadata for that asset. It's all one continuous flow.
Set up Zerion (DeFi Portfolio) 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 Zerion (DeFi Portfolio) 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({
"zerion-defi-portfolio-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 Zerion (DeFi Portfolio) 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 Zerion. 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 Zerion (DeFi Portfolio) MCP in LangChain
Use it with your favorite AI tools
Connect this server to Cursor, Claude, VS Code, and more.
Start using the Zerion (DeFi Portfolio) MCP today
We host it, we monitor it, we maintain it. You just paste one token.