EVM Blockchain MCP server

Integrates with EVM-compatible blockchains to enable querying data, transferring tokens, reading smart contracts, and resolving ENS names across Ethereum, Optimism, Arbitrum, and Base networks.
Back to servers
Provider
Etheral
Release date
Mar 18, 2025
Language
TypeScript
Package
Stats
2.1K downloads
278 stars

The EVM MCP Server provides a comprehensive interface for AI agents to interact with multiple Ethereum-compatible blockchain networks (30+). It enables chain interactions, token operations, and smart contract interactions through a standardized protocol with ENS name support across all address parameters.

Installation

Prerequisites

  • Bun 1.0.0 or higher
  • Node.js 18.0.0 or higher (if not using Bun)

Setup

# Clone the repository
git clone https://github.com/mcpdotdirect/mcp-evm-server.git
cd mcp-evm-server

# Install dependencies with Bun
bun install

# Or with npm
npm install

Running the Server

Quick Start with npx

You can run the server directly without installation:

# Run in stdio mode (for CLI tools)
npx @mcpdotdirect/evm-mcp-server

# Run in HTTP mode (for web applications)
npx @mcpdotdirect/evm-mcp-server --http

Running Locally

For stdio mode (CLI tools integration):

# Start the stdio server
bun start

# Development mode with auto-reload
bun dev

For HTTP server with SSE (web applications):

# Start the HTTP server
bun start:http

# Development mode with auto-reload
bun dev:http

Connecting to the Server

Cursor Integration

To connect from Cursor:

  1. Open Cursor and go to Settings
  2. Navigate to "Features"
  3. Scroll to "MCP Servers" section
  4. Click "Add new MCP server"
  5. Enter details:
    • Server name: evm-mcp-server
    • Type: command
    • Command: npx @mcpdotdirect/evm-mcp-server
  6. Click "Save"

Using mcp.json Configuration

Create an .cursor/mcp.json file in your project root:

{
  "mcpServers": {
    "evm-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@mcpdotdirect/evm-mcp-server"
      ]
    },
    "evm-mcp-http": {
      "command": "npx",
      "args": [
        "-y", 
        "@mcpdotdirect/evm-mcp-server", 
        "--http"
      ]
    }
  }
}

HTTP Mode with SSE

For web applications using Server-Sent Events:

{
  "mcpServers": {
    "evm-mcp-sse": {
      "url": "http://localhost:3001/sse"
    }
  }
}

Claude CLI Connection

# Add the MCP server
claude mcp add evm-mcp-server npx @mcpdotdirect/evm-mcp-server

# Start Claude with the MCP server enabled
claude

Usage Examples

Getting a Token Balance with ENS

const mcp = new McpClient("http://localhost:3000");

const result = await mcp.invokeTool("get-token-balance", {
  tokenAddress: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC on Ethereum
  ownerAddress: "vitalik.eth", // ENS name instead of address
  network: "ethereum"
});

console.log(result);
// {
//   tokenAddress: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
//   owner: "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
//   network: "ethereum",
//   raw: "1000000000",
//   formatted: "1000",
//   symbol: "USDC",
//   decimals: 6
// }

Resolving an ENS Name

const mcp = new McpClient("http://localhost:3000");

const result = await mcp.invokeTool("resolve-ens", {
  ensName: "vitalik.eth",
  network: "ethereum"
});

console.log(result);
// {
//   ensName: "vitalik.eth",
//   normalizedName: "vitalik.eth",
//   resolvedAddress: "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
//   network: "ethereum"
// }

Supported Networks

Mainnets

  • Ethereum, Optimism, Arbitrum, Arbitrum Nova, Base, Polygon, Polygon zkEVM
  • Avalanche, Binance Smart Chain, zkSync Era, Linea, Celo, Gnosis
  • Fantom, Filecoin, 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
  • And many more test networks for all major chains

Available Tools

Token Operations

Tool Description Key Parameters
get-token-info Get ERC20 token metadata tokenAddress, network
get-token-balance Check ERC20 token balance tokenAddress, ownerAddress, network
transfer-token Transfer ERC20 tokens privateKey, tokenAddress, toAddress, amount, network
approve-token-spending Approve token allowances privateKey, tokenAddress, spenderAddress, amount, network

NFT Operations

Tool Description Key Parameters
get-nft-info Get NFT metadata tokenAddress, tokenId, network
check-nft-ownership Verify NFT ownership tokenAddress, tokenId, ownerAddress, network
transfer-nft Transfer an NFT privateKey, tokenAddress, tokenId, toAddress, network
get-nft-balance Count NFTs owned tokenAddress, ownerAddress, network

ERC1155 Operations

Tool Description Key Parameters
get-erc1155-token-uri Get ERC1155 metadata tokenAddress, tokenId, network
get-erc1155-balance Check ERC1155 balance tokenAddress, tokenId, ownerAddress, network
transfer-erc1155 Transfer ERC1155 tokens privateKey, tokenAddress, tokenId, amount, toAddress, network

Blockchain Operations

Tool Description Key Parameters
get-chain-info Get network information network
get-balance Get native token balance address, network
transfer-eth Send native tokens privateKey, to, amount, network
get-transaction Get transaction details txHash, network
read-contract Read smart contract state contractAddress, abi, functionName, args, network
write-contract Write to smart contract contractAddress, abi, functionName, args, privateKey, network
is-contract Check if address is a contract address, network
resolve-ens Resolve ENS name to address ensName, network

Resource URIs

The server also provides blockchain data through resource URIs:

Blockchain Resources

Resource URI Pattern Description
evm://{network}/chain Chain information for a specific network
evm://chain Ethereum mainnet chain information
evm://{network}/block/{blockNumber} Block data by number
evm://{network}/block/latest Latest block data
evm://{network}/address/{address}/balance Native token balance
evm://{network}/tx/{txHash} Transaction details
evm://{network}/tx/{txHash}/receipt Transaction receipt with logs

Token Resources

Resource URI Pattern Description
evm://{network}/token/{tokenAddress} ERC20 token information
evm://{network}/token/{tokenAddress}/balanceOf/{address} ERC20 token balance
evm://{network}/nft/{tokenAddress}/{tokenId} NFT (ERC721) token information
evm://{network}/nft/{tokenAddress}/{tokenId}/isOwnedBy/{address} NFT ownership verification
evm://{network}/erc1155/{tokenAddress}/{tokenId}/uri ERC1155 token URI
evm://{network}/erc1155/{tokenAddress}/{tokenId}/balanceOf/{address} ERC1155 token balance

Security Considerations

  • Private keys are used only for transaction signing and never stored
  • Implement additional authentication for production use
  • Use HTTPS for the HTTP server in production
  • Consider adding rate limiting to prevent abuse

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later