The MCP Etherscan Server provides access to Ethereum blockchain data via Etherscan's API. With this server, you can:
Check ETH balance of any Ethereum address
View transaction history for an Ethereum address
Track ERC20 token transfers for an Ethereum address
Fetch ABI for smart contracts
Monitor current gas prices in Gwei
Resolve ENS names associated with Ethereum addresses
Provides Ethereum blockchain data tools via Etherscan's API, including checking ETH balances, viewing transaction history, tracking ERC20 transfers, fetching contract ABIs, monitoring gas prices, and resolving ENS names
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
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 (get one at https://etherscan.io/apis)
Installation
Clone the repository:
Install dependencies:
Create a
.envfile in the root directory:
Build the project:
Running the Server
Start the server:
The server will run on stdio, making it compatible with MCP clients like 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-gas-pricesInput: None
Output: Current gas prices in Gwei
get-ens-nameInput: Ethereum address
Output: Associated ENS name if available
Using with Claude Desktop
To add this server to Claude Desktop:
Start the server using
npm startIn Claude Desktop:
Go to Settings
Navigate to the MCP Servers section
Click "Add Server"
Enter the following configuration:
{ "name": "Etherscan Tools", "transport": "stdio", "command": "node /path/to/mcp-etherscan-server/build/index.js" }Save the configuration
The Etherscan tools will now be available in your Claude conversations
Example Usage in Claude
You can use commands like:
or
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.tsBuild after changes:
npm run build
License
MIT License - See LICENSE file for details