The unit here is the generate command: hand it a contract address, get a server whose tools are that contract's functions, with the Solidity-to-JSON-Schema type mapping done for you. The safety default worth knowing is that state-changing calls simulate first and return a gas estimate before executing, and PRIVATE_KEY is only needed if you actually want it to sign and send.
Abi-to-mcp — a generator that reads a contract's ABI and emits a complete MCP server whose tools are that contract's functions, with events exposed as resources.
- Abi-to-mcp generate <address> writes a full server — server.py, requirements.txt and a README
- Every contract function becomes an AI-callable tool; a router like Uniswap yields tools such as getAmountsOut
- Solidity types mapped to JSON Schema and Python automatically — address to string, uint256 to string
- Simulation-first for state changes: a write simulates before it executes, with a gas estimate
- Contract events exposed as resources for historical queries
- Works for any verified contract on any chain — ERC-20, ERC-721, DeFi, DAOs
Pip install abi-to-mcp and Python 3.10+. The generated server needs RPC_URL (an Ethereum RPC endpoint) to run; PRIVATE_KEY is optional and only for signing transactions, ETHERSCAN_API_KEY optional for fetching verified ABIs. Generate with abi-to-mcp generate <address> -o <dir>, install the output's requirements, and point your client at its server.py.
One command plus a key — pip install abi-to-mcp, then supply credentials
