Universal Contract AI

v0.1.0Finance & Fintechstable

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.

abiai-agentsarbitrumblockchainclaude
Share:
33
Stars
0
Downloads
0
Weekly
0/5

What is Universal Contract AI?

Universal Contract AI is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to 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. py...

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.

This server falls under the Finance & Fintech category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Universal Contract AI Interface (UCAI) 🔗 ABI to MCP | The op

Use Cases

Connect to blockchain
Query smart contracts
Build DeFi applications
nirholas

Maintainer

LicenseMIT
Languagepython
Versionv0.1.0
UpdatedMay 7, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

PIP

pip install abi-to-mcp

Manual Installation

pip install abi-to-mcp

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Universal Contract AI

Universal Contract AI (UCAI) is a Python tool that converts any Ethereum-compatible smart contract ABI into a fully functional MCP server, giving AI agents like Claude the ability to read from and write to blockchain contracts through natural-language prompts. It handles ABI-to-JSON-Schema type mapping for Solidity types, enforces transaction simulation before writes, and includes a built-in security scanner that detects over 50 risk patterns such as rug pulls, honeypots, and hidden mints. DeFi developers and blockchain engineers use it to let AI assistants query Uniswap routing, inspect Aave positions, transfer ERC-20 tokens, and interact with any EVM-compatible contract.

Prerequisites

  • Python 3.10+ and pip installed
  • A Web3 RPC endpoint URL (e.g. Infura, Alchemy, or a public endpoint like https://eth.llamarpc.com) for RPC_URL
  • A private key (PRIVATE_KEY) if you intend to execute write/state-changing transactions
  • An Etherscan API key (ETHERSCAN_API_KEY) if fetching ABIs from block explorers by contract address
  • An MCP client such as Claude Desktop
1

Install the abi-to-mcp package

Install the UCAI CLI from PyPI. The package name on PyPI is abi-to-mcp.

pip install abi-to-mcp
2

Generate an MCP server from a contract ABI

Run abi-to-mcp generate with a contract address (fetched from Etherscan) or a local ABI JSON file. The -o flag specifies the output directory for the generated server.

abi-to-mcp generate 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984 -o ~/my-uniswap-server
# Or from a local ABI file:
abi-to-mcp generate ./MyContract.abi.json -o ~/my-contract-server
3

Set environment variables

Export the required environment variables before starting the generated server. RPC_URL is required for all operations; PRIVATE_KEY is required only for write calls.

export RPC_URL=https://eth.llamarpc.com
export ETHERSCAN_API_KEY=your_etherscan_key
export PRIVATE_KEY=your_private_key   # only for write operations
4

Configure your MCP client

Add the generated server to your claude_desktop_config.json. Point the args to the server.py file generated in the output directory.

{
  "mcpServers": {
    "ucai-contract": {
      "command": "python",
      "args": ["/home/user/my-uniswap-server/server.py"],
      "env": {
        "RPC_URL": "https://eth.llamarpc.com",
        "ETHERSCAN_API_KEY": "your_etherscan_key"
      }
    }
  }
}
5

Verify with a read call

Ask your AI assistant to call a read-only function on the contract to confirm connectivity before attempting any write operations.

Universal Contract AI Examples

Client configuration

MCP client config for a Uniswap V2 router MCP server generated by UCAI. Adjust the path and env vars for your contract.

{
  "mcpServers": {
    "ucai-contract": {
      "command": "python",
      "args": ["/home/user/my-uniswap-server/server.py"],
      "env": {
        "RPC_URL": "https://eth.llamarpc.com",
        "ETHERSCAN_API_KEY": "your_etherscan_key"
      }
    }
  }
}

Prompts to try

Use these prompts to interact with EVM smart contracts through your AI assistant after generating a UCAI server.

- "What is the best route to swap 1 ETH for USDC on Uniswap right now?"
- "Check the current ETH/USDC price from the Uniswap V2 router"
- "Scan this contract address for security vulnerabilities: 0xAbCd..."
- "Explain in plain English what this smart contract does based on its ABI"
- "Simulate sending 100 USDT to 0xRecipient — don't execute yet, just show me what would happen"

Troubleshooting Universal Contract AI

abi-to-mcp generate fails with 'contract not found' when using a contract address

Ensure ETHERSCAN_API_KEY is set in your environment. Without it, ABI fetching from Etherscan by address is not possible. Alternatively, download the ABI JSON manually from Etherscan and pass the file path instead.

Write transactions fail with 'PRIVATE_KEY not set' or similar error

Write operations require PRIVATE_KEY to be set in the server's environment. Add it to the env block in your MCP config. Never commit private keys to source control — use environment variable injection.

RPC calls time out or return stale data

Switch to a more reliable RPC endpoint such as Infura (https://mainnet.infura.io/v3/YOUR_KEY) or Alchemy. Public endpoints like llamarpc.com may rate-limit heavy usage.

Frequently Asked Questions about Universal Contract AI

What is Universal Contract AI?

Universal Contract AI is a Model Context Protocol (MCP) server that 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. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Universal Contract AI?

Install via pip with: pip install abi-to-mcp. Then configure your AI client to connect to this MCP server.

Which AI clients work with Universal Contract AI?

Universal Contract AI works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Universal Contract AI free to use?

Yes, Universal Contract AI is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Finance & Fintech MCP Servers

Explore all finance & fintech servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "ucai": { "command": "pip", "args": ["install", "abi-to-mcp"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Universal Contract AI?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides