base-contract-reader-mcp
v1.0.1
Published
Free MCP server for AI agents to read any smart contract on Base mainnet. Call view functions, get bytecode, query events, read storage slots, batch calls, and check balances — zero config, no private key needed.
Downloads
187
Maintainers
Readme
base-contract-reader-mcp
Free MCP server for AI agents to read any smart contract on Base mainnet. No private key needed — all operations are read-only.
Tools
| Tool | Description |
|------|-------------|
| read_contract | Call any view/pure function on a contract using a human-readable ABI fragment |
| get_contract_code | Get the bytecode deployed at an address |
| get_events | Query past events from a contract within a block range |
| get_storage | Read a raw storage slot at an address |
| multicall_read | Batch multiple view/pure calls in one request |
| get_contract_balance | Get the ETH balance of any address |
Install
npx -y base-contract-reader-mcpConfigure
Add to your .mcp.json (Claude Code, Cursor, etc.):
{
"mcpServers": {
"base-contract-reader": {
"command": "npx",
"args": ["-y", "base-contract-reader-mcp"],
"env": {
"RPC_URL": "https://mainnet.base.org"
}
}
}
}RPC_URL is optional and defaults to https://mainnet.base.org.
Examples
Read an ERC-20 token name:
read_contract({
contract_address: "0x...",
abi: ["function name() view returns (string)"],
function_name: "name"
})Get ETH balance:
get_contract_balance({ address: "0x..." })Batch multiple reads:
multicall_read({
calls: [
{ contract_address: "0x...", abi: ["function name() view returns (string)"], function_name: "name" },
{ contract_address: "0x...", abi: ["function totalSupply() view returns (uint256)"], function_name: "totalSupply" }
]
})License
MIT
