Observed since 20 Oct, 17:27 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
UCAI — The ABI-to-MCP Server Generator. Convert smart contract ABIs to AI-ready MCP servers.
██╗ ██╗ ██████╗ █████╗ ██╗
██║ ██║██╔════╝██╔══██╗██║
██║ ██║██║ ███████║██║
██║ ██║██║ ██╔══██║██║
╚██████╔╝╚██████╗██║ ██║██║
╚═════╝ ╚═════╝╚═╝ ╚═╝╚═╝
Any contract. One command. Claude speaks it.
🌐 Try the Web Builder → | 📖 Documentation | 🛡️ Security Scanner
mcp.ucai.tech — Generate MCP servers directly in your browser.
┌────────────────────────────────────────────────────────────────────────────────┐
│ │
│ 🌐 MCP BUILDER [Connect Wallet] │
│ │
│ ┌─────────────────────────────────────────────────────────────────────────┐ │
│ │ ⚡ Pro Templates │ 🔧 Custom Contract │ │
│ └─────────────────────────────────────────────────────────────────────────┘ │
│ │
│ 🛡️ Security Scanner: Score 87/100 ✅ Low Risk │
│ ├── ✅ Contract verified on Etherscan │
│ ├── ✅ Uses OpenZeppelin (audited) │
│ ├── ⚠️ Owner can pause transfers │
│ └── ⚠️ Mint function detected │
│ │
│ 📖 What This Contract Does: │
│ "ERC-20 token with standard transfer, approve, and allowance functions." │
│ │
│ [📥 Download Server] [🔗 Share Link] [📋 Copy Config] │
│ │
└────────────────────────────────────────────────────────────────────────────────┘
Features:
server.py, requirements.txt, README.md?address=0x...&network=ethereum to anyone ┌──────────────────────────────────────────────────────────────────────────┐
│ │
│ 1. FIND 2. GENERATE 3. DONE │
│ │
│ ┌─────────────────┐ ┌─────────────────┐ ┌───────────────┐ │
│ │ Etherscan │ │ │ │ │ │
│ │ ┌─────────┐ │ │ $ abi-to-mcp │ │ Claude │ │
│ │ │ Contract│ │ ────▶ │ generate │ ──▶ │ 🔌 Tools │ │
│ │ │ ABI │ │ │ 0x7a25... │ │ │ │
│ │ └─────────┘ │ │ │ │ "Swap 1 ETH" │ │
│ └─────────────────┘ └─────────────────┘ └───────────────┘ │
│ │
│ Any contract One command AI speaks it │
│ │
└──────────────────────────────────────────────────────────────────────────┘
Found a contract on Etherscan? One command. Claude can now use it.
pip install abi-to-mcp
# Uniswap — Claude can swap tokens
abi-to-mcp generate 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D -o ~/uniswap-server
# ETH 2.0 Beacon Deposit — Claude can explore staking
abi-to-mcp generate 0x00000000219ab540356cBB839Cbe05303d7705Fa -o ~/eth-staking-server
# Any verified contract works
abi-to-mcp generate <ANY_CONTRACT_ADDRESS>
That's it. Every function, every event, every query — now a Claude tool.
abi-to-mcp generate 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D -o ~/uniswap-server
cd ~/uniswap-server && pip install -r requirements.txt
Add to your config (~/Library/Application Support/Claude/claude_desktop_config.json on Mac):
{
"mcpServers": {
"uniswap": {
"command": "python",
"args": ["/Users/YOU/uniswap-server/server.py"],
"env": {
"RPC_URL": "https://eth.llamarpc.com"
}
}
}
}
Claude now speaks DeFi.
┌────────────────────────────────────────────────────────────────────────────┐
│ YOU │
├────────────────────────────────────────────────────────────────────────────┤
│ "What's the best route to swap 1 ETH for USDC on Uniswap?" │
└────────────────────────────────────────────────────────────────────────────┘
│
▼
┌────────────────────────────────────────────────────────────────────────────┐
│ CLAUDE │
├────────────────────────────────────────────────────────────────────────────┤
│ I'll check the Uniswap router for the best path... │
│ │
│ ✅ Called: getAmountsOut(1 ETH, [WETH, USDC]) │
│ │
│ Best route: ETH → WETH → USDC │
│ You would receive: 3,847.23 USDC │
│ Price impact: 0.02% │
└────────────────────────────────────────────────────────────────────────────┘
│
▼
┌────────────────────────────────────────────────────────────────────────────┐
│ YOU │
├────────────────────────────────────────────────────────────────────────────┤
│ "Do it. Swap 1 ETH for USDC." │
└────────────────────────────────────────────────────────────────────────────┘
│
▼
┌────────────────────────────────────────────────────────────────────────────┐
│ CLAUDE │
├────────────────────────────────────────────────────────────────────────────┤
│ 🔒 Simulating transaction first... │
│ │
│ ✅ Simulation successful │
│ Gas estimate: 152,847 (~$3.42) │
│ Expected output: 3,847.23 USDC │
│ │
│ Ready to execute. Confirm? [Yes/No] │
└────────────────────────────────────────────────────────────────────────────┘
UCAI (Universal Contract AI Interface) is a standard for how AI agents interact with smart contracts.
╔═══════════════════════════════════════════════════════════════════════════════╗
║ ║
║ ┌─────────┐ ┌──────────────┐ ┌──────────────┐ ┌──────────┐ ║
║ │ │ │ │ │ │ │ │ ║
║ │ Claude │─────▶│ abi-to-mcp │─────▶│ MCP Server │─────▶│ Chain │ ║
║ │ │ │ generate │ │ (your tools) │ │ ⛓️ │ ║
║ └─────────┘ └──────────────┘ └──────────────┘ └──────────┘ ║
║ │ │ │ ║
║ │ "swap 1 ETH" │ call swap() │ ║
║ └────────────────────────────────────────┴─────────────────────┘ ║
║ ║
╚═══════════════════════════════════════════════════════════════════════════════╝
UCAI defines
Why UCAI
Every contract becomes AI-accessible through the same interface. No custom code per contract.
This package (abi-to-mcp) is the reference implementation of UCAI for MCP.
The Problem: You want AI to interact with smart contracts. But:
The Solution: One command generates a production-ready MCP server from any ABI.
| Manual Approach | With abi-to-mcp |
|---|---|
| Read contract ABI | abi-to-mcp generate 0x... |
| Write 15+ tool functions | ✅ Auto-generated |
| Map types (address → string, uint256 → string) | ✅ Handled |
| Add transaction simulation | ✅ Built-in |
| Handle events as resources | ✅ Included |
| ~2-4 hours per contract | ~10 seconds |
abi-to-mcp generate 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D -o ~/uniswap-server
Now ask Claude:
"What's the current rate for swapping 10 ETH to USDC?"
Claude calls getAmountsOut() and responds:
"10 ETH → 38,472.31 USDC via the WETH/USDC pool. Want me to simulate the swap?"
abi-to-mcp generate 0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2 -o ~/aave-server
"What's my health factor on Aave? Am I at risk of liquidation?"
Claude reads your position and warns you before it's too late.
abi-to-mcp generate 0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D -o ~/bayc-server
"Who owns BAYC #8817? How many apes does that wallet have?"
Claude calls ownerOf() and balanceOf() to answer.
abi-to-mcp generate ./my-contract-abi.json --address 0x... -o ~/my-server
Any verified contract. Any local ABI. One command.
Before you connect Claude to a contract, know what you're dealing with. The security scanner analyzes contracts for 50+ risk patterns:
┌────────────────────────────────────────────────────────────────────────────────┐
│ 🛡️ SECURITY REPORT Score: 42/100 │
├────────────────────────────────────────────────────────────────────────────────┤
│ │
│ 🚨 CRITICAL │
│ ├── Self-Destruct Function — Contract can be destroyed │
│ └── tx.origin Authentication — Vulnerable to phishing │
│ │
│ ⚠️ HIGH │
│ ├── Hidden Mint — Owner can create unlimited tokens │
│ ├── Pausable — Owner can freeze all transfers │
│ └── Blacklist — Owner can block specific addresses │
│ │
│ ✅ POSITIVES │
│ ├── Contract verified on Etherscan │
│ ├── Uses OpenZeppelin (audited library) │
│ └── Has reentrancy protection │
│ │
│ [⚠️ Proceed Anyway] [❌ Cancel — Too Risky] │
│ │
└────────────────────────────────────────────────────────────────────────────────┘
Risk Detection Categories:
| Severity | Examples |
|---|---|
| 🚨 Critical | selfdestruct, arbitrary delegatecall, tx.origin auth |
| ⚠️ High | Hidden mint, pause, blacklist, adjustable fees, tx limits |
| ⚡ Medium | Transfer restrictions, external calls, proxy patterns |
| ℹ️ Low | Timestamp dependence, unchecked math |
Positive Indicators:
Try it: mcp.ucai.tech — Enter any contract address and click "🛡️ Scan"
Don't understand what a contract does? The Contract Whisperer explains it in plain English:
┌────────────────────────────────────────────────────────────────────────────────┐
│ 📖 WHAT THIS CONTRACT DOES │
├────────────────────────────────────────────────────────────────────────────────┤
│ │
│ Summary: Uniswap V2 Router — Decentralized token exchange │
│ │
│ Main Functions: │
│ ├── 📖 getAmountsOut — Calculate expected output for a swap │
│ ├── ✏️ swapExactTokensForTokens — Exchange tokens at market rate │
│ ├── ✏️ addLiquidity — Provide liquidity to earn fees │
│ └── 📖 getReserves — Check pool balances │
│ │
│ Permissions: │
│ ├── 🟢 Anyone — Can swap, add/remove liquidity │
│ └── 🟡 Factory — Can create new pairs │
│ │
│ Risk Summary: │
│ "Standard DEX router. No owner privileges. Interacts with external pools │
│ which may have their own risks." │
│ │
└────────────────────────────────────────────────────────────────────────────────┘
Explains:
Pre-built multi-contract bundles for advanced use cases:
| Template | Contracts | Description |
|---|---|---|
| Flash Loan Playground | Aave V3 Pool, Uniswap Router | Explore flash loans for arbitrage |
| Multi-DEX Arbitrage | Uniswap, Sushiswap, Curve | Compare prices across exchanges |
| Yield Aggregator Intel | Yearn, Convex, Aura | Track yield farming opportunities |
| Liquidation Bot Intel | Aave, Compound | Monitor positions for liquidation |
| Base DeFi Starter | Aerodrome, BaseSwap | L2-native DeFi on Base |
| Arbitrum Perps Suite | GMX, Camelot | Perpetual futures on Arbitrum |
Each bundle downloads as a ZIP with:
server.py files (one per contract)claude_config.jsonTry it: mcp.ucai.tech → "⚡ Pro Templates" tab
When you point abi-to-mcp at a contract, it introspects every function and event, then generates tools Claude can call:
| Contract has... | You get... | Claude can... |
|---|---|---|
balanceOf(address) | Read tool | "Check vitalik.eth's USDC balance" |
swap(path, amount) | Write tool (simulated) | "Swap 1 ETH for DAI" — simulates first, shows you gas |
Transfer event | Query tool | "Show me the last 10 transfers over $1M" |
| Complex structs | Typed schemas | Handles tuples, arrays, nested data |
15-30 tools per contract, fully typed, simulation-protected for writes.
abi-to-mcp generateGenerate an MCP server from an ABI.
abi-to-mcp generate <source> [options]
Arguments:
source: ABI file path or contract addressOptions:
-o, --output PATH: Output directory (default: ./mcp-server)-n, --network TEXT: Network for address lookups (default: mainnet)-a, --address TEXT: Contract address (if not in source)--name TEXT: Server name (auto-detected if not provided)--read-only: Only generate read operations--no-events: Exclude events as resources--no-simulate: Disable simulation by default for writesabi-to-mcp inspectPreview what would be generated without creating files.
abi-to-mcp inspect ./token-abi.json
abi-to-mcp validateValidate an ABI without generating.
abi-to-mcp validate ./token-abi.json
my-mcp-server/
├── server.py # Main MCP server
├── config.py # Configuration
├── requirements.txt # Dependencies
├── README.md # Documentation
├── pyproject.toml # Package config
└── .env.example # Environment template
| Solidity Type | JSON Schema | Python Type |
|---|---|---|
address | string with pattern | str |
uint256 | string (for precision) | str |
uint8-uint32 | integer with bounds | int |
bool | boolean | bool |
string | string | str |
bytes | string with pattern | str |
bytes32 | string with pattern | str |
tuple | object | Dict |
T[] | array | List |
T[N] | array with bounds | List |
| Variable | Description | Required |
|---|---|---|
RPC_URL | Web3 RPC endpoint | Yes |
CONTRACT_ADDRESS | Override contract address | No |
PRIVATE_KEY | For write operations | For writes |
ETHERSCAN_API_KEY | For fetching from Etherscan | For Etherscan |
| Network | ID | Chain ID |
|---|---|---|
mainnet | Ethereum | 1 |
sepolia | Sepolia Testnet | 11155111 |
polygon | Polygon | 137 |
arbitrum | Arbitrum One | 42161 |
optimism | Optimism | 10 |
base | Base | 8453 |
bsc | BNB Chain | 56 |
avalanche | Avalanche C-Chain | 43114 |
simulate=False to execute--read-only to completely disable writesgit clone https://github.com/nirholas/UCAI.git
cd UCAI
make setup # Install dependencies
make test # Run 876 tests (92% coverage)
make lint # Check code quality
make docs # Build documentation
"Show me my positions across Uniswap, Aave, and Compound"
"Swap 1 ETH for USDC if the price is above $3,500"
Generate servers for each protocol, Claude handles the rest.
"What proposals are active on Nouns DAO?"
"Draft a proposal to fund the marketing budget"
"Cast my vote on proposal #47"
"List all my NFTs on Opensea"
"Transfer Bored Ape #1234 to vitalik.eth"
"What's the floor price history for CryptoPunks?"
"What tokens do I hold?"
"Send 100 USDC to alice.eth"
"What did I spend on gas this month?"
For SEO and discoverability:
UCAI • Universal Contract AI Interface • MCP • Model Context Protocol • Claude • AI Agent • Smart Contract • Ethereum • EVM • DeFi • Web3 • Solidity • ABI • Blockchain • Token • ERC20 • ERC721 • NFT • DAO • Uniswap • Aave • Polygon • Arbitrum • Base • Optimism • LLM Tool • AI Blockchain • Vibecoding
We welcome contributions! See CONTRIBUTING.md.
MIT License — see LICENSE.
Built with:
UCAI — The Universal Contract AI Interface
Let AI talk to any contract, on any chain.
⭐ Star on GitHub •
📦 Install from PyPI •
🔌 Learn about MCP
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.1.0 | 5 Jan 2026 | 16 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 17:27 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:640796934cfe30acb449116e86a65d28a25406213f93251fbdb2ebab11c5906d