EVM MCP Server
This EVM MCP Server provides comprehensive access to Ethereum Virtual Machine blockchain data through JSON-RPC methods, enabling blockchain analytics, smart contract interactions, and network monitoring across any EVM-compatible chain.
Core Capabilities:
Blockchain Data Queries: Retrieve latest block numbers, detailed block information, transaction details by hash, transaction receipts, account balances at any block height, transaction counts (nonces), contract bytecode, and storage values at specific positions.
Smart Contract Interactions: Execute read-only contract calls (eth_call), estimate gas costs (eth_estimateGas), and send pre-signed raw transactions (eth_sendRawTransaction).
Event & Log Monitoring: Query historical event logs (eth_getLogs) with flexible filtering by block range, contract addresses, and event topics/signatures.
Network Information: Access current gas prices, chain IDs, network versions, client versions, listening status, and peer counts.
Utility Functions: Compute Keccak-256 hashes (web3_sha3) and support multiple block references (latest, earliest, pending, specific numbers).
Universal Compatibility: Works with Ethereum (Mainnet, Sepolia, Goerli), Polygon, Arbitrum, Optimism, BNB Smart Chain, Avalanche, Fantom, and any custom EVM network. Compatible with Infura, Alchemy, QuickNode, local nodes (Geth, Erigon), public RPC endpoints, and any JSON-RPC provider. Configurable via RPC_URL and CHAIN_ID environment variables.
Supports Alchemy as an RPC node provider for accessing Ethereum and other EVM-compatible blockchain networks, enabling blockchain queries and operations through Alchemy's infrastructure.
Supports BNB Smart Chain (Binance Smart Chain) mainnet and testnet networks for blockchain operations and data queries through EVM JSON-RPC methods.
Provides comprehensive access to Ethereum Virtual Machine (EVM) JSON-RPC methods for querying blockchain data, checking balances, executing contract calls, estimating gas, retrieving transaction information, and monitoring network events across any EVM-compatible network.
Enables interaction with Fantom Opera blockchain network through EVM-compatible JSON-RPC methods for accessing blockchain data and executing operations.
Provides access to Optimism Layer 2 blockchain networks through EVM-compatible JSON-RPC methods for blockchain data queries and transaction operations.
Enables interaction with Polygon blockchain networks (mainnet and testnet) through EVM JSON-RPC methods for querying transactions, balances, smart contracts, and network data.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@EVM MCP Server check the balance of 0x742d35Cc6634C0532925a3b8D6Ac6e2F0C4C9B7C"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
β½ EVM MCP Server
Complete EVM JSON-RPC access in your AI workflow. Query any EVM-compatible network (Ethereum, Polygon, Arbitrum, Optimism, BSC, and more) through any node provider. Works with Infura, Alchemy, QuickNode, local nodes, and more.
An MCP (Model Context Protocol) server that provides comprehensive access to Ethereum Virtual Machine (EVM) JSON-RPC methods for AI coding environments like Cursor and Claude Desktop.
Why Use EVM MCP?
π Any EVM Network β Ethereum, Polygon, Arbitrum, Optimism, BSC, Avalanche, and more
π Any Node Provider β Infura, Alchemy, QuickNode, local nodes, or custom RPC
π 20+ RPC Methods β Complete access to blockchain data, transactions, and contracts
β‘ Easy Setup β One-click install in Cursor or simple manual setup
π§ Flexible Configuration β Works with any JSON-RPC compatible endpoint
Related MCP server: Onchain MCP Server
Quick Start
Ready to interact with EVM blockchains? Install in seconds:
Install in Cursor (Recommended):
Or install manually:
npm install -g @jamesanz/evm-mcp
# Or from source:
git clone https://github.com/JamesANZ/evm-mcp.git
cd evm-mcp && npm install && npm run buildFeatures
π’ Blockchain Data
eth_blockNumberβ Get latest block numbereth_getBalanceβ Get account balanceeth_getTransactionCountβ Get transaction count (nonce)eth_getBlockByNumberβ Get block informationeth_getTransactionByHashβ Get transaction detailseth_getTransactionReceiptβ Get transaction receipteth_getCodeβ Get contract bytecodeeth_getStorageAtβ Get storage value
π Transactions
eth_callβ Execute contract calleth_estimateGasβ Estimate gas for transactioneth_sendRawTransactionβ Send signed transactioneth_gasPriceβ Get current gas price
π§ͺ Transaction Simulation (read-only, never broadcasts)
Craft transactions in natural language and simulate them against forked/overridden EVM state. Reports whether a transaction would succeed or revert, the revert reason in plain English, estimated gas, and balance/state changes. Supports address aliases and ENS names (e.g. alice.eth). By default the sender is funded with virtual ETH so a simulation can run "from" any address; set fund: false to use real balances.
simulate_native_transferβ Simulate sending native currency (e.g. "Transfer 100 ETH from A to B")simulate_erc20_transferβ Simulate an ERC20 transfer with human amounts (e.g. "Transfer 10 USDC to alice.eth from fun.eth")simulate_contract_callβ Encode a function signature + args and simulate the callsimulate_transactionβ Simulate a raw transaction (from/to/value/data)encode_function_dataβ Encode calldata from a human-readable signature (pure helper, no RPC)
These tools only use
eth_call,eth_estimateGas, anddebug_traceCall(when the provider supports it). They never sign or send a real transaction. Real state diffs are used whendebug_traceCallis available; otherwise changes are inferred from the decoded intent.
π Events & Logs
eth_getLogsβ Get event logs
π Network
list_supported_networksβ List configured networks and providerslist_known_addressesβ List configured wallet aliases and known token/contract addresseseth_chainIdβ Get chain IDnet_versionβ Get network versionnet_listeningβ Check if listeningnet_peerCountβ Get peer count
π Web3
web3_clientVersionβ Get client versionweb3_sha3β Hash data with Keccak-256
Installation
Cursor (One-Click)
Click the install link above or use:
cursor://anysphere.cursor-deeplink/mcp/install?name=evm-mcp&config=eyJldm0tbWNwIjp7ImNvbW1hbmQiOiJucHgiLCJhcmdzIjpbIi15IiwiQGphbWVzYW56L2V2bS1tY3AiXX19Manual Installation
Requirements: Node.js 18+ and npm
# Clone and build
git clone https://github.com/JamesANZ/evm-mcp.git
cd evm-mcp
npm install
npm run build
# Set provider API keys
export INFURA_API_KEY="your-infura-api-key"
export DEFAULT_NETWORK="ethereum"
export DEFAULT_PROVIDER="infura"
# Run server
npm startClaude Desktop
Add to claude_desktop_config.json:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"evm-mcp": {
"command": "node",
"args": ["/absolute/path/to/evm-mcp/build/index.js"],
"env": {
"INFURA_API_KEY": "your-infura-api-key",
"DEFAULT_NETWORK": "ethereum",
"DEFAULT_PROVIDER": "infura",
"RPC_PROVIDER_ORDER": "infura,alchemy"
}
}
}
}Restart Claude Desktop after configuration.
Configuration
Environment Variables
Variable | Required | Description |
| One of* | Infura project API key (built-in preset) |
| One of* | Alchemy app API key (built-in preset) |
| No | Default chain slug or chain ID (default: |
| No | Provider slug to prefer ( |
| No | Comma-separated provider fallback order (default: |
| One of* | JSON array of user-defined providers |
| One of* | JSON array of user-defined networks |
| No | JSON array of known tokens/contracts (network-scoped) |
| No | JSON array of personal wallet and contract aliases |
*At least one provider API key, custom provider, or custom network with rpcUrl is required.
Built-in Providers (Infura / Alchemy)
Set an API key and the server builds RPC URLs automatically for supported networks:
{
"INFURA_API_KEY": "your-infura-key",
"DEFAULT_NETWORK": "ethereum",
"DEFAULT_PROVIDER": "infura",
"RPC_PROVIDER_ORDER": "infura,alchemy"
}Each RPC tool accepts an optional network parameter (slug, name, or chain ID). When omitted, DEFAULT_NETWORK is used.
{
"tool": "eth_chainId",
"arguments": { "network": "polygon" }
}Use list_supported_networks to discover configured networks and providers.
Custom Providers (CUSTOM_PROVIDERS)
Register any RPC provider by supplying a base URL template and network-specific URLs:
"CUSTOM_PROVIDERS": "[{\"slug\":\"quicknode\",\"apiKeyEnv\":\"QUICKNODE_API_KEY\",\"baseUrl\":\"https://rpc.example.com/v1/{apiKey}\",\"networkUrls\":{\"ethereum\":\"https://eth.quiknode.pro/{apiKey}/\",\"polygon\":\"https://polygon.quiknode.pro/{apiKey}/\"}}]"Absolute
networkUrlsvalues are used directly (with{apiKey}substitution).Relative paths (starting with
/) are appended tobaseUrl.
Custom Networks (CUSTOM_NETWORKS)
Register arbitrary chains by name:
"CUSTOM_NETWORKS": "[{\"name\":\"HyperEVM\",\"slug\":\"hyperevm\",\"chainId\":999,\"rpcUrl\":\"https://rpc.hyperliquid.xyz/evm\"}]"Or route through a provider by setting provider and adding the network slug to that provider's networkUrls.
Known Addresses (KNOWN_ADDRESSES)
Register tokens and contracts by name so tools accept aliases like USDC instead of raw hex addresses. Each entry is scoped to a network:
"KNOWN_ADDRESSES": "[{\"name\":\"USDC\",\"address\":\"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\"network\":\"ethereum\",\"type\":\"token\",\"decimals\":6,\"aliases\":[\"usd-coin\"]}]"Field | Required | Description |
| yes | Primary lookup key |
| yes | Checksummed contract address |
| yes | Chain slug, name, chain ID, or network alias |
| no |
|
| no | Token decimals for formatted balances |
| no | Extra lookup keys |
When eth_getBalance is called with a token alias, the server uses the first configured wallet in WALLET_ADDRESSES as the token holder.
Wallet Addresses (WALLET_ADDRESSES)
Register personal wallets and contracts by alias so you can say "check my personal wallet" instead of pasting hex:
"WALLET_ADDRESSES": "[{\"name\":\"my-wallet\",\"address\":\"0x42ea529282DDE0AA87B42d9E83316eb23FE62c3f\",\"aliases\":[\"personal\",\"my wallet\"],\"description\":\"Main EOA\"}]"Field | Required | Description |
| yes | Primary lookup key |
| yes | Wallet or contract address |
| no | Scope alias to one chain (default: all chains) |
| no | Extra lookup keys |
| no | Human-readable note |
Address aliases work in eth_getBalance, eth_getCode, eth_call, eth_getLogs, and other tools that accept address parameters. Use list_known_addresses to discover configured aliases.
Migration from RPC_URL
- "RPC_URL": "https://mainnet.infura.io/v3/KEY"
- "CHAIN_ID": "1"
+ "INFURA_API_KEY": "KEY"
+ "DEFAULT_NETWORK": "ethereum"
+ "DEFAULT_PROVIDER": "infura"Configuration changes require restarting the MCP server.
Supported Built-in Networks
Ethereum: Mainnet, Sepolia
Polygon: Mainnet, Amoy
Arbitrum: One, Sepolia
Optimism: Mainnet, Sepolia
BNB Smart Chain: Mainnet, Testnet
Avalanche: C-Chain
Base: Mainnet, Sepolia
Any EVM-compatible chain via
CUSTOM_NETWORKS
Usage Examples
Get Latest Block Number
Query the current block number:
{
"tool": "eth_blockNumber",
"arguments": {}
}Get Account Balance
Check an address balance using a hex address or configured alias:
{
"tool": "eth_getBalance",
"arguments": {
"address": "personal",
"blockNumber": "latest"
}
}Get Transaction Details
View transaction information:
{
"tool": "eth_getTransactionByHash",
"arguments": {
"txHash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
}
}Call Smart Contract
Execute a contract call:
{
"tool": "eth_call",
"arguments": {
"to": "0xA0b86a33E6441c8C06DDD46C310c0eF8D9441C8F",
"data": "0x70a08231000000000000000000000000742d35Cc6634C0532925a3b8D6Ac6e2F0C4C9B7C"
}
}Get Event Logs
Query contract events:
{
"tool": "eth_getLogs",
"arguments": {
"fromBlock": "0x1234567",
"toBlock": "latest",
"address": "0xA0b86a33E6441c8C06DDD46C310c0eF8D9441C8F",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
]
}
}Use Cases
Blockchain Analytics β Query transaction data, balances, and contract states
DeFi Applications β Monitor token balances, transaction receipts, and smart contract calls
NFT Projects β Track transfers, metadata, and collection statistics
Development Tools β Debug transactions, estimate gas, and test smart contracts
Monitoring β Watch for specific events and transaction patterns
Research β Analyze blockchain data across multiple EVM networks
Technical Details
Built with: Node.js, TypeScript, MCP SDK, Ethers.js
Dependencies: @modelcontextprotocol/sdk, ethers, zod
Platforms: macOS, Windows, Linux
Environment Variables: See Configuration above.
Contributing
β If this project helps you, please star it on GitHub! β
Contributions welcome! Please open an issue or submit a pull request.
License
MIT License β see LICENSE.md for details.
Support
If you find this project useful, consider supporting it:
β‘ Lightning Network
lnbc1pjhhsqepp5mjgwnvg0z53shm22hfe9us289lnaqkwv8rn2s0rtekg5vvj56xnqdqqcqzzsxqyz5vqsp5gu6vh9hyp94c7t3tkpqrp2r059t4vrw7ps78a4n0a2u52678c7yq9qyyssq7zcferywka50wcy75skjfrdrk930cuyx24rg55cwfuzxs49rc9c53mpz6zug5y2544pt8y9jflnq0ltlha26ed846jh0y7n4gm8jd3qqaautqaβΏ Bitcoin: bc1ptzvr93pn959xq4et6sqzpfnkk2args22ewv5u2th4ps7hshfaqrshe0xtp
Ξ Ethereum/EVM: 0x42ea529282DDE0AA87B42d9E83316eb23FE62c3f
Available Tools
19 toolseth_blockNumberA
Returns the number of the most recent block
Inputs: no named parameters.
eth_callB
Executes a new message call immediately without creating a transaction
Inputs: data (required), to (required), blockNumber, from, +3 more.
eth_chainIdA
Returns the chain ID of the current network
Inputs: no named parameters.
eth_estimateGasC
Generates and returns an estimate of how much gas is necessary
Inputs: data, from, gas, gasPrice, +2 more.
eth_gasPriceA
Returns the current price per gas in wei
Inputs: no named parameters.
eth_getBalanceC
Returns the balance of the account of given address
Inputs: address (required), blockNumber.
eth_getBlockByNumberC
Returns information about a block by block number
Inputs: blockNumber (required), includeTransactions.
eth_getCodeC
Returns code at a given address
Inputs: address (required), blockNumber.
eth_getLogsC
Returns an array of all logs matching a given filter object
Inputs: address, fromBlock, toBlock, topics.
eth_getStorageAtC
Returns the value from a storage position at a given address
Inputs: address (required), position (required), blockNumber.
eth_getTransactionByHashC
Returns the information about a transaction requested by transaction hash
Inputs: txHash (required).
eth_getTransactionCountB
Returns the number of transactions sent from an address
Inputs: address (required), blockNumber.
eth_getTransactionReceiptC
Returns the receipt of a transaction by transaction hash
Inputs: txHash (required).
eth_sendRawTransactionC
Creates new message call transaction or a contract creation
Inputs: signedTransactionData (required).
net_listeningA
Returns true if client is actively listening for network connections
Inputs: no named parameters.
net_peerCountA
Returns number of peers currently connected to the client
Inputs: no named parameters.
net_versionB
Returns the current network id
Inputs: no named parameters.
web3_clientVersionB
Returns the current client version
Inputs: no named parameters.
web3_sha3B
Returns Keccak-256 hash of the given data
Inputs: data (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 19 tools
Each tool has a clearly distinct purpose with no overlap, as they map directly to standard Ethereum JSON-RPC methods. For example, eth_getBalance retrieves account balances, eth_getTransactionByHash fetches transaction details, and web3_clientVersion returns client info, all serving unique functions in the EVM ecosystem.
The tool names follow a highly consistent pattern, using prefixes like 'eth_', 'net_', and 'web3_' followed by descriptive, standard method names in snake_case. This uniformity makes the tools predictable and easy to identify, aligning with Ethereum API conventions.
With 19 tools, this server is well-scoped for an EVM interface, covering essential operations such as querying blocks, transactions, balances, network info, and executing calls. The count is appropriate, providing comprehensive coverage without being overwhelming for the domain.
The tool set offers complete coverage of core EVM functionalities, including reading data (e.g., blocks, balances, logs), writing transactions (e.g., eth_sendRawTransaction), and utility operations (e.g., gas estimation, hashing). There are no obvious gaps, enabling agents to handle typical blockchain interactions seamlessly.
Maintenance
Related MCP Connectors
Wallet balances, ERC-20, blocks, transactions, receipts, ENS and payment checks, pay per call
Read chain data on 200+ networks and Sui: transactions, logs, balances, objects, ABI-decoded.
366 tools: balances, blocks, gas, txs and logs on 5 EVM chains, plus Bitcoin. 25 free calls.
Read EVM and Solana chains for balances, tokens, eth_call, logs, receipts, gas, blocks and ENS.
Related MCP Servers
- AlicenseBqualityDmaintenanceProvides tools for AI assistants to interact with the Ethereum blockchain through standard JSON-RPC methods, enabling queries for account balances, gas prices, and smart contract code.387 npm12MIT
- FlicenseNot gradedqualityDmaintenanceProvides tools for querying onchain data across 12+ blockchain networks, including token balances, transaction analysis, and smart contract security auditing. It enables users to interact with multiple EVM-compatible chains and perform deep contract evaluations through natural language interfaces.1-
- AlicenseAqualityDmaintenanceEnables EVM blockchain operations through Alchemy RPC, including balance queries, contract interactions, transaction sending, and message signing, with multi-chain support across mainnets and testnets.1339 npmApache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to query on-chain data across EVM chains like Base, Optimism, Avalanche, Celo, and Arbitrum, including balances, transactions, gas, and smart contract interactions.49 npmMIT