eth-mcp-server

eth-mcp-server

3.4

A comprehensive Ethereum MCP server implementation with wallet management, transaction handling, and contract interaction capabilities. Built with FastAPI and Web3.py.

The Ethereum MCP Server is an experimental and actively developed server implementation designed to manage Ethereum wallets, handle transactions, and interact with smart contracts. It is built using FastAPI and Web3.py, providing a robust framework for developers to manage Ethereum-based operations. The server supports wallet creation, importation, and balance checking, as well as transaction management including sending ETH, retrieving transaction details, and gas estimation. Future updates will include advanced features such as contract interaction, token management, and batch operations. The server is structured to facilitate easy development and testing, with a clear project structure and guidelines for contributing.

Features

  • {'name': 'Wallet Management', 'description': 'Create and import wallets, list managed wallets, check ETH balances, and handle private keys securely.'}
  • {'name': 'Transaction Management', 'description': 'Send ETH transactions, retrieve transaction details and receipts, estimate gas, manage nonces, and monitor transactions.'}
  • {'name': 'Contract Interaction (Coming Soon)', 'description': 'Deploy contracts, call methods, execute transactions, listen to events, and handle ABIs.'}
  • {'name': 'Token Management (Coming Soon)', 'description': 'Check ERC20 balances, perform transfers, retrieve NFT metadata, manage token approvals.'}
  • {'name': 'Advanced Features (Coming Soon)', 'description': 'Support for EIP-7702 delegation, event log retrieval, partial and full withdrawals, and batch operations.'}

Usage with Different Platforms

quick_start

bash
uv venv
source .venv/bin/activate
uv pip install -e .

set_up_environment

bash
cp .env.example .env
# Edit .env with your configuration

run_server

bash
python src/server.py

api_methods_wallet


{
  "method": "eth_createWallet",
  "params": {}
}

{
  "method": "eth_importWallet",
  "params": {
    "privateKey": "0x..."
  }
}

{
  "method": "eth_listWallets",
  "params": {}
}

{
  "method": "eth_getBalance",
  "params": {
    "address": "0x..."
  }
}

api_methods_transaction


{
  "method": "eth_sendTransaction",
  "params": {
    "from": "0x...",
    "to": "0x...",
    "value": "0x...",
    "gas": "0x...",
    "gasPrice": "0x..."
  }
}

{
  "method": "eth_getTransaction",
  "params": {
    "hash": "0x..."
  }
}

{
  "method": "eth_getTransactionReceipt",
  "params": {
    "hash": "0x..."
  }
}

{
  "method": "eth_estimateGas",
  "params": {
    "from": "0x...",
    "to": "0x...",
    "value": "0x..."
  }
}