An MCP (Model Context Protocol) server that exposes EVM blockchain tools to AI assistants. Built with viem and the MCP SDK, it lets any MCP-compatible client (Claude Desktop, etc.) read balances and send ETH on local EVM chains.
| Tool | Description | Parameters |
|---|---|---|
get-eth-balance |
Fetch the ETH balance of any address | address — the wallet address |
send-eth |
Send ETH from the configured wallet to another address | toAddress, amount (in ETH) |
Currently supports local development chains via viem:
anvil(chain ID31337)localhost(chain ID1337)
The active chain is selected at startup via the CHAIN_ID environment variable.
- Node.js 18+
- A running local EVM node (e.g. Anvil from Foundry)
1. Install dependencies
npm install2. Build
npm run build3. Set environment variables
export CHAIN_ID=31337 # Chain ID of your local node
export PRIVATE_KEY=0x... # Private key of the signing walletRun the server directly:
node build/index.jsThe server communicates over stdio using the MCP protocol.
Add the following to your claude_desktop_config.json:
{
"mcpServers": {
"evm": {
"command": "node",
"args": ["/path/to/evm-mcp/build/index.js"],
"env": {
"CHAIN_ID": "31337",
"PRIVATE_KEY": "0x<your-private-key>"
}
}
}
}# Compile TypeScript in watch mode
npx tsc --watch| Package | Purpose |
|---|---|
@modelcontextprotocol/sdk |
MCP server framework |
viem |
EVM client (balance queries, transaction sending) |
zod |
Tool parameter validation |