home / mcp / evm mcp server

EVM MCP Server

MCP server that provides LLMs with tools for interacting with EVM networks

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "mcpdotdirect-evm-mcp-server": {
      "url": "http://localhost:3001/sse",
      "headers": {
        "EVM_MNEMONIC": "YOUR_MNEMONIC_WORDS",
        "EVM_PRIVATE_KEY": "YOUR_PRIVATE_KEY_OR_LEGACY_ENV_VALUE",
        "ETHERSCAN_API_KEY": "YOUR_API_KEY",
        "EVM_ACCOUNT_INDEX": "0"
      }
    }
  }
}

You run an MCP server that provides multi-network blockchain services to AI agents through a unified interface. It lets you read state, interact with contracts, transfer tokens, resolve ENS names, and run AI-guided workflows across 60+ EVM networks with ready-to-use tools and prompts.

How to use

Connect to the MCP server from your MCP client (or Cursor) to perform blockchain tasks in natural language or scripted prompts. You can run the server in stdio mode for embedded CLI workflows or in HTTP mode for web applications. Typical usage patterns include checking balances, reading blocks or transactions, resolving ENS names, querying token metadata, and safely writing to contracts. You can also execute token transfers, sign messages, and run multi-call reads in a single request. All address inputs support ENS names for convenience.

How to install

Prerequisites: install Bun or Node.js, and ensure you have an available network port for the HTTP server if you choose the HTTP mode.

Step 1: Install Bun (recommended) or use Node.js 20+ as an alternative.

Step 2: Install dependencies and set up the MCP EVM server locally using the provided commands.

Configuration and startup

Configure your wallet and API keys to enable write and ABI-fetch operations. Use either a private key or a mnemonic phrase, and optionally supply an Etherscan API key for automatic ABI fetching.

For a local stdio server, start the server with the CLI command for your environment. For example, you can start the stdio server with Bun using the typical development flow, or start the HTTP server for web access.

Security considerations

Keep private keys and mnemonics secure; never commit them to version control. Use HTTPS for HTTP endpoints in production, implement rate limiting, and consider additional authentication for high-value operations.

Examples and notes

You can connect from Cursor using a ready-made MCP server entry or a portable configuration file. For HTTP access via a browser or web app, you can use the SSE endpoint at /sse on your configured host and port.

Available tools

get_wallet_address

Get the address of the configured wallet from the EVM private key setup.

get_chain_info

Retrieve information about a specific network, including chainId and RPCs.

get_supported_networks

List all networks supported by the MCP server.

get_gas_price

Fetch current gas prices for a given network.

resolve_ens_name

Resolve an ENS name to its Ethereum address on a chosen network.

lookup_ens_address

Reverse-lookup an address to its ENS name on a chosen network.

get_block

Obtain block data by number or hash for a specified network.

get_latest_block

Get data of the latest block for a given network.

get_transaction

Fetch details for a specific transaction by hash.

get_transaction_receipt

Retrieve a transaction receipt including logs.

wait_for_transaction

Wait for a transaction to reach a desired number of confirmations.

get_balance

Query native token balance for an address on a network (supports ENS inputs).

get_token_balance

Check ERC20 token balance for an owner on a network.

get_allowance

Check ERC20 token allowance granted to a spender.

get_contract_abi

Fetch a contract ABI from block explorers across networks.

read_contract

Read contract state with optional ABI auto-fetch.

write_contract

Execute state-changing contract function with auto-fetching ABI.

multicall

Batch multiple read calls into a single RPC request using Multicall3.

transfer_native

Send native tokens to a recipient on a network.

transfer_erc20

Transfer ERC20 tokens to a recipient on a network.

approve_token_spending

Approve token spending for a spender on a network.

get_nft_info

Fetch NFT (ERC721) metadata for a token.

get_erc1155_balance

Check ERC1155 token balance for an address.

sign_message

Sign arbitrary messages for authentication and verification.

sign_typed_data

Sign EIP-712 structured data for gasless transactions and permits.