# IoTeX Block Explorer API MCP

> IoTeX Block Explorer API MCP gives you direct access to real-time IoTeX network data. Query account balances, transaction histories, specific blocks by hash or height, and token metadata (XRC20/XRC721). Your AI agent acts as a built-in blockchain analyst, eliminating the need for manual web explorer navigation. Check accounts with `get_account`, review past activity using `get_account_actions` or `get_action`, and analyze asset ownership by fetching token details via `get_token` or listing holders with `get_token_holders`. It’s instant blockchain intelligence, right in your chat interface.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Tags:** iotex, block-explorer, web3, crypto-data, blockchain-api

## Description

This connector lets you treat the IoTeX blockchain like a database. Instead of clicking through dozens of web pages just to find a balance or confirm a transaction detail, your AI agent gets the answer instantly. You can ask it for account details and get balances, nonces, and metadata in one go. Want to know what happened with an address over the last week? Just ask, and you’ll pull up all associated actions. Need to check if a specific token contract is valid or who owns its supply? The MCP handles that too. It lets your agent query detailed block data by height or hash, keeping track of network activity using recent action feeds. Connecting this IoTeX Block Explorer API through Vinkius makes it available across any AI client you use; your agent just needs the prompt. No more copy-pasting hashes into separate websites. You get a unified view of the entire chain state.

## Tools

### get_account_actions
Fetches a list of all historical transactions associated with an account's address.

### get_account
Retrieves the current balance, nonce, and basic details for a specified IoTeX address.

### get_action
Retrieves specific details about a single transaction or action using its unique hash.

### get_block_by_hash
Gets all data for a blockchain block when you provide its full cryptographic hash.

### get_block_by_height
Retrieves the details of a specific blockchain block using only its numerical height count.

### get_recent_actions
Pulls a feed containing the latest transactions and activity across the entire IoTeX network.

### get_token_holders
Lists all the addresses that currently own tokens associated with a specified contract.

### get_token
Retrieves specific metadata (total supply, decimals) for a given token contract address.

## Prompt Examples

**Prompt:** 
```
Get account details and balance for IoTeX address io1prv56hmvfm08z6p6v6v6v6v6v6v6v6v6v6v6v6.
```

**Response:** 
```
I've retrieved the details for account io1prv... The current balance is 1,250 IOTX with a nonce of 42. Would you like to see the recent transaction history for this address?
```

**Prompt:** 
```
Show me the most recent actions on the IoTeX network.
```

**Response:** 
```
Fetching recent network activity... I found the latest actions including several transfers and contract executions. The most recent was a transfer of 500 IOTX at block height 31054201.
```

**Prompt:** 
```
What are the details for the token at contract address io1hp6y4...?
```

**Response:** 
```
Analyzing token metadata... This contract corresponds to the 'MachineFi' token (MFI). It has a total supply of 1,000,000,000 and 18 decimals. Should I list the current top holders?
```

## Capabilities

### Check account balances and metadata
Retrieve an address's current balance, nonce count, and basic data using `get_account`.

### Audit transaction history
Fetch a list of all past actions on an address with `get_account_actions`, or look up details for one specific action by its hash using `get_action`.

### Query block data by time or ID
Get full details about a blockchain block using either the block's height number (`get_block_by_height`) or its unique cryptographic hash (`get_block_by_hash`).

### Monitor recent network events
See what’s happening right now by retrieving a list of the most recent transactions and activity across the entire IoTeX network using `get_recent_actions`.

### Analyze token supply and ownership
Get metadata for specific tokens (XRC20/XRC721) via `get_token`, or list all addresses that currently hold those tokens using `get_token_holders`.

## Use Cases

### Verifying a complex transfer chain
A researcher needs to confirm if funds moved from Account A, through an intermediary contract, and landed in Address B. They ask their agent: 'What did account A do recently?' The agent uses `get_account_actions` to find the initial transaction hash, then uses `get_action` on that hash to trace the flow and get the final details.

