etherscan-mcp-server

etherscan-mcp-server

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

Category
访问服务器

README

Etherscan MCP Server

An MCP server for Etherscan — connect any MCP-compatible client to the Ethereum blockchain explorer.

MCP Compatible TypeScript License: MIT

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.

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_KEY for 5 calls/sec and full results
  • 8 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_eth_balance Get native ETH balance for an address
get_token_balances Get all ERC-20 token balances for an address
get_transaction Get full details for a transaction by hash
get_transactions_by_address Get normal (external) transactions for an address
get_erc20_transfers Get ERC-20 token transfer events for an address
get_internal_transactions Get internal (contract-called) transactions for an address
get_contract_abi Get the ABI for a verified smart contract
get_gas_price Get current gas price oracle (slow/standard/fast in Gwei)

Quick Start

1. Install

npm install -g etherscan-mcp-server

Or run directly with npx:

npx -y etherscan-mcp-server

2. Configure your MCP client

Add to your MCP client config (e.g. claude_desktop_config.json):

{
  "mcpServers": {
    "etherscan": {
      "command": "npx",
      "args": ["-y", "etherscan-mcp-server"]
    }
  }
}

Or with global install:

{
  "mcpServers": {
    "etherscan": {
      "command": "etherscan-mcp-server"
    }
  }
}

3. 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 ETH

get_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)
  ...

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 start

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选