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.
# 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
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
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
To connect from Cursor:
evm-mcp-server
command
npx @mcpdotdirect/evm-mcp-server
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"
]
}
}
}
For web applications using Server-Sent Events:
{
"mcpServers": {
"evm-mcp-sse": {
"url": "http://localhost:3001/sse"
}
}
}
# Add the MCP server
claude mcp add evm-mcp-server npx @mcpdotdirect/evm-mcp-server
# Start Claude with the MCP server enabled
claude
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
// }
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"
// }
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 |
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 |
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 |
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 |
The server also provides blockchain data through resource URIs:
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 |
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 |
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.
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"
]
}
}
}
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.
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.