Smart contract auditing and wallet analysis
## Ethereum MCP Server: Ethereum Blockchain Integration The **Ethereum MCP Server** integrates Ethereum blockchain capabilities into Google Antigravity, enabling developers to interact with smart contracts, query blockchain data, and manage Ethereum wallets. ### Why Ethereum MCP? - **Smart contracts** - Deploy and interact with contracts - **Transaction queries** - Query transaction and block data - **Wallet management** - Create and manage Ethereum wallets - **Token operations** - ERC-20 and ERC-721 support - **Gas estimation** - Accurate gas price predictions ### Key Features #### 1. Blockchain Queries ```python # Get block block = await mcp.call("ethereum", "get_block", { "block_number": "latest" }) print(f"Block: {block[\"number\"]}") print(f"Transactions: {len(block[\"transactions\"])}") # Get transaction tx = await mcp.call("ethereum", "get_transaction", { "hash": "0xabc..." }) print(f"From: {tx[\"from\"]}") print(f"Value: {tx[\"value\"]} wei") ``` #### 2. Smart Contract Interaction ```python # Call contract method (read) balance = await mcp.call("ethereum", "call_contract", { "address": "0x...", "abi": [...], "method": "balanceOf", "args": ["0xowner..."] }) # Send transaction (write) tx = await mcp.call("ethereum", "send_transaction", { "address": "0x...", "abi": [...], "method": "transfer", "args": ["0xto...", 1000000], "from": "0xsender..." }) ``` #### 3. Wallet Operations ```python # Create wallet wallet = await mcp.call("ethereum", "create_wallet", {}) print(f"Address: {wallet[\"address\"]}") # Get balance balance = await mcp.call("ethereum", "get_balance", { "address": "0x..." }) print(f"Balance: {balance} ETH") # Send ETH tx = await mcp.call("ethereum", "send_eth", { "from": "0xfrom...", "to": "0xto...", "value": "0.1" }) ``` #### 4. Token Operations ```python # Get ERC-20 balance token_balance = await mcp.call("ethereum", "get_token_balance", { "token": "0xtoken...", "owner": "0xowner..." }) # Transfer tokens await mcp.call("ethereum", "transfer_token", { "token": "0xtoken...", "to": "0xrecipient...", "amount": "100" }) ``` ### Configuration ```json { "mcpServers": { "ethereum": { "command": "npx", "args": ["-y", "@anthropic/mcp-ethereum"], "env": { "ETH_RPC_URL": "https://mainnet.infura.io/v3/xxx", "ETH_PRIVATE_KEY": "0x..." } } } } ``` ### Use Cases **DeFi Integration**: Interact with DeFi protocols. **NFT Operations**: Manage ERC-721 tokens. **dApp Development**: Build decentralized apps. **Token Management**: Manage ERC-20 tokens. The Ethereum MCP Server enables Ethereum blockchain integration.
{
"mcpServers": {
"ethereum": {
"mcpServers": {
"eth-tools": {
"env": {
"MORALIS_API_KEY": "YOUR_API_KEY",
"ETHERSCAN_API_KEY": "YOUR_API_KEY"
},
"args": [
"-y",
"@0xgval/ethereum-blockchain-tools"
],
"command": "npx"
}
}
}
}
}