Get the FREE Ultimate OpenClaw Setup Guide →

UCAI

Universal Contract AI Interface (UCAI) đź”— ABI to MCP | The open standard for connecting AI agents to blockchain. MCP server generator for smart contracts. Claude + Uniswap, Aave, ERC20, NFTs, DeFi. Python CLI, Web3 integration, transaction simulation. Polygon, Arbitrum, Base, Ethereum EVM chains. Claude, GPT, LLM tooling, Solidity, OpenAI.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio nirholas-ucai python /path/to/server.py \
  --env RPC_URL="https://your-rpc-url"

How to use

This MCP server generator creates Claude-accessible tools from an ABI or verified contract, turning every function, event, and query into a structured Claude tool that can be invoked via MCP. The server exposes a Claude-friendly interface to inspect contracts, run automated checks, and generate targeted interactions. Core capabilities include a Security Scanner that flags common risks, the Contract Whisperer that explains contract behavior in plain language, and Pro Templates that bundle common DeFi patterns (like token transfers, liquidity actions, and staking flows) into ready-to-use tools. You can generate a server for a specific contract address, host it locally or in a cloud environment, and wire it into Claude Desktop using the provided mcpServers config.

Once running, you can invoke Claude with the generated tools to inspect an ABI, query state, simulate calls, and fetch documentation for contract functions and events. The server translates ABI data into MCP-compatible endpoints, enabling natural-language prompts such as “Explain the transfer() function in plain English” or “Show the approve flow for this token.”

How to install

Prerequisites:

  • Python 3.10+ installed
  • pip available
  • Access to a contract ABI or verified contract address to generate the MCP server

Step-by-step:

  1. Install the ABI-to-MCP generator

    • pip install abi-to-mcp
  2. Generate your MCP server from a contract address or ABI

    • abi-to-mcp generate <CONTRACT_ADDRESS_OR_ABI> -o ~/my-ucai-server
    • If you provide a contract address, the tool will fetch/derive the ABI and create a server scaffold in the target directory
  3. Install server dependencies

    • cd ~/my-ucai-server
    • pip install -r requirements.txt
  4. Run the server

    • python server.py
  5. Configure Claude Desktop to point to your local server

    • Use the mcpServers entry with the path to server.py and any required environment variables (see mcp_config example)

Prerequisites recap:

  • A compatible Python environment (3.10+)
  • Internet access for dependency installation and ABI fetching
  • A target contract address or ABI to generate the server from

Additional notes

Tips and common issues:

  • Ensure the RPC_URL (or equivalent provider) is reachable and supports the methods your contract uses.
  • If using a local path in mcp_config, ensure the path to server.py is correct and accessible by Claude Desktop.
  • The generated server may expose environment-variable options (e.g., RPC_URL). Populate these in the mcp_config env section as needed.
  • For large ABIs or complex contracts, Rabin-based analysis in the Security Scanner may surface more warnings; review those outputs before enabling production use.
  • If the server fails to start, check that Python dependencies in requirements.txt are installed and that the port/host you use is not blocked by a firewall.
  • Keep the ABI-to-MCP generator up to date to benefit from new templates and improvements in the Contract Whisperer and Security Scanner modules.

Related MCP Servers

Sponsor this space

Reach thousands of developers ↗