MCP Etherscan Server

MCP Etherscan Server

Provides 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.

5ajaki

Finance
Developer Tools
Visit Server

Tools

check-balance

Check the ETH balance of an Ethereum address

get-transactions

Get recent transactions for an Ethereum address

get-token-transfers

Get ERC20 token transfers for an Ethereum address

get-contract-abi

Get the ABI for a smart contract

get-gas-prices

Get current gas prices in Gwei

get-ens-name

Get the ENS name for an Ethereum address

README

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

Prerequisites

  • Node.js >= 18
  • An Etherscan API key (get one at https://etherscan.io/apis)

Installation

  1. Clone the repository:
git clone [your-repo-url]
cd mcp-etherscan-server
  1. Install dependencies:
npm install
  1. Create a .env file in the root directory:
ETHERSCAN_API_KEY=your_api_key_here
  1. Build the project:
npm run build

Running the Server

Start the server:

npm start

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

  1. check-balance

    • Input: Ethereum address
    • Output: ETH balance in both Wei and ETH
  2. get-transactions

    • Input: Ethereum address, optional limit
    • Output: Recent transactions with timestamps, values, and addresses
  3. get-token-transfers

    • Input: Ethereum address, optional limit
    • Output: Recent ERC20 token transfers with token details
  4. get-contract-abi

    • Input: Contract address
    • Output: Contract ABI in JSON format
  5. get-gas-prices

    • Input: None
    • Output: Current gas prices in Gwei
  6. get-ens-name

    • Input: Ethereum address
    • Output: Associated ENS name if available

Using with Claude Desktop

To add this server to Claude Desktop:

  1. Start the server using npm start

  2. In 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
  3. The Etherscan tools will now be available in your Claude conversations

Example Usage in Claude

You can use commands like:

Check the balance of 0x742d35Cc6634C0532925a3b844Bc454e4438f44e

or

Show me recent transactions for vitalik.eth

Development

To add new features or modify existing ones:

  1. The main server logic is in src/server.ts
  2. Etherscan API interactions are handled in src/services/etherscanService.ts
  3. Build after changes: npm run build

License

MIT License - See LICENSE file for details

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
MCP Package Docs Server

MCP Package Docs Server

Facilitates LLMs to efficiently access and fetch structured documentation for packages in Go, Python, and NPM, enhancing software development with multi-language support and performance optimization.

Featured
Local
TypeScript
Claude Code MCP

Claude Code MCP

An implementation of Claude Code as a Model Context Protocol server that enables using Claude's software engineering capabilities (code generation, editing, reviewing, and file operations) through the standardized MCP interface.

Featured
Local
JavaScript
@kazuph/mcp-taskmanager

@kazuph/mcp-taskmanager

Model Context Protocol server for Task Management. This allows Claude Desktop (or any MCP client) to manage and execute tasks in a queue-based system.

Featured
Local
JavaScript
Linear MCP Server

Linear MCP Server

Enables interaction with Linear's API for managing issues, teams, and projects programmatically through the Model Context Protocol.

Featured
JavaScript
mermaid-mcp-server

mermaid-mcp-server

A Model Context Protocol (MCP) server that converts Mermaid diagrams to PNG images.

Featured
JavaScript
Jira-Context-MCP

Jira-Context-MCP

MCP server to provide Jira Tickets information to AI coding agents like Cursor

Featured
TypeScript
Crypto Price & Market Analysis MCP Server

Crypto Price & Market Analysis MCP Server

A Model Context Protocol (MCP) server that provides comprehensive cryptocurrency analysis using the CoinCap API. This server offers real-time price data, market analysis, and historical trends through an easy-to-use interface.

Featured
TypeScript
Linear MCP Server

Linear MCP Server

A Model Context Protocol server that integrates with Linear's issue tracking system, allowing LLMs to create, update, search, and comment on Linear issues through natural language interactions.

Featured
JavaScript