Skip to main content
Glama

MCP Etherscan サーバー

Etherscan APIを介してEthereumブロックチェーンデータツールを提供するMCP(Model Context Protocol)サーバー。ETH残高の確認、トランザクション履歴の表示、ERC20送金の追跡、コントラクトABIの取得、ガス価格の監視、ENS名の解決などの機能を備えています。

特徴

  • 残高確認: 任意のEthereumアドレスのETH残高を取得

  • 取引履歴: 最近の取引を詳細情報とともに表示します

  • トークン転送: トークンの詳細でERC20トークンの転送を追跡します

  • コントラクト ABI : 開発用のスマート コントラクト ABI を取得します。

  • ガソリン価格:現在のガソリン価格(安全低価格、標準価格、高速価格)を監視します

  • ENS解決: EthereumアドレスをENS名に解決する

Related MCP server: Etherscan MCP Python

前提条件

インストール

  1. リポジトリをクローンします。

git clone [your-repo-url]
cd mcp-etherscan-server
  1. 依存関係をインストールします:

npm install
  1. ルート ディレクトリに.envファイルを作成します。

ETHERSCAN_API_KEY=your_api_key_here
  1. プロジェクトをビルドします。

npm run build

サーバーの実行

サーバーを起動します。

npm start

サーバーは stdio 上で実行されるため、Claude Desktop などの MCP クライアントと互換性があります。

仕組み

このサーバーは、モデルコンテキストプロトコル(MCP)を実装し、EtherscanのAPIを介してEthereumブロックチェーンデータとやり取りするためのツールを提供します。各ツールは、互換性のあるクライアントから呼び出すことができるMCPエンドポイントとして公開されます。

利用可能なツール

  1. check-balance

    • 入力: Ethereumアドレス

    • 出力: WeiとETHの両方のETH残高

  2. get-transactions

    • 入力: Ethereumアドレス、オプションの制限

    • 出力: タイムスタンプ、値、アドレスを含む最近の取引

  3. get-token-transfers

    • 入力: Ethereumアドレス、オプションの制限

    • 出力: 最近のERC20トークン転送とトークンの詳細

  4. get-contract-abi

    • 入力: 契約アドレス

    • 出力: JSON形式の契約ABI

  5. get-gas-prices

    • 入力: なし

    • 出力: グウェイの現在のガス価格

  6. get-ens-name

    • 入力: Ethereumアドレス

    • 出力: 関連するENS名(存在する場合)

Claude Desktopでの使用

このサーバーをClaude Desktopに追加するには:

  1. npm startを使用してサーバーを起動します。

  2. Claude Desktopの場合:

    • 設定に移動

    • MCPサーバーセクションに移動します

    • 「サーバーを追加」をクリックします

    • 次の構成を入力します。

      {
        "name": "Etherscan Tools",
        "transport": "stdio",
        "command": "node /path/to/mcp-etherscan-server/build/index.js"
      }
    • 設定を保存する

  3. EtherscanツールがClaudeとの会話で利用できるようになります

クロードでの使用例

次のようなコマンドを使用できます:

Check the balance of 0x742d35Cc6634C0532925a3b844Bc454e4438f44e

または

Show me recent transactions for vitalik.eth

発達

新しい機能を追加したり、既存の機能を変更したりするには:

  1. メインのサーバーロジックはsrc/server.tsにあります

  2. Etherscan APIのインタラクションはsrc/services/etherscanService.tsで処理されます。

  3. 変更後のビルド: npm run build

ライセンス

MITライセンス - 詳細はLICENSEファイルを参照

Available Tools

6 tools
check-balanceB

Check the ETH balance of an Ethereum address

Inputs: address (required).

get-contract-abiC

Get the ABI for a smart contract

Inputs: address (required).

get-ens-nameB

Get the ENS name for an Ethereum address

Inputs: address (required).

get-gas-pricesA

Get current gas prices in Gwei

Inputs: no named parameters.

get-token-transfersC

Get ERC20 token transfers for an Ethereum address

Inputs: address (required), limit.

get-transactionsB

Get recent transactions for an Ethereum address

Inputs: address (required), limit.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 6 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose targeting different Ethereum-related functions: checking balances, retrieving contract ABIs, resolving ENS names, getting gas prices, fetching token transfers, and listing transactions. There is no overlap or ambiguity in their intended use cases.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern using snake_case (e.g., check-balance, get-contract-abi, get-ens-name). The naming is uniform and predictable across all six tools.

    Tool Count5/5

    With 6 tools, this server is well-scoped for its Ethereum/blockchain domain. Each tool serves a specific, essential function without redundancy, making the count appropriate and manageable.

    Completeness4/5

    The toolset covers key read-only operations for Ethereum interactions, including balance checks, contract data, ENS resolution, gas prices, token transfers, and transactions. A minor gap exists in write operations (e.g., sending transactions or interacting with contracts), but the provided tools are sufficient for common querying tasks.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers