How to Use the IoTeX (IoTeX Block Explorer API) MCP in LangChain
Run multi-step reasoning pipelines that query live IoTeX blockchain data directly inside your LangChain chains.
Works with every AI agent you already use
…and any MCP-compatible client
Connect IoTeX (IoTeX Block Explorer API) MCP to LangChain
Create your Vinkius account to connect IoTeX (IoTeX Block Explorer API) 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 IoTeX account audits with LangChain agents
The `get_account` and `get_account_actions` tools let your agent fetch live balances and transaction history in a single execution step. Your agent takes the output from a balance check, evaluates if it meets a threshold, and immediately triggers the next action in your sequence. This setup eliminates manual state management so you don't have to write custom polling loops. By feeding raw blockchain data directly into your LangChain runnables using this MCP Server setup, you build self-correcting pipelines that verify wallet activity before executing dependent smart contract tasks.
Track real-time transactions using this MCP Server
The `get_recent_actions` and `get_action` tools pull the latest transaction logs straight into your active prompt context via the MCP protocol. Your agent parses these payloads to trace execution paths, catch failed transactions, and extract event logs without waiting for manual indexer updates. You get raw transaction data structured for immediate decision-making. The agent inspects specific action hashes on the fly to confirm gas usage and execution status, feeding those metrics back into your main LangChain execution loop.
Deep token holder analysis
The `get_token` and `get_token_holders` tools expose contract metadata and ownership distribution directly to your reasoning models. Your agent queries these endpoints to identify top holders and verify token supply metrics during automated market analysis. By connecting these tools to your chains, you bypass complex web3 library setups. The agent handles the raw JSON responses, filtering out noise and presenting clean token distributions to your analytical pipelines.
Set up IoTeX (IoTeX Block Explorer API) 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 IoTeX (IoTeX Block Explorer API) 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({
"iotex-iotex-block-explorer-api-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 IoTeX (IoTeX Block Explorer API) 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 IoTeX. 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 IoTeX (IoTeX Block Explorer API) MCP in LangChain
Use it with your favorite AI tools
Connect this server to Cursor, Claude, VS Code, and more.
Start using the IoTeX (IoTeX Block Explorer API) MCP today
We host it, we monitor it, we maintain it. You just paste one token.