evm-mcp
An MCP server that provides complete access to Ethereum Virtual Machine (EVM) JSON-RPC methods. Works with any EVM-compatible node provider including Infura, Alchemy, QuickNode, local nodes, and more.
ā½ 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
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 build
Features
š¢ 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
š Events & Logs
eth_getLogsā Get event logs
š Network
eth_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=eyJldm0tbWNwIjp7ImNvbW1hbmQiOiJucHgiLCJhcmdzIjpbIi15IiwiQGphbWVzYW56L2V2bS1tY3AiXX19
Manual 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 RPC URL
export RPC_URL="https://mainnet.infura.io/v3/YOUR_API_KEY"
export CHAIN_ID="1"
# Run server
npm start
Claude 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": {
"RPC_URL": "https://mainnet.infura.io/v3/YOUR_API_KEY",
"CHAIN_ID": "1"
}
}
}
}
Restart Claude Desktop after configuration.
Configuration
RPC URL Examples
# Infura
RPC_URL=https://mainnet.infura.io/v3/YOUR_API_KEY
# Alchemy
RPC_URL=https://eth-mainnet.g.alchemy.com/v2/YOUR_API_KEY
# QuickNode
RPC_URL=https://YOUR_ENDPOINT.quiknode.pro/YOUR_TOKEN/
# Public endpoints (rate limited)
RPC_URL=https://bsc-dataseed.binance.org
RPC_URL=https://polygon-rpc.com
RPC_URL=https://arb1.arbitrum.io/rpc
# Local node
RPC_URL=http://localhost:8545
Supported Networks
- Ethereum: Mainnet, Sepolia, Goerli
- Polygon: Mainnet, Mumbai
- Arbitrum: One, Sepolia
- Optimism: Mainnet, Sepolia
- BNB Smart Chain: Mainnet, Testnet
- Avalanche: C-Chain
- Fantom: Opera
- Any EVM-compatible chain
Usage Examples
Get Latest Block Number
Query the current block number:
{
"tool": "eth_blockNumber",
"arguments": {}
}
Get Account Balance
Check an address balance:
{
"tool": "eth_getBalance",
"arguments": {
"address": "0x742d35Cc6634C0532925a3b8D6Ac6e2F0C4C9B7C",
"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:
RPC_URL(required): Any EVM-compatible RPC endpointCHAIN_ID(optional): Chain ID for the network (defaults to 1)
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
Related Servers
Scout Monitoring MCP
sponsorPut performance and error data directly in the hands of your AI assistant.
Alpha Vantage MCP Server
sponsorAccess financial market data: realtime & historical stock, ETF, options, forex, crypto, commodities, fundamentals, technical indicators, & more
McpDocServer
An MCP-based server for searching and retrieving development framework documentation, supporting crawling and local file loading.
Devvit
A companion server for building applications on Reddit's developer platform.
mcp-rubber-duck
Query multiple LLMs in parallel from AI coding tools ā rubber duck debugging, but the ducks talk back.
MCP Command Server
A secure server for executing pre-approved system commands via an environment variable.
APIClaw ā Amazon Data API for AI Agents
Real-time Amazon data API built for AI agents. 200M+ products, 1B+ reviews, live BSR, pricing, and competitor data as clean JSON. 10 agent skills for market research, competitor monitoring, pricing, listing audits, and more. 1,000 free credits.
fastMCP4J
Fast lightweight Java MCP server framework - Build Model Context Protocol servers with minimal boilerplate and full TypeScript SDK compatibility
MLflow Prompt Registry
Access prompt templates managed in an MLflow Prompt Registry. Requires a running MLflow server configured via the MLFLOW_TRACKING_URI environment variable.
MCP Server Boilerplate
A TypeScript boilerplate for building MCP servers with streamable HTTP and OAuth proxy support.
Alpaca MCP Server
Interact with Alpaca's Trading API for stocks, options, portfolios, and real-time market data using LLMs.
Interactive Feedback MCP
An MCP server for interactive user feedback and command execution in AI-assisted development.