The EVM MCP Server enables seamless interaction with 30+ EVM-compatible blockchains (including Ethereum, Polygon, Arbitrum, Optimism), providing comprehensive blockchain services for AI agents through a unified interface.
Key capabilities:
Blockchain Data Access: Read blockchain state, query chain information, retrieve transaction details, resolve ENS names to addresses
Token Management: Handle ERC20 tokens (metadata, balances, transfers, approvals), interact with NFTs (ERC721) and multi-tokens (ERC1155), check ownership and balances
Smart Contract Interactions: Read contract state via view/pure functions, write to contracts with transaction signing, verify if an address is a contract
Transaction Support: Transfer native tokens (ETH, MATIC), estimate gas costs, sign and send transactions securely
Utility Functions: Derive Ethereum addresses from private keys, access blockchain data via MCP Resource URIs
Supports running the MCP server with Bun runtime, enabling faster execution and modern JavaScript features.
Provides comprehensive blockchain services including reading state, transferring tokens, querying balances, and interacting with smart contracts on the Ethereum mainnet.
Supports interaction with the Fantom blockchain, including native token transfers, balance checking, and smart contract operations.
Compatible with Node.js 18.0.0+ as an alternative runtime environment for the MCP server.
Enables interaction with the Optimism L2 network, including reading blockchain state, transferring tokens, and smart contract interactions.
Provides services for the Polygon network and Polygon zkEVM, supporting token transfers, smart contract interaction, and blockchain data access.
Built with TypeScript 5.0+, providing type safety and modern language features for development and extension of the server capabilities.
EVM MCP Server
A comprehensive Model Context Protocol (MCP) server that provides blockchain services across 60+ EVM-compatible networks. This server enables AI agents to interact with Ethereum, Optimism, Arbitrum, Base, Polygon, and many other EVM chains with a unified interface through 22 tools and 10 AI-guided prompts.
š Contents
Related MCP server: Flow MCP Server
š Overview
The MCP EVM Server leverages the Model Context Protocol to provide blockchain services to AI agents. It supports a wide range of services including:
Reading blockchain state (balances, transactions, blocks, etc.)
Interacting with smart contracts with automatic ABI fetching from block explorers
Transferring tokens (native, ERC20, ERC721, ERC1155)
Querying token metadata and balances
Chain-specific services across 60+ EVM networks (34 mainnets + 26 testnets)
ENS name resolution for all address parameters (use human-readable names like 'vitalik.eth' instead of addresses)
AI-friendly prompts that guide agents through complex workflows
All services are exposed through a consistent interface of MCP tools, resources, and prompts, making it easy for AI agents to discover and use blockchain functionality. Every tool that accepts Ethereum addresses also supports ENS names, automatically resolving them to addresses behind the scenes. The server includes intelligent ABI fetching, eliminating the need to know contract ABIs in advance.
⨠Features
Blockchain Data Access
Multi-chain support for 60+ EVM-compatible networks (34 mainnets + 26 testnets)
Chain information including blockNumber, chainId, and RPCs
Block data access by number, hash, or latest
Transaction details and receipts with decoded logs
Address balances for native tokens and all token standards
ENS resolution for human-readable Ethereum addresses (use 'vitalik.eth' instead of '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045')
Token services
ERC20 Tokens
Get token metadata (name, symbol, decimals, supply)
Check token balances
Transfer tokens between addresses
Approve spending allowances
NFTs (ERC721)
Get collection and token metadata
Verify token ownership
Transfer NFTs between addresses
Retrieve token URIs and count holdings
Multi-tokens (ERC1155)
Get token balances and metadata
Transfer tokens with quantity
Access token URIs
Smart Contract Interactions
Read contract state through view/pure functions
Write to contracts - Execute any state-changing function with automatic ABI fetching
Contract verification to distinguish from EOAs
Event logs retrieval and filtering
Automatic ABI fetching from Etherscan v2 API across all 60+ networks (no need to know ABIs in advance)
ABI parsing and validation with function discovery
Comprehensive Transaction Support
Flexible Wallet Support - Configure with Private Key or Mnemonic (BIP-39) with HD path support
Native token transfers across all supported networks
Gas estimation for transaction planning
Transaction status and receipt information
Error handling with descriptive messages
Message Signing Capabilities
Personal Message Signing - Sign arbitrary messages for authentication and verification
EIP-712 Typed Data Signing - Sign structured data for gasless transactions and meta-transactions
SIWE Support - Enable Sign-In With Ethereum authentication flows
Permit Signatures - Create off-chain approvals for gasless token operations
Meta-Transaction Support - Sign transaction data for relay services and gasless transfers
AI-Guided Workflows (Prompts)
Transaction preparation - Guidance for planning and executing transfers
Wallet analysis - Tools for analyzing wallet activity and holdings
Smart contract exploration - Interactive ABI fetching and contract analysis
Contract interaction - Safe execution of write operations on smart contracts
Network information - Learning about EVM networks and comparisons
Approval auditing - Reviewing and managing token approvals
Error diagnosis - Troubleshooting transaction failures
š Supported Networks
Mainnets
Ethereum (ETH)
Optimism (OP)
Arbitrum (ARB)
Arbitrum Nova
Base
Polygon (MATIC)
Polygon zkEVM
Avalanche (AVAX)
Binance Smart Chain (BSC)
zkSync Era
Linea
Celo
Gnosis (xDai)
Fantom (FTM)
Filecoin (FIL)
Moonbeam
Moonriver
Cronos
Scroll
Mantle
Manta
Blast
Fraxtal
Mode
Metis
Kroma
Zora
Aurora
Canto
Flow
Lumia
Testnets
Sepolia
Optimism Sepolia
Arbitrum Sepolia
Base Sepolia
Polygon Amoy
Avalanche Fuji
BSC Testnet
zkSync Sepolia
Linea Sepolia
Scroll Sepolia
Mantle Sepolia
Manta Sepolia
Blast Sepolia
Fraxtal Testnet
Mode Testnet
Metis Sepolia
Kroma Sepolia
Zora Sepolia
Celo Alfajores
Goerli
Holesky
Flow Testnet
Filecoin Calibration
Lumia Testnet
š ļø Prerequisites
Bun 1.0.0 or higher (recommended)
Node.js 20.0.0 or higher (if not using Bun)
Optional: Etherscan API key for ABI fetching
š¦ Installation
āļø Configuration
Environment Variables
The server uses the following environment variables. For write operations and ABI fetching, you must configure these variables:
Wallet Configuration (For Write Operations)
You can configure your wallet using either a private key or a mnemonic phrase:
Option 1: Private Key
Option 2: Mnemonic Phrase (Recommended for HD Wallets)
The mnemonic option supports hierarchical deterministic (HD) wallet derivation:
Uses BIP-39 standard mnemonic phrases (12 or 24 words)
Supports BIP-44 derivation path:
m/44'/60'/0'/0/{accountIndex}EVM_ACCOUNT_INDEXallows you to derive different accounts from the same mnemonicDefault account index is 0 (first account)
Wallet is used for:
Transferring native tokens (
transfer_nativetool)Transferring ERC20 tokens (
transfer_erc20tool)Approving token spending (
approve_token_spendingtool)Writing to smart contracts (
write_contracttool)Signing messages for authentication (
sign_messagetool)Signing structured data for gasless transactions (
sign_typed_datatool)
ā ļø Security:
Never commit your private key or mnemonic to version control
Use environment variables or a secure key management system
Store mnemonics securely - they provide access to all derived accounts
Consider using different account indices for different purposes
API Keys (For ABI Fetching)
This API key is optional but required for:
Automatic ABI fetching from block explorers (
get_contract_abitool)Auto-fetching ABIs when reading contracts (
read_contracttool withabiJsonparameter)The
fetch_and_analyze_abiprompt
Get your free API key from:
Etherscan - For Ethereum and compatible chains
The same key works across all 60+ EVM networks via the Etherscan v2 API
Server Configuration
The server uses the following default configuration:
Default Chain ID: 1 (Ethereum Mainnet)
Server Port: 3001
Server Host: 0.0.0.0 (accessible from any network interface)
These values are hardcoded in the application. If you need to modify them, you can edit the following files:
For chain configuration:
src/core/chains.tsFor server configuration:
src/server/http-server.ts
š Usage
Using npx (No Installation Required)
You can run the MCP EVM Server directly without installation using npx:
Running the Server Locally
Start the server using stdio (for embedding in CLI tools):
Or start the HTTP server with SSE for web applications:
Connecting to the Server
Connect to this MCP server using any MCP-compatible client. For testing and debugging, you can use the MCP Inspector.
Connecting from Cursor
To connect to the MCP server from Cursor:
Open Cursor and go to Settings (gear icon in the bottom left)
Click on "Features" in the left sidebar
Scroll down to "MCP Servers" section
Click "Add new MCP server"
Enter the following details:
Server name:
evm-mcp-serverType:
commandCommand:
npx @mcpdotdirect/evm-mcp-server
Click "Save"
Once connected, you can use the MCP server's capabilities directly within Cursor. The server will appear in the MCP Servers list and can be enabled/disabled as needed.
Using mcp.json with Cursor
For a more portable configuration that you can share with your team or use across projects, you can create an .cursor/mcp.json file in your project's root directory:
Place this file in your project's .cursor directory (create it if it doesn't exist), and Cursor will automatically detect and use these MCP server configurations when working in that project. This approach makes it easy to:
Share MCP configurations with your team
Version control your MCP setup
Use different server configurations for different projects
Example: HTTP Mode with SSE
If you're developing a web application and want to connect to the HTTP server with Server-Sent Events (SSE), you can use this configuration:
This connects directly to the HTTP server's SSE endpoint, which is useful for:
Web applications that need to connect to the MCP server from the browser
Environments where running local commands isn't ideal
Sharing a single MCP server instance among multiple users or applications
To use this configuration:
Create a
.cursordirectory in your project root if it doesn't existSave the above JSON as
mcp.jsonin the.cursordirectoryRestart Cursor or open your project
Cursor will detect the configuration and offer to enable the server(s)
Example: Using the MCP Server in Cursor
After configuring the MCP server with mcp.json, you can easily use it in Cursor. Here's an example workflow:
Create a new JavaScript/TypeScript file in your project:
With the file open in Cursor, you can ask Cursor to:
"Check the current ETH balance of vitalik.eth"
"Look up the price of USDC on Ethereum"
"Show me the latest block on Optimism"
"Check if 0x1234... is a contract address"
Cursor will use the MCP server to execute these operations and return the results directly in your conversation.
The MCP server handles all the blockchain communication while allowing Cursor to understand and execute blockchain-related tasks through natural language.
Connecting using Claude CLI
If you're using Claude CLI, you can connect to the MCP server with just two commands:
Example: Getting a Token Balance with ENS
Example: Resolving an ENS Name
Example: Batch Multiple Calls with Multicall
š API Reference
Tools
The server provides 25 focused MCP tools for agents. All tools that accept address parameters support both Ethereum addresses and ENS names.
Wallet Information
Tool Name | Description | Key Parameters |
| Get the address of the configured wallet (from EVM_PRIVATE_KEY) | none |
Network Information
Tool Name | Description | Key Parameters |
| Get network information |
|
| List all supported EVM networks | none |
| Get current gas prices on a network |
|
ENS Services
Tool Name | Description | Key Parameters |
| Resolve ENS name to address |
,
|
| Reverse lookup address to ENS name |
,
|
Block & Transaction Information
Tool Name | Description | Key Parameters |
| Get block data |
or
,
|
| Get latest block data |
|
| Get transaction details |
,
|
| Get transaction receipt with logs |
,
|
| Wait for transaction confirmation |
,
,
|
Balance & Token Information
Tool Name | Description | Key Parameters |
| Get native token balance |
(address/ENS),
|
| Check ERC20 token balance |
(address/ENS),
(address/ENS),
|
| Check token spending allowance |
(address/ENS),
(address/ENS),
(address/ENS),
|
Smart Contract Interactions
Tool Name | Description | Key Parameters |
| Fetch contract ABI from block explorer (60+ networks) |
(address/ENS),
|
| Read smart contract state (auto-fetches ABI if needed) |
,
,
,
(optional),
|
| Execute state-changing functions (auto-fetches ABI if needed) |
,
,
,
(optional),
(optional),
|
| Batch multiple read calls into a single RPC request (uses Multicall3) |
(array of contract calls),
(optional),
|
Token Transfers
Tool Name | Description | Key Parameters |
| Send native tokens (ETH, etc.) |
(address/ENS),
,
|
| Transfer ERC20 tokens |
(address/ENS),
(address/ENS),
,
|
| Approve token allowances |
(address/ENS),
(address/ENS),
,
|
NFT Services
Tool Name | Description | Key Parameters |
| Get NFT (ERC721) metadata |
(address/ENS),
,
|
| Check ERC1155 balance |
(address/ENS),
,
(address/ENS),
|
Message Signing
Tool Name | Description | Key Parameters |
| Sign arbitrary messages for authentication and verification (SIWE, off-chain signatures) |
|
| Sign EIP-712 structured data for gasless transactions, permits, and meta-transactions |
,
,
,
|
Resources
The server exposes blockchain data through the following MCP resource URIs. All resource URIs that accept addresses also support ENS names, which are automatically resolved to addresses.
Blockchain Resources
Resource URI Pattern | Description |
| Chain information for a specific network |
| Ethereum mainnet chain information |
| Block data by number |
| Latest block data |
| Native token balance |
| Transaction details |
| Transaction receipt with logs |
Token Resources
Resource URI Pattern | Description |
| ERC20 token information |
| ERC20 token balance |
| NFT (ERC721) token information |
| NFT ownership verification |
| ERC1155 token URI |
| ERC1155 token balance |
š Security Considerations
Private keys are used only for transaction signing and are never stored by the server
Consider implementing additional authentication mechanisms for production use
Use HTTPS for the HTTP server in production environments
Implement rate limiting to prevent abuse
For high-value services, consider adding confirmation steps
š Project Structure
š ļø Development
To modify or extend the server:
Add new services in the appropriate file under
src/core/services/Register new tools in
src/core/tools.tsRegister new resources in
src/core/resources.tsAdd new network support in
src/core/chains.tsTo change server configuration, edit the hardcoded values in
src/server/http-server.ts
š License
This project is licensed under the terms of the MIT License.