Universal Contract AI
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.
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
Maintainer
Works with
Installation
PIP
pip install abi-to-mcpManual Installation
pip install abi-to-mcpConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
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-mcpGenerate 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-serverSet 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 operationsConfigure 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"
}
}
}
}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.
Universal Contract AI Alternatives — Similar Finance & Fintech Servers
Looking for alternatives to Universal Contract AI? Here are other popular finance & fintech servers you can use with Claude, Cursor, and VS Code.
ValueCell
★ 10.7kValueCell is a community-driven, multi-agent platform for financial applications.
Vibe Trading
★ 8.1k'Vibe-Trading: Your Personal Trading Agent'
Quantdinger
★ 6.2kAI quantitative trading platform for crypto, stocks, and forex with backtesting, live trading, market data, and multi-agent research.vibe-trading ,trading-agents,ai-trader,ai-trading
TradingView
★ 2.8kReal-time crypto & stock screening, advanced technical indicators, Bollinger Bands intelligence, candlestick patterns + native Claude Desktop integration. Multi-exchange (Binance, KuCoin, Bybit+). Open-source AI trading infrastructure.
Financial Datasets
★ 2.1kProvides access to comprehensive financial data including income statements, balance sheets, cash flow statements, stock prices, company news, SEC filings, and cryptocurrency information with built-in financial ratio analysis.
Stripe
★ 1.6kThe Stripe Model Context Protocol server allows you to integrate with Stripe APIs through function calling. This protocol supports various tools to interact with different Stripe services.
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.
Set Up Universal Contract AI in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.