Etherscan MCP Server logo

Etherscan MCP Server

Community
huahuayu

etherscan v2 api mcp server

Publisherhuahuayu
Repositoryetherscan-mcp-server
LanguageGo
Forks
3
Stars
9
Available tools
0
Transport typestdio, streamable-http
Categories
Links
  • Connect tools to AI workflows

    Etherscan MCP Server exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    9 stars and 3 forks from the linked repository.

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

Installation

  1. Clone the repository:

    bash
    git clone https://github.com/huahuayu/etherscan-mcp-server.git
    cd etherscan-mcp-server
  2. Set Etherscan API key env variable:

    bash
    ETHERSCAN_API_KEY=your_api_key_here
  3. Build the server:

    bash
    make build
  4. Install the server:

    bash
    make install # install to /usr/local/bin

Usage

Default Mode (Standard Input/Output)

Run the server using stdin/stdout communication (default mode):

bash
./bin/etherscan-mcp-server

This mode is useful for direct integration with LLM applications that communicate via stdin/stdout.

MCP config:

json
{
  "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:

bash
./bin/etherscan-mcp-server --sse

In SSE mode, the server listens on HTTP and provides an SSE endpoint.

SSE MCP config:

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

For these three chains, this server has a built-in RPC fallback mechanism: when the Etherscan API returns NOTOK, it automatically falls back to free public RPC endpoints using standard JSON-RPC methods. No paid plan is needed for the following tools on these chains:

ToolJSON-RPC Method
getLatestBlockNumbereth_blockNumber
getAccountBalanceeth_getBalance
getTokenBalanceeth_call (balanceOf)
getTokenDetailseth_call (name/symbol/decimals)
getTransactionByHasheth_getTransactionByHash
getTransactionReceipteth_getTransactionReceipt
getTransactionCounteth_getTransactionCount
executeContractMethodeth_call

RPC Endpoints Used:

  • BSC: https://binance.llamarpc.com
  • Base: https://base.llamarpc.com
  • Avalanche C-Chain: https://api.avax.network/ext/bc/C/rpc

Other Etherscan-specific tools (e.g., getContractABI, getTransactionsByAddress) still require the Etherscan paid plan for these chains.

Example Queries

You can use natural language queries like these:

Account and Balance Information

  • "What's the ETH balance of address 0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae?"
  • "Show me the token balance for USDT on address 0x123abc... on BSC"
  • "How many transactions has 0xvitalik.eth made from this address?"

Block Information

  • "Get information about the latest Polygon block"
  • "What are the rewards for miners in block 17000000?"
  • "Who mined block 16900000 on Ethereum?"

Contract Interaction

  • "Show me the source code at 0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"
  • "What's the ABI for the USDC contract on Polygon?"
  • "Call the balanceOf function of USDT contract with my address as parameter"

Transaction Information

  • "Give me details for transaction 0x123456789abcdef..."
  • "Has transaction 0xabcdef... been confirmed yet?"
  • "What was the gas price used in transaction 0x789abc..."

Gas and Network

  • "What are the current gas prices on Ethereum?"
  • "What's the recommended gas price for a fast transaction right now?"
  • "How many transactions are pending on Ethereum network?"

Token Information

  • "Tell me about the LINK token contract"
  • "What ERC-721 NFTs does address 0x123... own?"
  • "Show recent token transfers for 0xvitalik.eth"

Custom Queries

  • "Track all USDC transfers to Binance hot wallet in the last 1000 blocks"
  • "Which addresses received the most ETH in block 17000000?"
  • "Compare gas usage on Ethereum vs Arbitrum for similar transactions"

Available Tools

The Etherscan MCP Server provides the following tools for accessing blockchain data:

  1. getAccountBalance - Get the balance of an account on a specific blockchain
  2. getBlockByNumber - Get block information by block number
  3. getBlockRewards - Get block rewards by block number
  4. getContractABI - Get the ABI for a verified contract
  5. getContractSourceCode - Get the source code of a verified contract
  6. executeContractMethod - Execute a read contract function
  7. getGasOracle - Get current gas price oracle output
  8. getTokenBalance - Get the token balance of an account on a specific blockchain
  9. getTokenDetails - Get comprehensive token information
  10. getTransactionByHash - Get transaction details by hash
  11. getTransactionByBlockNumberAndIndex - Get transaction by block number and index
  12. getTransactionCount - Get the number of transactions sent from an address
  13. getTransactionReceipt - Check transaction receipt status
  14. getTransactionStatus - Check contract execution status
  15. getTransactionsByAddress - Get list of transactions by address
  16. getInternalTransactionsByAddress - Get list of internal transactions by address
  17. getTokenTransfersByAddress - Get list of token transfers by address
  18. getERC721Transfers - Get list of ERC721 token transfers by address
  19. getLatestBlockNumber - Get the latest block number

Each tool accepts specific parameters and provides blockchain data in a structured format.

License

MIT

Installation

TypingMind
Prerequisites:

Node.js 18+

{
  "mcpServers": {
    "huahuayu-etherscan-mcp-server": {
      "command": "",
      "args": []
    }
  }
}

Use Etherscan MCP Server MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Etherscan MCP Server is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. You can run MCP locally on your device or connect to a remote MCP server URL.

Option 1: Use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Etherscan MCP Server as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Etherscan MCP Server MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "huahuayu-etherscan-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "etherscan-mcp-server"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Etherscan MCP Server MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Etherscan MCP Server MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Etherscan MCP Server to help me with this task?
Etherscan MCP Server
Sure. I read it.
Here is what I found using Etherscan MCP Server.

Option 2: Add an MCP server URL

Use this when Etherscan MCP Server is already hosted remotely or your team wants one shared connector that multiple users can access.

1

Open MCP connectors

In TypingMind, go to Plugins, open MCP connectors, then choose Add URL.

  1. Open TypingMind in your browser.
  2. Go to Plugins.
  3. Open MCP connectors.
  4. Click Add URL.
TypingMind Add Custom MCP Server URL form
2

Paste the server URL

Enter your server URL in the Server URL field. Add a connection name, description, icon, custom HTTP headers, or OAuth client settings if the server requires them.

  1. Paste your server URL into the Server URL field.
  2. Enter a connection name for Etherscan MCP Server.
  3. Add a description and icon if you want it to be easier to identify.
  4. Add custom HTTP headers or OAuth client details if the server requires authentication.
3

Create the connection

Click Create connection, then return to the Plugins list and confirm the new MCP connection is active.

  1. Click Create connection.
  2. Return to the MCP connectors list.
  3. Confirm the Etherscan MCP Server connection appears as active.
  4. Refresh the plugin list if the connection does not appear immediately.
4

Switch models without reconnecting

Start a chat with your preferred model, enable the Etherscan MCP Server tools from Plugins, and switch to another model whenever needed. The MCP connection stays available to the TypingMind workspace.

  1. Start a new chat in TypingMind.
  2. Select the AI model you want to use.
  3. Enable the Etherscan MCP Server tools from Plugins.
  4. Ask the model to use the tool when needed.
  5. Switch to another AI model and reuse the same MCP connection.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Etherscan MCP Server to help me with this task?
Etherscan MCP Server
Sure. I read it.
Here is what I found using Etherscan MCP Server.

Frequently asked questions

What is the Etherscan MCP Server MCP server used for?

Etherscan MCP Server is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Etherscan MCP Server MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Etherscan MCP Server with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Etherscan MCP Server MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Etherscan MCP Server connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Etherscan MCP Server MCP to TypingMind?

Etherscan MCP Server can be connected in TypingMind with the local MCP connector or by adding a remote MCP server URL. Use the local connector when the server needs access to files, apps, or private resources on your device, and use a server URL when the MCP server is hosted remotely.

What tools does Etherscan MCP Server MCP provide in TypingMind?

Etherscan MCP Server exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Etherscan MCP Server MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Etherscan MCP Server requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