### Checking asset distribution for an ICO
A project founder wants to know who holds a specific token (TKN) after a sale. They ask their agent to analyze TKN's contract address, triggering `get_token` first, and then immediately calling `get_token_holders` to generate the complete list of owners.

### Debugging an outdated record
A developer gets a strange error about a block. Instead of manually searching by date on a web explorer, they ask their agent for data at height 31054201. The agent uses `get_block_by_height` and returns the exact JSON data needed to debug the application.

### Assessing immediate network risk
A trading bot owner wants a real-time feed of major movements before running a script. They ask their agent, 'Show me all activity in the last hour.' The agent uses `get_recent_actions` to provide an instant overview of transfers and smart contract calls.

## Benefits

- Stop juggling tabs. Instead of checking the main explorer site for a balance, use `get_account` to pull real-time data directly into your chat session. It keeps your workflow contained.
- Audit activity in depth. If you suspect an account was involved in something last week, don't scroll through pages. Call `get_account_actions` or pinpoint the exact moment with `get_action` using a known hash.
- Stay current on network health. You can monitor what’s happening right now by calling `get_recent_actions`, giving you an immediate pulse check of the entire IoTeX chain without waiting for manual updates.
- Master asset tracking. To understand token ownership, use `get_token` to get contract details, then follow up with `get_token_holders` to see who holds the supply.
- Navigate blocks easily. Need to check a block from two weeks ago? You don't need to search by date; just tell your agent to grab it using `get_block_by_height` or `get_block_by_hash`.

## How It Works

The bottom line is that your AI client handles all the complex API calling logic so you just need to chat with it.

1. Connect your AI client to this MCP and optionally provide an IoTeX API Key for higher rate limits.
2. Direct your agent with a prompt: 'What is the balance and history for address X?'
3. The agent calls the necessary tools (e.g., `get_account` then `get_account_actions`) and returns structured, actionable data directly to you.

## Frequently Asked Questions

**How do I check an account balance using get_account?**
You simply ask your agent for the details of a specific IoTeX address. The agent calls `get_account` and returns the current balance, nonce, and metadata immediately.

**What is the difference between get_account_actions and get_action?**
`get_account_actions` fetches a list of all activities for an entire address. Use `get_action` when you already know the specific transaction hash and need details on just that single event.

**Can I find out who owns a token using get_token_holders?**
Yes, calling `get_token_holders` requires you to first provide the contract address. This tool lists all addresses currently holding tokens for that specific contract.

**Do I need get_block_by_hash or get_block_by_height?**
Use `get_block_by_hash` when you have the block's unique ID. Use `get_block_by_height` if you only know that the block occurred at a specific numerical height count.

**How do I handle rate limits when querying account data using get_account?**
You need to provide your IoTeX API Key for higher capacity. While basic queries work with the default settings, including a key significantly increases your query volume and stability.

**What specific token metadata can I retrieve using the get_token tool?**
The tool fetches essential contract data, including the total supply and the decimal count. This lets you verify a token's specifications before running holder analyses.

**How real-time is the activity information provided by get_recent_actions?**
This MCP connects directly to the live explorer feed, meaning the actions are near real-time. You can monitor network changes within seconds of them appearing on IoTeX.

**What happens if I use get_action with a transaction hash that doesn't exist?**
The tool will return a specific error message indicating the hash is invalid or not found. You simply adjust your input query and resubmit to check another action.

**How can I see the transaction history for a specific IoTeX address?**
You can use the `get_account_actions` tool. Simply provide the IoTeX address, and the agent will return a list of recent actions (transactions) associated with that account.

**Can I look up block details if I only have the block height?**
Yes! Use the `get_block_by_height` tool and provide the numeric height. The agent will fetch the full block details including hash, timestamp, and transaction count.

**Is it possible to see who the top holders of a specific token are?**
Yes, by using the `get_token_holders` tool with the token's contract address, you can retrieve a list of addresses that currently hold that specific XRC20 or XRC721 token.