MCP Etherscan Server
Provides tools for interacting with Ethereum blockchain data via Etherscan's API, including checking ETH balances, viewing transaction history, tracking ERC20 token transfers, fetching contract ABIs and code, monitoring gas prices, and resolving ENS names.
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., "@MCP Etherscan Server check the ETH balance for 0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
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.
MCP Etherscan Server
An MCP (Model Context Protocol) server that provides Ethereum blockchain data tools via Etherscan's API. Features include checking ETH balances, viewing transaction history, tracking ERC20 transfers, fetching contract ABIs, monitoring gas prices, and resolving ENS names.
Features
Balance Checking: Get ETH balance for any Ethereum address
Transaction History: View recent transactions with detailed information
Token Transfers: Track ERC20 token transfers with token details
Contract ABI: Fetch smart contract ABIs for development
Contract Code: Fetch smart contract code for development
Gas Prices: Monitor current gas prices (Safe Low, Standard, Fast)
ENS Resolution: Resolve Ethereum addresses to ENS names
Related MCP server: MCP Etherscan Server
Prerequisites
Node.js >= 18
An Etherscan API key (obtain one at https://etherscan.io/apis)
Installation
Installing via Smithery
To install MCP Etherscan Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install mcp-etherscan-server --client claudeClone the repository:
git clone [your-repo-url]
cd mcp-etherscan-serverInstall dependencies:
npm installCreate a
.envfile in the root directory:
ETHERSCAN_API_KEY=your_api_key_hereBuild the project:
npm run buildRunning the Server
Start the server:
npm startThe server runs on stdio, making it compatible with MCP clients like Cursor and Claude Desktop.
How It Works
This server implements the Model Context Protocol (MCP) to provide tools for interacting with Ethereum blockchain data through Etherscan's API. Each tool is exposed as an MCP endpoint that can be called by compatible clients.
Available Tools
check-balanceInput: Ethereum address
Output: ETH balance in both Wei and ETH
get-transactionsInput: Ethereum address, optional limit
Output: Recent transactions with timestamps, values, and addresses
get-token-transfersInput: Ethereum address, optional limit
Output: Recent ERC20 token transfers with token details
get-contract-abiInput: Contract address
Output: Contract ABI in JSON format
get-contract-codeInput: Contract address
Output: Contract code in string format
get-gas-pricesInput: None
Output: Current gas prices in Gwei
get-ens-nameInput: Ethereum address
Output: Associated ENS name if available
Using with Cursor
To add this server to Cursor:
Open
Cursorand go toCursor settings->MCPSelect the option to either add the MCP Server
locallyorglobally, which will open a JSON configuration file.Add the configuration details. You can either add the MCP server via Smithery or via this repo locally:
Smithery
Using smithery.ai (This step requires a smithery.ai account)
Navigate to this URL in your web browser: https://smithery.ai/server/@ThirdGuard/mcp-etherscan-server
Enter your Etherscan API key in the field
etherscanApiKeyand click theconnectbuttonNavigate to the
Cursortab, copy the command, and run it in your terminal.
Manual
Paste the following configuration in the JSON file and replace
ETHERSCAN-API-KEY-HEREwith your Etherscan API key:{ "Etherscan Tools": { "command": "npx", "args": [ "-y", "@smithery/cli@latest", "run", "@ThirdGuard/mcp-etherscan-server", "--config", "\"{\\\"etherscanApiKey\\\":\\\"ETHERSCAN-API-KEY-HERE\\\"}\"" ] } }Local
Paste the following configuration in the JSON file and replace
ABSOLUTE-PATH-HERE/mcp-etherscan-server/start.shwith the absolute path to thestart.shin this repo:{ "Etherscan Tools (local)": { "command": "ABSOLUTE-PATH-HERE/mcp-etherscan-server/start.sh", "args": [] } }Save the configuration
The Etherscan tools will now be available in your Cursor AI conversations
Example Usage in Cursor
You can use commands like:
Check the balance of 0x742d35Cc6634C0532925a3b844Bc454e4438f44eor
Get the code of this smart contract: 0xdAC17F958D2ee523a2206206994597C13D831ec7 (USDT)Development
To add new features or modify existing ones:
The main server logic is in
src/server.tsEtherscan API interactions are handled in
src/services/etherscanService.tsRun
npm run buildafter making changes
License
MIT License - See LICENSE file for details
Available Tools
7 toolscheck-balanceB
Check the ETH balance of an Ethereum address
Inputs: address (required).
get-contract-abiC
Get the ABI for a smart contract
Inputs: address (required).
get-contract-codeC
Get the source code for a smart contract
Inputs: address (required).
get-ens-nameB
Get the ENS name for an Ethereum address
Inputs: address (required).
get-gas-pricesA
Get current gas prices in Gwei
Inputs: no named parameters.
get-token-transfersC
Get ERC20 token transfers for an Ethereum address
Inputs: address (required), limit.
get-transactionsB
Get recent transactions for an Ethereum address
Inputs: address (required), limit.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Every tool has a clearly distinct purpose targeting specific Ethereum-related operations: balance checking, contract ABI/code retrieval, ENS resolution, gas price fetching, token transfer history, and transaction history. No overlap exists between these functions, making tool selection straightforward for an agent.
All tool names follow a consistent verb_noun pattern with hyphens (e.g., check-balance, get-contract-abi, get-ens-name). The naming is uniform across all seven tools, using clear action verbs like 'check' and 'get' paired with specific nouns.
Seven tools is well-scoped for an Etherscan server, covering essential Ethereum blockchain interactions without being overwhelming. Each tool serves a distinct and useful purpose, such as balance checks, contract data retrieval, and transaction history, making the count appropriate for the domain.
The tool set provides strong coverage for common Ethereum queries, including balance, contract details, ENS, gas prices, and transaction histories. A minor gap exists in write operations (e.g., sending transactions or interacting with contracts), but for a read-focused server, this is reasonable and agents can work around it.
Maintenance
Related MCP Connectors
Etherscan Api - 71 tools for data, metrics, and on-chain analytics
EVM chain reads for agents: balances, gas, fees, blocks, txs, logs, ENS. 15 tools, x402 per call.
Read-only Etherscan V2 blockchain data: balances, transactions, transfers, tokens, contracts, logs.
Wallet balances, ERC-20, blocks, transactions, receipts, ENS and payment checks, pay per call
Related MCP Servers
- AlicenseAqualityDmaintenanceFacilitates interaction with Ethereum blockchain data via Etherscan's API, providing real-time access to balances, transactions, token transfers, contract ABIs, gas prices, and ENS name resolutions.613 npm30MIT
- 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.61MIT
- AlicenseAqualityFmaintenanceProvides MCP tools to query Etherscan for Ethereum blockchain data—ETH balances, ERC-20 tokens, transactions, contract ABIs, and gas prices—without requiring an API key.811 npmMIT
- 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