MCP Etherscan サーバー
Etherscan APIを介してEthereumブロックチェーンデータツールを提供するMCP(Model Context Protocol)サーバー。ETH残高の確認、トランザクション履歴の表示、ERC20送金の追跡、コントラクトABIの取得、ガス価格の監視、ENS名の解決などの機能を備えています。
特徴
- 残高確認: 任意のEthereumアドレスのETH残高を取得
- 取引履歴: 最近の取引を詳細情報とともに表示します
- トークン転送: トークンの詳細でERC20トークンの転送を追跡します
- コントラクト ABI : 開発用のスマート コントラクト ABI を取得します。
- ガソリン価格:現在のガソリン価格(安全低価格、標準価格、高速価格)を監視します
- ENS解決: EthereumアドレスをENS名に解決する
前提条件
- Node.js >= 18
- Etherscan API キー ( https://etherscan.io/apisで取得)
インストール
- リポジトリをクローンします。
- 依存関係をインストールします:
- ルート ディレクトリに
.env
ファイルを作成します。
- プロジェクトをビルドします。
サーバーの実行
サーバーを起動します。
サーバーは stdio 上で実行されるため、Claude Desktop などの MCP クライアントと互換性があります。
仕組み
このサーバーは、モデルコンテキストプロトコル(MCP)を実装し、EtherscanのAPIを介してEthereumブロックチェーンデータとやり取りするためのツールを提供します。各ツールは、互換性のあるクライアントから呼び出すことができるMCPエンドポイントとして公開されます。
利用可能なツール
check-balance
- 入力: Ethereumアドレス
- 出力: WeiとETHの両方のETH残高
get-transactions
- 入力: Ethereumアドレス、オプションの制限
- 出力: タイムスタンプ、値、アドレスを含む最近の取引
get-token-transfers
- 入力: Ethereumアドレス、オプションの制限
- 出力: 最近のERC20トークン転送とトークンの詳細
get-contract-abi
- 入力: 契約アドレス
- 出力: JSON形式の契約ABI
get-gas-prices
- 入力: なし
- 出力: グウェイの現在のガス価格
get-ens-name
- 入力: Ethereumアドレス
- 出力: 関連するENS名(存在する場合)
Claude Desktopでの使用
このサーバーをClaude Desktopに追加するには:
npm start
を使用してサーバーを起動します。- Claude Desktopの場合:
- 設定に移動
- MCPサーバーセクションに移動します
- 「サーバーを追加」をクリックします
- 次の設定を入力します。
- 設定を保存する
- EtherscanツールがClaudeとの会話で利用できるようになります
クロードでの使用例
次のようなコマンドを使用できます:
または
発達
新しい機能を追加したり、既存の機能を変更したりするには:
- メインのサーバーロジックは
src/server.ts
にあります - Etherscan APIのインタラクションは
src/services/etherscanService.ts
で処理されます。 - 変更後のビルド:
npm run build
ライセンス
MITライセンス - 詳細はLICENSEファイルを参照
You must be authenticated.
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Etherscan の API を介して Ethereum ブロックチェーン データとのやり取りを容易にし、残高、トランザクション、トークン転送、契約 ABI、ガス価格、ENS 名前解決へのリアルタイム アクセスを提供します。
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityProvides Ethereum blockchain data tools via Etherscan's API, enabling users to check ETH balances, view transactions, track token transfers, fetch contract ABIs, monitor gas prices, and resolve ENS names.Last updated -63TypeScriptMIT License
Adamik MCP Serverofficial
-securityAlicense-qualityEnables read and write interactions with 60+ blockchain networks through Claude Desktop, providing a standardized multi-chain API for transaction management, account insights, staking, and token interactions.Last updated -TypeScriptMIT License- AsecurityAlicenseAqualityProvides tools for AI assistants to interact with the Ethereum blockchain through standard JSON-RPC methods, enabling queries for account balances, gas prices, and smart contract code.Last updated -63JavaScriptMIT License
- AsecurityAlicenseAqualityA tool that enables users to interact with blockchain data to retrieve token total supply, chain IDs, and filtered RPC endpoints across different blockchain networks.Last updated -69JavaScriptMIT License