# Ankr Web3 Node API MCP

> Ankr (Web3 Node API) MCP connects your AI client directly to global blockchain infrastructure. It lets you query real-time data across Ethereum and other EVM chains, handling everything from checking token balances and reading raw smart contract code to simulating complex multi-step transactions. Forget manual JSON-RPC calls; just ask your agent for the block hash or a wallet's transaction history.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Tags:** web3, ethereum, rpc-node, evm, blockchain-api

## Description

Access deep blockchain insights by connecting your AI client to Ankr’s global node network. This MCP gives you a direct line into Ethereum and all other EVM-compatible chains, letting you analyze data using natural conversation rather than complex coding.

You can instantly check the latest block number or retrieve full details about any range of blocks. Want to know what an address owns? You can list all NFTs held by an owner or even find out every blockchain a wallet has ever touched. Need to audit a smart contract? The tool lets you read its code, inspect storage slots for specific data, and determine how much gas you’ll need before sending a transaction.

For analysis, you don't have to write custom scripts anymore. You can simulate multi-transaction scenarios or analyze historical token transfer records. Because this functionality is housed within the Vinkius catalog, your agent gets immediate access to all these powerful blockchain tools—whether you use Claude, Cursor, or any MCP-compatible client.

## Tools

### ankr_getAccountBalance
Returns all token balances held by a specified wallet address.

### ankr_getBlocks
Retrieves comprehensive information for a defined range of blockchain blocks.

### ankr_getInteractions
Lists all different blockchains that a specific wallet address has interacted with.

### ankr_getNFTHolders
Retrieves a list of all addresses currently holding NFTs from a given collection.

### ankr_getNFTMetadata
Fetches detailed metadata for any specific NFT identifier.

### ankr_getNFTsByOwner
Retrieves all NFTs owned by a single address across multiple supported chains.

### ankr_getTokenPrice
Returns the current market price of any specified token in USD.

### ankr_getTokenTransfers
Provides historical data detailing all transfers for a specific cryptocurrency or token.

### eth_blockNumber
Returns the most recent block number available on the connected network.

### eth_call
Executes a read-only call to a smart contract without creating any actual transaction.

### eth_estimateGas
Calculates the necessary amount of gas needed for an intended on-chain operation.

### eth_getBalance
Returns the native currency balance (like ETH) for a given address.

### eth_getBlockByHash
Retrieves complete block details when provided with a specific transaction hash.

### eth_getBlockByNumber
Gets full block information using either the numerical block height or number.

### eth_getCode
Returns the compiled code deployed at a specific smart contract address.

### eth_getLogs
Filters and retrieves all event logs matching defined criteria from the blockchain.

### eth_getStorageAt
Reads the raw value stored at a specific memory slot within a contract.

### eth_getTransactionByHash
Retrieves all details for a transaction when given its unique hash identifier.

### eth_getTransactionCount
Returns the count of transactions (nonce) sent from an address to determine sequence.

### eth_getTransactionReceipt
Gets the final receipt and status details for a confirmed transaction.

### eth_sendRawTransaction
Submits a signed, raw transaction directly to the network for processing.

### eth_simulateV1
Runs a simulation of multiple blocks or transactions against the current state.

### getAccountInfo
Returns all known information associated with an account's public key.

### getBalance
Retrieves the lamport balance of a given blockchain account.

### getBlockHeight
Returns the current, latest height number for the active block chain.

### getBlock
Gets identity and transaction details for a confirmed, historical block.

### getEpochInfo
Returns structured information about the current operational epoch.

### getLatestBlockhash
Provides the latest available block hash, useful for building transactions.

### getProgramAccounts
Retrieves all accounts that are owned by a specific smart contract program.

### getTransaction
Gets detailed information regarding a transaction that has been confirmed on the chain.

### sendTransaction
Submits and signs a new transaction to the network for immediate processing.

### simulateTransaction
Runs an isolated simulation of a single transaction to check for potential errors before deployment.

## Prompt Examples

**Prompt:** 
```
What is the latest block number on Ethereum?
```

**Response:** 
```
I've checked the Ethereum network. The most recent block number is 19,245,812.
```

**Prompt:** 
```
Check the balance of address 0x742d35Cc6634C0532925a3b844Bc454e4438f44e on the 'eth' chain.
```

