Etherscan Mcp Server

io.github.friendlygeorge由 GitHub 账号 friendlygeorge 发布v1.0.0更新于 Oct 24, 2026

MCP server for Etherscan — Ethereum blockchain explorer API for AI assistants

发布方自己的服务:Etherscan

已验证STDIO仅桌面金融开发者工具

概览

AI 生成的概览

一个本地 MCP 服务器,让助手以只读方式访问 Etherscan 的以太坊数据:余额、交易、代币转账、合约 ABI 和 Gas 价格。

可以做什么
查询地址的原生 ETH 余额和全部 ERC-20 代币余额,以及当前 Gas 价格估算(慢速、标准、快速)。按哈希获取单笔交易详情,或列出某地址的普通交易、内部交易和 ERC-20 转账记录。获取已验证智能合约的 ABI,查看其函数和事件。结果以易读的 Markdown 返回,并自动限速、在遇到 429 时重试。
适用场景
适合在不离开对话的情况下查看钱包、追踪链上活动和资金流向、在发交易前了解 Gas 成本,或理解已验证合约的接口。它是只读的,适合分析和审计,而不是发送交易。
运行要求
通过 npx 在本地运行,需要 Node.js 18+ 和 npm。无需 API 密钥,但没有密钥时 Etherscan 限制约为每 5 秒 1 次调用;设置 ETHERSCAN_API_KEY 环境变量可提高到约每秒 5 次。需要能访问 Etherscan API 的网络。
安装前请注意
只读:仅获取公开区块链数据,不写入、不签名、不发送交易,也不访问本地文件或执行 shell 命令。你查询的地址和交易哈希会发送到 Etherscan 的 API,因此查询内容对该第三方可见。可选的 ETHERSCAN_API_KEY 属于凭据,应避免放入共享配置。未验证的合约不会返回 ABI。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Etherscan Mcp Server,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Etherscan MCP Server

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

[npm version] [npm downloads] [License: MIT] [MCP Compatible] [TypeScript] [Claude Desktop] [Cursor]

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

ToolDescription
get_eth_balanceGet native ETH balance for an address
get_token_balancesGet all ERC-20 token balances for an address
get_transactionGet full details for a transaction by hash
get_transactions_by_addressGet normal (external) transactions for an address
get_erc20_transfersGet ERC-20 token transfer events for an address
get_internal_transactionsGet internal (contract-called) transactions for an address
get_contract_abiGet the ABI for a verified smart contract
get_gas_priceGet 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):

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:

json
{  "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 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)  ...

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:

json
{  "mcpServers": {    "etherscan": {      "command": "etherscan-mcp-server",      "env": {        "ETHERSCAN_API_KEY": "your_key_here"      }    }  }}

Development

bash
git clone https://github.com/nova/etherscan-mcp-server.gitcd etherscan-mcp-servernpm installnpm run buildnpm start

License

MIT

来源:README.md,提交 ceb3ec5

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.0.0最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

其他 Etherscan 集成