MCP Hub
Back to servers

evmcp

Multi-chain EVM blockchain data with companion smart contracts

Registry
Updated
Apr 3, 2026

Quick Install

npx -y evmcp

evmcp

EVM + MCP — give your AI assistant blockchain superpowers.

MCP server providing real-time access to on-chain data across Base, Optimism, Avalanche, and Celo, with companion smart contracts deployed on-chain for batch queries and cross-chain data.

How it Works

EVMCP implements the Model Context Protocol (MCP), a standard that lets AI assistants call external tools. When connected, your AI assistant gains 28 read-only blockchain tools it can invoke to query balances, decode transactions, compare gas prices, and more across four EVM chains.

What sets EVMCP apart is its companion smart contracts — four Solidity contracts deployed on Avalanche and Celo that enable batch queries via Multicall3, an on-chain tool registry, event aggregation, and cross-chain balance caching. The MCP server reads from these contracts; all write operations are performed separately by an admin CLI.

Quick Start

With Claude Desktop

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "evmcp": {
      "command": "npx",
      "args": ["-y", "evmcp"],
      "env": { "ALCHEMY_API_KEY": "your_key_here" }
    }
  }
}

With Claude Code

claude mcp add evmcp -- npx -y evmcp

Supported Chains

ChainChain IDNative TokenCompanion Contracts
Base8453ETHNot yet deployed
Optimism10ETHNot yet deployed
Avalanche C-Chain43114AVAXDeployed
Celo42220CELODeployed

Ethereum mainnet (chain ID 1) is also supported for ENS resolution only.

Tools (28 total)

Balance (3)

ToolDescription
getBalanceGet the native token balance (ETH/AVAX/CELO) of an address on a specific chain
getTokenBalanceGet the ERC20 token balance of an address on a specific chain
getMultiChainBalanceGet the native token balance of an address across all 4 supported chains in parallel

Block (3)

ToolDescription
getBlockGet a block by its hash on a specific chain
getBlockByNumberGet a block by its number on a specific chain, or pass "latest" for the most recent block
getLatestBlockGet the latest block number, timestamp, and base fee for a specific chain

Transaction (3)

ToolDescription
getTransactionGet a transaction by its hash on a specific chain
getTransactionReceiptGet the receipt for a transaction including status, gasUsed, and logs
decodeTransactionDecode a transaction's function call using a provided ABI

Contract (3)

ToolDescription
readContractCall a read-only function on a smart contract with a provided ABI
getContractCodeCheck if an address has contract code deployed, with bytecode length and hash
getStorageAtRead the raw value of a storage slot at a specific address

Token (2)

ToolDescription
getERC20InfoGet ERC20 token metadata including name, symbol, decimals, and total supply
getTokenAllowanceGet the ERC20 token allowance granted by an owner to a spender

Gas (3)

ToolDescription
getGasPriceGet current gas price and EIP-1559 fee data for a specific chain
estimateGasEstimate gas for a transaction on a specific chain
compareGasAcrossChainsCompare current gas prices across all 4 supported chains

ENS (2)

ToolDescription
resolveENSResolve an ENS name (e.g. vitalik.eth) to an Ethereum address via Ethereum L1
lookupAddressReverse lookup an address to its ENS name via Ethereum L1

Events (2)

ToolDescription
getContractEventsGet event logs emitted by a contract on a specific chain
decodeEventLogDecode a raw event log using a provided ABI

Chain and Health (3)

ToolDescription
getChainInfoGet chain name, chain ID, current block number, block time, and native symbol
isContractDeployedCheck if an address has contract code deployed on all 4 supported chains
healthCheckTest connectivity to all 5 RPC endpoints (Ethereum, Base, Optimism, Avalanche, Celo)

Batch (1)

ToolDescription
batchQueryExecute multiple read calls in a single RPC request using Multicall3

Cross-Chain (2)

ToolDescription
compareBalancesCompare native token balances for an address across all 4 chains
crossChainActivityCheck transaction counts for an address across all 4 chains

Registry (1)

ToolDescription
queryRegistryRead registered tool metadata from the on-chain MCPRegistry companion contract

Resources (4)

URI PatternDescriptionCache TTL
chain://{chainId}/statusCurrent block height and gas price for a chain12s
chain://{chainId}/gasBase fee, gas price, and priority fee in gwei12s
chain://{chainId}/tokens/popularPopular token addresses and decimals (hardcoded for v1)1 hour
evmcp://chainsAll supported chains with IDs, symbols, and companion contract addressesStatic

Supported chain IDs for templated resources: 8453 (Base), 10 (Optimism), 43114 (Avalanche), 42220 (Celo).

Prompts (4)

PromptArgumentsDescription
analyze-walletaddressMulti-chain balance and activity analysis of a wallet
audit-contractcontractAddress, chainBasic inspection and audit workflow for a smart contract
compare-chains(none)Compare gas costs, speed, and characteristics across all chains
investigate-txtxHash, chainDecode, analyze, and trace a transaction in detail

Companion Contracts

Four Solidity contracts are deployed on Avalanche and Celo. The MCP server reads from these contracts to provide batch queries, on-chain tool metadata, and cross-chain data. Base and Optimism deployments are planned.

Avalanche C-Chain (43114)

ContractAddress
MCPRegistry0x62402b65bfb4Fd022285A6FC2F26d8caEEc3D055
BatchQuery0xfDc19e0617AdF1811A68Aa1575409F3769f39491
EventAggregator0xECE24a53A28F088351EC2Da258f78479e81A8007
CrossChainCache0x0899a6Ef23c6B39A4D9B877B219645B89209A670

Celo (42220)

ContractAddress
MCPRegistry0x62402b65bfb4Fd022285A6FC2F26d8caEEc3D055
BatchQuery0xfDc19e0617AdF1811A68Aa1575409F3769f39491
EventAggregator0xECE24a53A28F088351EC2Da258f78479e81A8007
CrossChainCache0x0899a6Ef23c6B39A4D9B877B219645B89209A670

Contract Descriptions

  • MCPRegistry -- On-chain metadata for all EVMCP tools (names, descriptions, versions). Owner-only writes.
  • BatchQuery -- Optimized batch reads via Multicall3. Includes multi-balance, multi-contract-check, and multi-token-balance helpers.
  • EventAggregator -- Caches event count summaries per contract. Updated by the admin CLI.
  • CrossChainCache -- Stores balance snapshots for cross-chain queries. Updated by the admin CLI.

Environment Variables

VariableRequiredDescription
ALCHEMY_API_KEYYes*Alchemy API key (covers all chains)
BASE_RPC_URLNo*Override RPC URL for Base
OPTIMISM_RPC_URLNo*Override RPC URL for Optimism
AVALANCHE_RPC_URLNo*Override RPC URL for Avalanche
CELO_RPC_URLNo*Override RPC URL for Celo
ETHEREUM_RPC_URLNoOverride RPC URL for ENS resolution
CACHE_TTL_SECONDSNoCache TTL in seconds (default: 15)
CACHE_MAX_ENTRIESNoMax cache entries (default: 1000)
LOG_LEVELNodebug, info, warn, or error (default: info)
USE_TESTNETSNoUse testnet chains (default: false)

*Provide either ALCHEMY_API_KEY or all four individual chain RPC URLs.

Development

pnpm install
pnpm build
pnpm inspect          # MCP Inspector UI at localhost:6274
pnpm test             # Unit tests
pnpm typecheck        # Type check
pnpm lint             # ESLint

License

MIT

Reviews

No reviews yet

Sign in to write a review