How to Use the Nodereal MCP in LangChain
Build multi-step blockchain query pipelines with the Nodereal MCP server in LangChain.
Works with every AI agent you already use
…and any MCP-compatible client
Connect Nodereal MCP to LangChain
Create your Vinkius account to connect Nodereal 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.
Chain EVM and Aptos Data in LangChain
`eth_get_balance` and `aptos_get_account_resources` form the foundation of this MCP Server, letting your ReAct agents pull raw state directly from the chain. You don't have to write custom RPC wrappers. The agent decides when to check a balance and when to pull the full resource tree based on the user's prompt. Because LangChain treats every tool as a composable link, you can pass the output of `eth_get_block_by_number` straight into `nr_get_transaction_receipts_by_block_number`. The agent handles the data transformation. You just watch the execution graph in LangSmith to see exactly how much latency the node calls introduce.
Simulate Transactions Before Execution
`aptos_simulate_transaction` lets your agent dry-run complex Move calls before committing anything to the network. This prevents failed transactions and wasted gas fees. Your agent constructs the payload, runs the simulation, and parses the outcome. If the simulation fails, the agent can adjust the gas parameters using `eth_estimate_gas` for EVM equivalents or rewrite the transaction arguments entirely. You get a self-correcting pipeline that validates state changes against live chain data instead of guessing.
Query Enhanced NodeReal Indexes
`nr_get_nft_holders` and `nr_get_token_balance_20` expose NodeReal's custom indexed data directly to your LangChain graphs. Standard RPC nodes force you to iterate through millions of blocks to find token holders. These tools return the exact list in a single call. Your agent can take that list of addresses and immediately run `nr_get_asset_transfers` on each one to build a complete historical profile. It turns a massive data engineering problem into a basic tool-calling loop.
Set up Nodereal 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 Nodereal 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({
"nodereal-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 Nodereal 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 NodeReal. 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 Nodereal MCP in LangChain
Use it with your favorite AI tools
Connect this server to Cursor, Claude, VS Code, and more.
Start using the Nodereal MCP today
We host it, we monitor it, we maintain it. You just paste one token.