Ethereum blockchain data tools via MCP server for balances transactions ERC20 tokens gas ENS
The Etherscan Tools MCP Server provides a set of essential tools for interacting with the Ethereum blockchain data through the Model Context Protocol (MCP). This server is designed to be integrated into various AI applications, allowing them to leverage the extensive functionalities offered by Etherscan's API. By adhering to MCP standards, this server ensures seamless compatibility and flexibility across different platforms, enhancing user experiences and operational efficiencies.
Etherscan Tools offers a robust suite of features, such as checking ETH balances, viewing transaction histories, tracking ERC20 token transfers, fetching contract ABIs, monitoring gas prices, and resolving ENS names. These capabilities are crucial for developers and users alike who require a comprehensive set of tools to interact with the Ethereum blockchain.
The Etherscan Tools MCP Server implements multiple key features that empower AI applications by providing essential data and functionalities:
Each feature is exposed as an MCP endpoint, enabling AI applications like Claude Desktop, Continue, and Cursor to interact with the server using standardized commands.
The architecture of the Etherscan Tools MCP Server emphasizes modularity and scalability. The core src
directory contains the essential components necessary for implementing these features:
src/server.ts
, this file handles the primary server logic, creating endpoints that respond to API requests.src/services/etherscanService.ts
, ensuring that all Etherscan API calls comply with MCP standards.The server uses Node.js as its runtime environment and leverages ESDocs for comprehensive documentation. The server can be run locally using standard npm commands, making it easy to integrate into development workflows.
To set up the Etherscan Tools MCP Server:
Clone the Repository:
git clone [your-repo-url]
cd mcp-etherscan-server
Install Dependencies:
npm install
Create a Configuration File:
Create an .env
file in the root directory:
ETERSCAN_API_KEY=your_api_key_here
Build and Start the Server:
npm run build
npm start
The server will automatically bind to stdio, ensuring seamless interaction with compatible MCP clients such as Claude Desktop.
Scenario: A financial analyst needs real-time updates on the ETH balance of specific addresses and transaction details for auditing purposes.
Technical Implementation:
check-balance
to monitor balances dynamically.get-transactions
to track recent activities and flag suspicious transactions.Scenario: A developer is building an application that requires detailed ERC20 token transfer data for user transaction tracking.
Technical Implementation:
get-token-transfers
to capture real-time token movements.get-contract-abi
tool.Scenario: Minimizing transaction costs in a high-frequency trading application by utilizing current gas prices.
Technical Implementation:
get-gas-prices
to dynamically adjust trade execution based on cost efficiency.The Etherscan Tools MCP Server aims for broad compatibility across different platforms:
MCP Client | Resources | Tools | Prompts | Status |
---|---|---|---|---|
Claude Desktop | ✅ | ✅ | ✅ | Full Support |
Continue | ✅ | ❌ | ❌ | Partial Tool Support |
Cursor | ❌ | ✅ | ❌ | Tools Only |
mcpServers
File{
"mcpServers": {
"etherscanTools": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-etherscan-tools"],
"env": {
"ETHEREUM_SCAN_API_KEY": "your_api_key_here"
}
}
}
}
The Etherscan Tools MCP Server is designed to handle high volumes of requests efficiently, thanks to its modular architecture and scalable implementation. The server aims at supporting up to 100 concurrent users without significant performance degradation.
Feature | Performance Metrics |
---|---|
Balance Checking | ≤20 ms response time |
Transaction History View | ≤50 ms per request |
Token Transfers Tracking | ≤30 ms average latency |
Contract ABI Fetching | ≤1 sec timeout |
Gas Prices Monitoring | Real-time update interval |
Key environment variables include:
ETHERSCAN_API_KEY
: Required for Etherscan API access.PORT
: Specifies the port on which the server will listen (default is 3000).Example .env
file configuration:
ETHERSCAN_API_KEY=your_api_key_here
To ensure data security, the following best practices are recommended:
A: Follow the installation steps provided in the README, then configure Claude Desktop with the correct server details as shown in the example configuration snippet above.
A: Yes, the server has been tested to handle high traffic and can be deployed in any production scenario. However, thorough testing is recommended before going live with critical applications.
A: While Continues supports many MCP servers, its implementation might not align perfectly due to differences in development priorities or feature sets. The ethtools
toolset is partially supported for use cases that do not require full compatibility.
A: Ensure that the server logs any ENS resolution issues and periodically verify whether ENS names are correctly registered. Automated scripts can be used to check and update ENS entries if needed.
A: The get-gas-prices
endpoint attempts to provide up-to-date information but may encounter delays due to network latency or API rate limits imposed by Etherscan. Regular checks are recommended for critical applications.
Contributions are welcome! If you wish to contribute, please follow these guidelines:
git checkout -b feature-branch-name
.npm test
.Explore the broader MCP ecosystem and utilize additional resources:
By integrating Etherscan Tools MCP Server, you can significantly enhance the functionality and capabilities of your AI applications while ensuring seamless interoperability with other MCP clients.
RuinedFooocus is a local AI image generator and chatbot image server for seamless creative control
Simplify MySQL queries with Java-based MysqlMcpServer for easy standard input-output communication
Access NASA APIs for space data, images, asteroids, weather, and exoplanets via MCP integration
Learn to set up MCP Airflow Database server for efficient database interactions and querying airflow data
Build stunning one-page websites track engagement create QR codes monetize content easily with Acalytica
Explore CoRT MCP server for advanced self-arguing AI with multi-LLM inference and enhanced evaluation methods