Skip to main content
Glama

MCP Ethers Wallet

MCP Ethers Wallet NPM Version

A Model Context Protocol server for interacting with Ethereum wallets and networks using Ethers.js v6. This server provides LLMs with a standardized interface to interact with Ethereum networks, smart contracts, and wallets.

Overview

The MCP Ethers Wallet server implements the Model Context Protocol specification, providing LLMs with tools to:

  • Query blockchain data across multiple networks
  • Interact with smart contracts
  • Manage wallet operations
  • Resolve ENS names
  • Handle transactions
  • Estimate gas costs

Installation

npm install mcp-ethers-wallet

Quick Start

Starting the Server

import { startServer } from 'mcp-ethers-wallet'; startServer().catch((error) => { console.error('Failed to start server:', error); process.exit(1); });

Using with Claude Desktop

  1. Install Claude Desktop
  2. Add a new MCP server with the following configuration:
    "ethers": { "command": "node", "args": [ "/path-to-mcp-ethers-wallet/build/src/index.js" ], "env": { "ALCHEMY_API_KEY": "<<your alchemy api key>>" } }
  3. The tools will now be available in your Claude conversations

Testing with MCP Inspector

  1. Install the MCP Inspector:
    npm install -g @modelcontextprotocol/inspector
  2. Start the server:
    npm start
  3. In another terminal, run the inspector:
    mcp-inspector
  4. Open http://localhost:5173 in your browser to interact with the tools

Available Tools

Network Information

  • getSupportedNetworks: Get a list of all supported networks and their configurations
  • getBlockNumber: Get the current block number for a network
  • getBlockDetails: Get detailed information about a specific block
  • getGasPrice: Get the current gas price
  • getFeeData: Get detailed fee data including base fee and priority fee

Wallet Operations

  • checkWalletExists: Check if a wallet is configured (without exposing private keys)
  • getWalletBalance: Get the native token balance of a wallet
  • getWalletTransactionCount: Get the number of transactions sent from a wallet
  • getERC20Balance: Get the balance of an ERC20 token for a wallet

Transaction Management

  • getTransactionDetails: Get detailed information about a transaction
  • sendTransaction: Send a native token transaction
  • sendTransactionWithOptions: Send a transaction with custom options (gas, nonce, etc)
  • getTransactionsByBlock: Get all transactions in a specific block

Smart Contract Interaction

  • contractCall: Execute a contract write method
  • contractCallView: Execute a contract read method
  • getContractCode: Get the bytecode of a deployed contract

ENS Operations

  • lookupAddress: Resolve an ENS name to an address
  • resolveName: Resolve an address to an ENS name

Network Support

The server supports multiple networks including:

  • Ethereum Mainnet
  • Polygon PoS
  • Arbitrum
  • Optimism
  • Base
  • And more...

Use the getSupportedNetworks tool to get a complete list of supported networks.

Configuration

The server can be configured using environment variables:

  • ALCHEMY_API_KEY: Your Alchemy API key for network access
  • PRIVATE_KEY: Private key for transaction signing (optional)
  • DEFAULT_NETWORK: Default network to use (defaults to "mainnet")

Error Handling

The server provides detailed error messages for common issues:

  • Invalid network names or RPC URLs
  • Chain ID mismatches
  • Contract interaction failures
  • Transaction errors
  • Network connectivity issues

Development

# Install dependencies npm install # Run tests npm test # Start in development mode npm run dev # Build npm run build

Contributing

Issues and pull requests are welcome on GitHub.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

Dennison Bertram (dennison@tally.xyz)

Install Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

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.

A Model Context Protocol server that gives LLMs the ability to interact with Ethereum networks, manage wallets, query blockchain data, and execute smart contract operations through a standardized interface.

  1. Overview
    1. Installation
      1. Quick Start
        1. Starting the Server
        2. Using with Claude Desktop
        3. Testing with MCP Inspector
      2. Available Tools
        1. Network Information
        2. Wallet Operations
        3. Transaction Management
        4. Smart Contract Interaction
        5. ENS Operations
      3. Network Support
        1. Configuration
          1. Error Handling
            1. Development
              1. Contributing
                1. License
                  1. Author

                    Related MCP Servers

                    • A
                      security
                      A
                      license
                      A
                      quality
                      A Model Context Protocol server that enables AI agents to interact with 30+ Ethereum-compatible blockchain networks, providing services like token transfers, contract interactions, and ENS resolution through a unified interface.
                      Last updated -
                      28
                      988
                      304
                      TypeScript
                      MIT License
                    • -
                      security
                      A
                      license
                      -
                      quality
                      A Model Context Protocol server that enables interaction with Foundry tools through natural language, allowing users to create projects, build contracts, run tests, and manage Ethereum development environments.
                      Last updated -
                      1
                      Python
                      MIT License
                    • A
                      security
                      A
                      license
                      A
                      quality
                      A Model Context Protocol server that allows LLMs to interact with blockchain through MetaMask, keeping private keys securely in your crypto wallet while enabling transactions and blockchain operations.
                      Last updated -
                      28
                      0
                      5
                      TypeScript
                      MIT License
                    • A
                      security
                      F
                      license
                      A
                      quality
                      A Model Context Protocol server that enables LLMs to explore and interact with API specifications by providing tools for loading, browsing, and getting detailed information about API endpoints.
                      Last updated -
                      4
                      10
                      13
                      TypeScript

                    View all related MCP servers

                    MCP directory API

                    We provide all the information about MCP servers via our MCP API.

                    curl -X GET 'https://glama.ai/api/mcp/v1/servers/crazyrabbitLTC/mcp-ethers-server'

                    If you have feedback or need assistance with the MCP directory API, please join our Discord server