About Ethereum MCP Server
Ethereum MCP Server is an experimental server for managing Ethereum wallets, transactions, and smart contract interactions, built with FastAPI and Web3.py. It is intended for developers exploring these operations through MCP; the README warns that it may not work and is under active development.
Key features
- 01Create, import, and list wallets
- 02Check ETH balances
- 03Send and monitor transactions
- 04Estimate gas and manage nonces
- 05Deploy and load contracts
- 06Read contract state and query events
Use cases
- 01Managing Ethereum wallets
- 02Sending transactions and checking receipts
- 03Deploying or interacting with contracts
- 04Reading contract data and past events
MCP support
Exposes Ethereum wallet, transaction, and contract operations to MCP clients through server methods. The project is marked highly experimental and may not currently work.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEEthereum MCP Server
WARNING: THIS REPO IS HIGHLY EXPERIMENTAL AND LIKELY TO NOT WORK AT THIS MOMENT. IT'S UNDER ACTIVE DEVELOPMENT AND WE WILL UPDATE THIS WARNING ONCE IT'S CONSIDERED SAFE TO RUN.
A comprehensive Ethereum MCP server implementation with wallet management, transaction handling, and contract interaction capabilities. Built with FastAPI and Web3.py.
Features
Wallet Management
- Create new wallets
- Import existing wallets
- List managed wallets
- Check ETH balances
- Secure private key handling
Transaction Management
- Send ETH transactions
- Get transaction details
- Get transaction receipts
- Gas estimation
- Nonce management
- Transaction monitoring
Contract Interaction
- Deploy contracts with ABI
- Load existing contracts
- Call state-changing methods
- Read contract state
- Query contract events
- ABI management
Deploy Contract
Deploy a new contract with its bytecode and ABI:
{
"method": "eth_deployContract",
"params": {
"from": "0x742d35Cc6634C0532925a3b844Bc9e7595f62b8e",
"abi": [...], // Contract ABI array
"bytecode": "0x608060...", // Contract bytecode
"constructorArgs": ["arg1", 123] // Optional constructor arguments
}
}
Load Contract
Load an existing deployed contract:
{
"method": "eth_loadContract",
"params": {
"address": "0x1234567890123456789012345678901234567890",
"abi": [...] // Contract ABI array
}
}
Call Contract Method (State-Changing)
Execute a transaction that changes contract state:
{
"method": "eth_callContractMethod",
"params": {
"contractAddress": "0x1234567890123456789012345678901234567890",
"methodName": "transfer",
"args": ["0x742d35Cc6634C0532925a3b844Bc9e7595f62b8e", 1000],
"from": "0x742d35Cc6634C0532925a3b844Bc9e7595f62b8e"
}
}
Read Contract State
Call a view/pure function without sending a transaction:
{
"method": "eth_readContract",
"params": {
"contractAddress": "0x1234567890123456789012345678901234567890",
"methodName": "balanceOf",
"args": ["0x742d35Cc6634C0532925a3b844Bc9e7595f62b8e"]
}
}
Query Contract Events
Retrieve past events from a contract:
{
"method": "eth_getContractEvents",
"params": {
"contractAddress": "0x1234567890123456789012345678901234567890",
"eventName": "Transfer",
"fromBlock": 0,
"toBlock": "latest",
"filters": { // Optional event filters
"from": "0x742d35Cc6634C0532925a3b844Bc9e7595f62b8e"
}
}
}
Note: All contract interaction methods require the contract ABI (Application Binary Interface) to properly encode/decode function calls and events. The ABI must be provided as a JSON array following the standard Ethereum ABI format.
Token Management (Coming Soon)
- ERC20 balance checking
- ERC20 transfers
- NFT metadata retrieval
- NFT transfers
- Token approval management
Advanced Features (Coming Soon)
- EIP-7702 delegation
- Event log retrieval
- Partial withdrawals
- Full withdrawals
- Batch operations
Quick Start
- Install dependencies:
uv venv
source .venv/bin/activate
uv pip install -e .
- Set up environment variables:
cp .env.example .env
# Edit .env with your configuration
- Run the server:
python src/server.py
API Methods
Wallet Methods
{
"method": "eth_createWallet",
"params": {}
}
{
"method": "eth_importWallet",
"params": {
"privateKey": "0x..."
}
}
{
"method": "eth_listWallets",
"params": {}
}
{
"method": "eth_getBalance",
"params": {
"address": "0x..."
}
}
Transaction Methods
{
"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..."
}
}
Development
Project Structure
src/
├── server.py # Main FastAPI server
├── core/ # Core functionality
│ ├── wallet.py # Wallet management
│ ├── transaction.py # Transaction handling
│ ├── contract.py # Contract interaction
│ └── token.py # Token/NFT handling
├── models/ # Data models
└── utils/ # Utilities
Running Tests
pytest
Code Style
ruff check .
ruff format .
Contributing
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
License
MIT
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.