Get the FREE Ultimate OpenClaw Setup Guide →

mcp-ethers

A full implementation of Ethers as an AI tool for the model context protocol

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio crazyrabbitltc-mcp-ethers-server node /path/to/ethers-server/build/src/index.js \
  --env INFURA_API_KEY="your_infura_key" \
  --env ALCHEMY_API_KEY="your_alchemy_key" \
  --env DEFAULT_NETWORK="mainnet"

How to use

This MCP server provides a complete ethers.js v6 wrapper with 40+ tools for Ethereum blockchain interactions. It exposes core Ethereum capabilities such as network info, block and transaction data, wallet operations, gas estimation, ENS resolution, message signing, and unit conversions, as well as token-standard helpers for ERC20, ERC721, and ERC1155, transaction preparation and secure broadcasting, gas optimization, and contract interaction tooling for smart contract calls and code inspection. The server is designed to work across 20+ EVM networks (including Ethereum, Polygon, Arbitrum, Base, and more) and is intended to be integrated into Claude workflows via the MCP mechanism.

Typical usage involves starting the server (as described in installation) and interfacing with it via Claude commands or standard API calls that map to the provided tool set. Example workflows include querying balances, retrieving token information, preparing transactions, broadcasting signed transactions, and inspecting contract data. The Quick Example section demonstrates how to request a wallet balance and ERC20 token info using the provided endpoints. The server is built with ethers.js v6 for compatibility and performance, and it supports external signing and private-key handling without storing keys on the server.

To use the tools, first ensure the server is running through the MCP configuration. Then invoke the relevant commands or Claude prompts (for example, balance checks, token lookups, or contract interactions) using the standard tool shapes described in the documentation. The environment variables allow you to select networks and authenticate with API providers, enabling reliable access to mainnet and test networks through Alchemy, Infura, or other configured providers.

How to install

Prerequisites:

  • Node.js and npm installed on your machine (Node.js 14+ recommended).
  • Access to the internet to install dependencies.

Install steps:

  1. Clone the ethers-server repository: git clone https://github.com/yourusername/ethers-server.git
  2. Navigate to the project directory: cd ethers-server
  3. Install dependencies: npm install
  4. Build the project (if a build step is defined): npm run build
  5. Start the MCP server using your MCP framework (refer to your MCP provider's guidance) and ensure the server path matches the index.js file in the build/src directory. For example: node /path/to/ethers-server/build/src/index.js
  6. Configure environment variables as needed (see Environment Variables in the README): Create a .env file with required keys, or set them in your hosting environment, e.g.: ALCHEMY_API_KEY=your_alchemy_key INFURA_API_KEY=your_infura_key DEFAULT_NETWORK=mainnet

Notes:

  • If you use Claude integration, you may add tools via Claude commands such as: claude mcp add ethers-wallet -- node /path/to/ethers-server/build/src/index.js
  • Ensure the API keys are kept secure and not exposed in client-side code.

Additional notes

Environment variables and configuration tips:

  • ALCHEMY_API_KEY and INFURA_API_KEY are optional but recommended for broad network access; without them, you may rely on other providers if configured.
  • DEFAULT_NETWORK determines the default network the server targets when not explicitly specified in a request.
  • Keep private keys out of the MCP server; use external signing methods (hardware wallets, offline signing) as described in the Security section.
  • If you need to update networks or endpoints, modify the environment or the internal configuration accordingly and restart the server.
  • When upgrading ethers.js to v6, review breaking changes in signing and provider behavior to ensure compatibility with existing tools.

Related MCP Servers

Sponsor this space

Reach thousands of developers