
huahuayu/etherscan-mcp-server
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
etherscan v2 api mcp server
概要
A Go implementation of an Etherscan API client for the Model Context Protocol (MCP) that enables LLM applications to access Etherscan blockchain data. - Access Etherscan API V2 for multi-chain support - Use a single API key for over 50 supported chains - Supports various blockchain data retrieval methods: - Account balances - Block information - Contract data (ABI, source code) - Gas oracle - Token information - Transaction data - And more - Etherscan API key (get from https://etherscan.io/myapikey) Run the server using stdin/stdout communication (default mode): This mode is useful for direct integration with LLM applications that communicate via stdin/stdout. Restart cursor and check if it's success: Run the server in Server-Sent Events mode: In SSE mode, the server listens on HTTP and provides an SSE endpoint.
README
以下は原文 README の抜粋です。原文を見る。
Etherscan MCP Server
A Go implementation of an Etherscan API client for the Model Context Protocol (MCP) that enables LLM applications to access Etherscan blockchain data.
Features
- Access Etherscan API V2 for multi-chain support
- Use a single API key for over 50 supported chains
- Supports various blockchain data retrieval methods:
- Account balances
- Block information
- Contract data (ABI, source code)
- Gas oracle
- Token information
- Transaction data
- And more
Requirements
- Etherscan API key (get from https://etherscan.io/myapikey)
Installation
-
Clone the repository:
git clone https://github.com/huahuayu/etherscan-mcp-server.git cd etherscan-mcp-server -
Set Etherscan API key env variable:
ETHERSCAN_API_KEY=your_api_key_here -
Build the server:
make build -
Install the server:
make install # install to /usr/local/bin
Usage
Default Mode (Standard Input/Output)
Run the server using stdin/stdout communication (default mode):
./bin/etherscan-mcp-server
This mode is useful for direct integration with LLM applications that communicate via stdin/stdout.
MCP config:
{
"mcpServers": {
"etherscan-mcp-server": {
"command": "etherscan-mcp-server",
"env": {
"ETHERSCAN_API_KEY": "$your_api_key"
}
}
}
}
Restart cursor and check if it’s success:

SSE Mode
Run the server in Server-Sent Events mode:
./bin/etherscan-mcp-server --sse
In SSE mode, the server listens on HTTP and provides an SSE endpoint.
SSE MCP config:
{
"mcpServers": {
"etherscan-mcp-server": {
"url": "http://localhost:4000/sse",
"env": {
"ETHERSCAN_API_KEY": "$your_api_key"
}
}
}
}
Server Options
--sse: Enable SSE server mode (default is stdin/stdout mode)--port: Specify the port for SSE server (defaults to PORT env var or 4000)
Connection Endpoints (SSE Mode)
When running in SSE mode, the server provides:
- SSE Endpoint:
http://localhost:4000/sse
Supported Chains
50+ chains supported, please refer to the Etherscan V2 Supported Chains for a complete list and their corresponding Chain IDs.
Note on Free Tier Limitations & RPC Fallback: According to Etherscan’s supported chains policy, some networks are not available under the Free API plan. These include (but are not limited to):
- BNB Smart Chain (BSC) — Chain ID: 56
- Base — Chain ID: 8453
- Avalanche C-Chain — Chain ID: 43114
インストール
This server does not publish a one-line install command.
Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →設定
{
"mcpServers": {
"etherscan-mcp-server": {
"command": "etherscan-mcp-server",
"env": {
"ETHERSCAN_API_KEY": "$your_api_key"
}
}
}
}