EVM MCP Server

by mcpdotdirect
Verified

read_contract

Read data from a smart contract by calling a view/pure function. This doesn't modify blockchain state and doesn't require gas or signing.

Input Schema

NameRequiredDescriptionDefault
abiYesThe ABI (Application Binary Interface) of the smart contract function, as a JSON array
argsNoThe arguments to pass to the function, as an array (e.g., ['0x1234...'])
contractAddressYesThe address of the smart contract to interact with
functionNameYesThe name of the function to call on the contract (e.g., 'balanceOf')
networkNoNetwork name (e.g., 'ethereum', 'optimism', 'arbitrum', 'base', 'polygon') or chain ID. Defaults to Ethereum mainnet.

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "abi": { "description": "The ABI (Application Binary Interface) of the smart contract function, as a JSON array", "type": "array" }, "args": { "description": "The arguments to pass to the function, as an array (e.g., ['0x1234...'])", "type": "array" }, "contractAddress": { "description": "The address of the smart contract to interact with", "type": "string" }, "functionName": { "description": "The name of the function to call on the contract (e.g., 'balanceOf')", "type": "string" }, "network": { "description": "Network name (e.g., 'ethereum', 'optimism', 'arbitrum', 'base', 'polygon') or chain ID. Defaults to Ethereum mainnet.", "type": "string" } }, "required": [ "contractAddress", "abi", "functionName" ], "type": "object" }