**Response:** 
```
The balance for that address on Ethereum is 1,500,000,000,000,000,000 Wei (1.5 ETH).
```

**Prompt:** 
```
Get the transaction receipt for hash 0x5c504ed432cb511db3b32169e5444570f9d0cad662f6e19df34ad57d57ad5 on eth.
```

**Response:** 
```
I've retrieved the receipt. The transaction was successful, included in block 18,450,210, and used 21,000 gas.
```

## Capabilities

### Check Account Balances
Retrieve a wallet's total token balance and its number of transactions (nonce).

### Read Smart Contract State
Execute calls to read contract code, check storage slots, or get metadata for specific NFTs.

### Analyze Transactions
Inspect full transaction details, receipts, and estimate the required gas costs.

### Query Block History
Fetch information about specific blocks using either their hash or their block number.

### Track Token Movements
View historical data on token transfers and get the current USD price of any supported token.

## Use Cases

### Auditing a potential DeFi exploit
A researcher suspects a contract is vulnerable. Instead of writing dozens of complex scripts, they ask their agent to use eth_getCode and then run eth_getLogs for specific criteria. The agent immediately returns the necessary logs, confirming the vulnerability location.

### Checking cross-chain asset ownership
A data analyst needs a comprehensive view of an address's assets. They ask their agent to run ankr_getNFTsByOwner and then follow up with ankr_getAccountBalance, compiling all the necessary information into one report.

### Validating deployment readiness
A developer needs to know if a new contract will fail before deploying. They use eth_estimateGas followed by simulateTransaction on their agent. The agent reports back any gas overruns or execution errors, allowing the dev to fix it instantly.

### Tracking historical token movements
A business needs to track market flow for a specific asset. They ask the MCP to use ankr_getTokenTransfers and then get the current price using ankr_getTokenPrice, giving them both history and real-time valuation.

## Benefits

- Stop writing custom RPC calls. Instead of manually constructing complex JSON-RPC requests, your agent handles the connection and data parsing automatically.
- Verify smart contracts faster. Use eth_getCode to check compiled code and use eth_getStorageAt to inspect raw storage slots without needing a dedicated debugging tool.
- Save time on transaction planning. Before committing funds, run eth_simulateV1 or simulateTransaction to estimate gas costs and catch errors safely.
- Deep dive into asset ownership. Use ankr_getNFTsByOwner and ankr_getNFTHolders to quickly audit who holds specific digital assets across multiple chains.
- Track token economics precisely. You can use ankr_getTokenTransfers for historical data or ankr_getTokenPrice to get real-time USD valuation on the fly.

## How It Works

The bottom line is you get reliable blockchain data delivered to your AI client without writing any raw RPC requests or setting up Postman environments.

1. Subscribe to this MCP in Vinkius and input your Ankr JWT Token.
2. Your AI client connects through the secure protocol, receiving full access to all blockchain tools.
3. You simply ask your agent for data—like 'What is the balance of address X?'—and it executes the necessary calls.

## Frequently Asked Questions

**How do I check if a smart contract is safe to use with ankr_getAccountBalance?**
You first need to read the contract code using eth_getCode. This verifies the deployment, and then you can proceed to check balances or simulate calls with eth_call before making any financial decisions.

**Can I use ankr_getNFTsByOwner to find out which chain an NFT is on?**
Yes. The tool retrieves all NFTs owned by the address across multiple chains, giving you a consolidated view of their digital assets without manual checking.

**What's the difference between eth_getTransactionByHash and eth_getBlockByHash?**
eth_getTransactionByHash fetches details about one specific transaction. In contrast, eth_getBlockByHash provides full information for an entire block of transactions.

**Do I need to write code when using the eth_simulateV1 tool?**
No. You don't write code; you simply ask your agent to simulate a transaction or multi-block sequence, and it performs the necessary calculations for gas and state changes.

**How do I get historical data on token movements with ankr_getTokenTransfers?**
Just specify the token address and date range. The tool returns a detailed log of every transfer that has occurred, helping you track market flow over time.

**Is there a way to check if an account has interacted with specific blockchains?**
Yes, use ankr_getInteractions. This function lists all the different supported blockchains that a given wallet address has previously touched, giving you its usage history.