Labsco
MCP SERVER

Universal Contract AI Interface (UCAI)

by nirholas

Turn any verified smart contract's ABI into a working MCP server with one command.

Chain State, Explorers & Contract Tooling
Summary
It generates the server rather than being one — the tools are whatever contract you point it at.

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.

What it is

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.

What you get
  • 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
Requirements

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.

Setup effort

One command plus a key — pip install abi-to-mcp, then supply credentials