etherscan-mcp-server
Provides access to Ethereum blockchain data including ETH balances, ERC-20 token balances, transaction history, contract ABIs, and gas prices via the Etherscan API.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@etherscan-mcp-server Get the current gas price on Ethereum mainnet."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Etherscan MCP Server
An MCP server for Etherscan — connect any MCP-compatible client to the Ethereum blockchain explorer.
What is this?
An MCP (Model Context Protocol) server that gives AI assistants and agents access to Etherscan's Ethereum blockchain explorer API — ETH balances, ERC-20 token balances, transaction history, contract ABIs, and gas prices — through natural language.
Use it with Claude Desktop, Cursor, Windsurf, Cline, Continue, or any MCP-compatible client to inspect wallets, audit contracts, and analyze on-chain activity.
Related MCP server: MCP Etherscan Server
Why use this?
No API key required — works out of the box with Etherscan's free tier (limited to ~1 call/5s without a key)
Optional API key support — set
ETHERSCAN_API_KEYfor 5 calls/sec and full results8 built-in tools — covers the most common on-chain queries
Clean markdown output — results read naturally in chat
Rate-limited automatically — respects free tier limits, retries on 429
Tools
Tool | Description |
| Get native ETH balance for an address |
| Get all ERC-20 token balances for an address |
| Get full details for a transaction by hash |
| Get normal (external) transactions for an address |
| Get ERC-20 token transfer events for an address |
| Get internal (contract-called) transactions for an address |
| Get the ABI for a verified smart contract |
| Get current gas price oracle (slow/standard/fast in Gwei) |
Quick Start
1. Add to your MCP client
Add this to your MCP client config (e.g. claude_desktop_config.json):
{
"mcpServers": {
"etherscan": {
"command": "npx",
"args": ["-y", "etherscan-mcp-server"]
}
}
}That's it. npx downloads and runs it automatically. For higher rate limits, get a free API key at etherscan.io/apis and add it:
{
"mcpServers": {
"etherscan": {
"command": "npx",
"args": ["-y", "etherscan-mcp-server"],
"env": {
"ETHERSCAN_API_KEY": "your_key_here"
}
}
}
}2. Use it
Ask your AI assistant things like:
"What's the ETH balance of vitalik.eth's address
0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045?""Show me the ERC-20 token balances for that address"
"Get details for transaction
0x...""List the last 20 normal transactions for this address"
"Show me all USDT transfers to this wallet"
"Fetch the ABI for the USDC contract
0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48""What are current gas prices on Ethereum mainnet?"
Example Output
get_eth_balance
ETH Balance for 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045
247.3821 ETHget_gas_price
⛽ Etherscan Gas Price Oracle
- Safe Low (🐢): 12.50 Gwei
- Standard (🚗): 15.20 Gwei
- Fast (🚀): 18.90 Gwei
- Last Block: 19850000
- Gas Used Ratio: 0.512
- Suggested Base Fee: 13.40 Gwei
*Estimated tx cost for 21,000 gas: 🐢 0.000263 ETH | 🚀 0.000397 ETH*get_transactions_by_address
Normal Transactions for 0xd8dA...6045 (20 results, page 1)
- ✅ ↗ OUT 0.5 ETH · transfer — block 19,850,123 — 2026-06-05 — gas: 15.20 Gwei — hash: 0x4f8a2b9c3d1e5f7a...
- ✅ ↙ IN 1.2 ETH · transfer — block 19,849,876 — 2026-06-05 — gas: 14.80 Gwei — hash: 0x9c1d4e7f2a8b6c3d...
- ❌ ↗ OUT 0.0 ETH · swapExactTokensForETH — block 19,849,500 — 2026-06-05 — gas: 22.10 Gwei — hash: 0x2b7c9e1f4a3d8b5c...get_contract_abi
Contract ABI for 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
- Functions: 28
- Events: 13
- Constructors: 1
- Fallback/Receive: 0
### Functions (showing first 25)
- `name()` → string (view)
- `symbol()` → string (view)
- `decimals()` → uint8 (view)
- `totalSupply()` → uint256 (view)
- `balanceOf(address)` → uint256 (view)
- `transfer(address,uint256)` → bool (nonpayable)
- `approve(address,uint256)` → bool (nonpayable)
- `transferFrom(address,address,uint256)` → bool (nonpayable)
...Use Cases
Wallet Inspection
"Check the ETH and token balances of this address" — get a snapshot of any wallet's holdings in seconds. Works with any Ethereum address, including smart contract wallets and multisigs.
Transaction Forensics
"Show me the last 20 transactions for this address" — trace on-chain activity, identify counterparties, and understand fund flows. Use get_internal_transactions for contract calls and get_erc20_transfers for token movements.
Smart Contract Analysis
"Get the ABI for the Uniswap Router contract" — fetch verified contract ABIs to understand what functions are available. Essential for debugging failed transactions or understanding how a protocol works.
Gas Optimization
"What are current gas prices?" — get slow/standard/fast gas estimates with projected transaction costs. Time your transactions to save on fees.
DeFi Portfolio Tracking
"Show me all token balances for my wallet" — aggregate holdings across ERC-20 tokens. Combine with get_prices from the CoinGecko MCP server for full portfolio valuation.
Security Auditing
"List all internal transactions for this contract" — trace internal calls to understand contract behavior. Useful for identifying unusual patterns or verifying that a contract does what it claims.
Security
No API key required — works with Etherscan's free tier. Optional API key for higher rate limits.
Read-only — only fetches public blockchain data from Etherscan's API. No writes, no mutations.
No local file access — does not read or write any files on your machine.
No shell access — does not execute commands or spawn processes.
Rate-limited — automatically caps requests to stay within free tier limits.
Open source — MIT licensed. Inspect the code at GitHub.
Troubleshooting
"API key required" or very slow responses
Without an API key, Etherscan limits you to 1 call per 5 seconds. Get a free key at etherscan.io/apis and set the ETHERSCAN_API_KEY environment variable for 5 calls/sec.
"Rate limit exceeded" (429)
The server auto-retries on 429, but rapid queries can still hit limits. With a free API key, you get 5 calls/sec. Space requests ~200ms apart for best results.
"Contract not found" or empty ABI
Only verified contracts have ABIs on Etherscan. If a contract isn't verified, the API returns an error. Check the contract's verification status on etherscan.io first.
Server won't start
Make sure Node.js 18+ is installed: node --version. If using npx, ensure npm is up to date: npm install -g npm@latest.
MCP client can't connect
Verify the config path is correct. Claude Desktop uses ~/Library/Application Support/Claude/claude_desktop_config.json on macOS and %APPDATA%\Claude\claude_desktop_config.json on Windows. Restart the client after config changes.
"Address checksum" errors
Etherscan expects checksummed addresses (mixed case). The server handles this automatically, but if you see errors, try the checksummed version from etherscan.io.
Requirements
Node.js 18+
Etherscan API key (recommended) — get a free one at etherscan.io/apis
Rate Limits
The server automatically rate-limits requests to ~4 calls/second to stay within Etherscan's free tier (5 calls/sec). Without an API key, Etherscan limits you to 1 call/5 seconds.
To use a higher limit, sign up for a free Etherscan API key and set the ETHERSCAN_API_KEY environment variable:
{
"mcpServers": {
"etherscan": {
"command": "etherscan-mcp-server",
"env": {
"ETHERSCAN_API_KEY": "your_key_here"
}
}
}
}Development
git clone https://github.com/nova/etherscan-mcp-server.git
cd etherscan-mcp-server
npm install
npm run build
npm startLicense
MIT
Available Tools
8 toolsget_contract_abiA
Fetch the ABI for a verified smart contract. Returns a summary: function count, event count, and a list of all functions with their signatures and state mutability. Includes a truncated raw ABI (2000 chars). The ABI is required for calling contract methods or decoding transactions. Use get_transaction to see raw input data first.
Inputs: address (required).
get_erc20_transfersA
List ERC-20 token transfer events for an address. Returns token name, symbol, amount (human-readable), direction (IN/OUT), date, and contract address for each transfer. Filter by contract address to track a specific token. Use get_token_balances for current holdings instead.
Inputs: address (required), contractaddress, startblock, endblock, +3 more.
get_eth_balanceA
Check ETH balance for any Ethereum address. Returns balance in ETH (not wei). Use for quick portfolio checks or verifying funds before a transaction. Returns: {address: string, balance_eth: string}.
Inputs: address (required).
get_gas_priceA
Get current Ethereum gas prices from Etherscan oracle. Returns three tiers: Safe Low (turtle, cheapest), Standard (car, recommended), Fast (rocket, urgent) all in Gwei. Also shows base fee, last block, and estimated ETH cost for a simple 21k-gas transfer. Use before sending any transaction to set appropriate gas.
Inputs: no named parameters.
get_internal_transactionsA
List internal transactions (contract-to-contract calls) for an address. These are transactions triggered by smart contracts, not direct EOA transfers. Returns value (ETH), direction, type (call/create), date, and hash. Use for tracing DeFi interactions or contract execution flows.
Inputs: address (required), startblock, endblock, page, +2 more.
get_token_balancesA
List all ERC-20 token balances held by an Ethereum address. Returns token name, symbol, contract address, and human-readable amount for each token. Requires ETHERSCAN_API_KEY env var. Supports pagination for wallets with many tokens. Use get_erc20_transfers as fallback if no API key.
Inputs: address (required), page, offset.
get_transactionA
Look up a single transaction by its hash. Returns from, to, value (ETH), gas limit, gas price (Gwei), nonce, input data, and block number. Use when you have a specific tx hash and need full details. For bulk transactions, use get_transactions_by_address instead.
Inputs: txhash (required).
get_transactions_by_addressA
List normal (external) transactions for an Ethereum address. Returns value (ETH), direction (IN/OUT), gas price, function name, date, and status for each tx. Paginated, newest first. For ERC-20 transfers, use get_erc20_transfers. For contract-to-contract calls, use get_internal_transactions.
Inputs: address (required), startblock, endblock, page, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool addresses a distinct aspect of Ethereum blockchain data: ABI, ERC-20 transfers, ETH balance, gas price, internal transactions, token balances, single transaction, and transaction list. No two tools have overlapping purposes; descriptions clearly differentiate them.
All tool names follow a consistent verb_noun pattern using underscores, e.g., get_contract_abi, get_eth_balance, get_transactions_by_address. No deviations or mixed conventions.
Eight tools cover the core Etherscan functionalities without being excessive or insufficient. Each tool serves a clear and necessary purpose for interacting with blockchain data.
The set covers most common operations for Etherscan: balance checks, transaction history, token transfers, gas prices, ABI fetching. Minor gaps exist (e.g., event logs, block details, token info), but typical agent needs are well-served.
Maintenance
Related MCP Connectors
Etherscan MCP — multichain block-explorer API (Etherscan V2)
Wallet balances, ERC-20, blocks, transactions, receipts, ENS and payment checks, pay per call
Free Ethereum wallet profile & NFT metadata MCP tools (no signup).
Ethereum tools over MCP: Chainlink feeds, ENS, ERC-8004 agents, EAS attestations, transactions.
Related MCP Servers
- AlicenseAqualityDmaintenanceProvides Ethereum blockchain data tools via Etherscan's API, enabling users to check ETH balances, view transactions, track token transfers, fetch contract ABIs, monitor gas prices, and resolve ENS names.619 npm1MIT
- AlicenseAqualityDmaintenanceProvides Ethereum blockchain data tools via Etherscan's API, enabling users to check balances, view transactions, track token transfers, fetch contract ABIs and code, monitor gas prices, and resolve ENS names.7MIT
- AlicenseBqualityDmaintenanceAn MCP server providing comprehensive access to Ethereum blockchain data across 72+ networks via Etherscan's V2 API. It enables users to check balances, track transactions, analyze smart contracts, and monitor gas prices through natural language.2419 npm1MIT
- AlicenseNot gradedqualityDmaintenanceProvides comprehensive access to Ethereum blockchain data through the Etherscan API, including account, block, contract, transaction, token, gas, statistics, logs, and RPC proxy tools.4MIT