
crazyrabbitltc/mcp-etherscan-server
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
crazyrabbitltc/mcp-etherscan-server - кандидат на сервер MCP, импортированный из https://github.com/crazyrabbitltc/mcp-etherscan-server.
Обзор
crazyrabbitltc/mcp-etherscan-server - кандидат на сервер MCP, импортированный из https://github.com/crazyrabbitltc/mcp-etherscan-server.
Обзор (машинный перевод)
Сервер MCP (Model Context Protocol), который предоставляет инструменты данных блокчейна Ethereum через API Etherscan. Функции включают проверку остатков ETH, просмотр истории транзакций, отслеживание переводов ERC20, получение контрактных ABI, мониторинг цен на газ и определение имен ENS.
Особенности
Проверка баланса: получить ETH-баланс для любого адреса Ethereum ** История транзакций**: Просмотреть последние транзакции с подробной информацией Токен-трансферы: Отслеживайте передачу токенов ERC20 с деталями токенов
- ** Договор ABI**: Получите смарт-контракты ABI для развития ** Цены на газ**: мониторинг текущих цен на газ (безопасно низкие, стандартные, быстрые) Резолюция ENS: Решать адреса Ethereum для имен ENS
Предпосылки
Node.js >= 18
- Etherscan API ключ (получить один на https://etherscan.io/apis))
##Установка
-
Клонировать хранилище:
-
Установить зависимости:
-
Создать
.envфайл в корневом каталоге:
4.Создать проект:
Запуск сервера
Запустите сервер:
Сервер будет работать на stdio, что делает его совместимым с MCP-клиентами, такими как Claude Desktop.
Как это работает
Эта страница переведена автоматически. Технические детали смотрите в оригинале.
README
Показан фрагмент оригинального 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
- Clone the repository:
git clone [your-repo-url]
cd mcp-etherscan-server
- Install dependencies:
npm install
- Create a
.envfile in the root directory:
ETHERSCAN_API_KEY=your_api_key_here
- 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
-
check-balance- Input: Ethereum address
- Output: ETH balance in both Wei and ETH
-
get-transactions- Input: Ethereum address, optional limit
- Output: Recent transactions with timestamps, values, and addresses
-
get-token-transfers- Input: Ethereum address, optional limit
- Output: Recent ERC20 token transfers with token details
-
get-contract-abi- Input: Contract address
- Output: Contract ABI in JSON format
-
get-gas-prices- Input: None
- Output: Current gas prices in Gwei
-
get-ens-name- Input: Ethereum address
- Output: Associated ENS name if available
Using with Claude Desktop
To add this server to Claude Desktop:
-
Start the server using
npm start -
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
-
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:
- The main server logic is in
src/server.ts
Установка
This server does not publish a one-line install command.
Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →