Universal Contract AI Interface (UCAI) 🔗 ABI to MCP | The open standard for connecting AI agents to blockchain. MCP server generator for smart contracts. #666
nirholas
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Pre-submission Checklist
What would you like to share?
Universal Contract AI Interface
The ABI-to-MCP Server Generator
☑️ UCAI in Anthropic MCP Registry | 🌐 Try the Web Builder → | 📖 Documentation | 🛡️ Security Scanner
🌐 Try It Live — No Install Required
mcp.ucai.tech — Generate MCP servers directly in your browser.
Features:
server.py,requirements.txt,README.md?address=0x...&network=ethereumto anyoneOverview
Found a contract on Etherscan? One command. Claude can now use it.
That's it. Every function, every event, every query — now a Claude tool.
Quick Start
1. Generate a server
2. Connect to Claude Desktop
Add to your config (
~/Library/Application Support/Claude/claude_desktop_config.jsonon Mac):{ "mcpServers": { "uniswap": { "command": "python", "args": ["/Users/YOU/uniswap-server/server.py"], "env": { "RPC_URL": "https://eth.llamarpc.com" } } } }3. Ask Claude anything
Claude now speaks DeFi.
Example
The UCAI Standard
UCAI (Universal Contract AI Interface) is a standard for how AI agents interact with smart contracts.
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.Why UCAI?
The Problem: You want AI to interact with smart contracts. But:
The Solution: One command generates a production-ready MCP server from any ABI.
abi-to-mcp generate 0x...Use Cases
Real Examples
🦄 Uniswap: Swap tokens with natural language
abi-to-mcp generate 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D -o ~/uniswap-serverNow ask Claude:
Claude calls
getAmountsOut()and responds:🏦 Aave: Check your health factor
abi-to-mcp generate 0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2 -o ~/aave-serverClaude reads your position and warns you before it's too late.
🎨 Any NFT: Explore collections
abi-to-mcp generate 0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D -o ~/bayc-serverClaude calls
ownerOf()andbalanceOf()to answer.🔮 Your own contract
abi-to-mcp generate ./my-contract-abi.json --address 0x... -o ~/my-serverAny verified contract. Any local ABI. One command.
🛡️ Security Scanner
Before you connect Claude to a contract, know what you're dealing with. The security scanner analyzes contracts for 50+ risk patterns:
Risk Detection Categories:
selfdestruct, arbitrarydelegatecall,tx.originauthPositive Indicators:
Try it: mcp.ucai.tech — Enter any contract address and click "🛡️ Scan"
📖 Contract Whisperer
Don't understand what a contract does? The Contract Whisperer explains it in plain English:
Explains:
⚡ Pro Templates
Pre-built multi-contract bundles for advanced use cases:
Each bundle downloads as a ZIP with:
server.pyfiles (one per contract)claude_config.jsonTry it: mcp.ucai.tech → "⚡ Pro Templates" tab
What Gets Generated?
When you point abi-to-mcp at a contract, it introspects every function and event, then generates tools Claude can call:
balanceOf(address)swap(path, amount)Transferevent15-30 tools per contract, fully typed, simulation-protected for writes.
CLI Reference
abi-to-mcp generateGenerate an MCP server from an ABI.
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 validateValidate an ABI without generating.
Generated Server Structure
Type Mapping
addressstringwith patternstruint256string(for precision)struint8-uint32integerwith boundsintboolbooleanboolstringstringstrbytesstringwith patternstrbytes32stringwith patternstrtupleobjectDictT[]arrayListT[N]arraywith boundsListEnvironment Variables
RPC_URLCONTRACT_ADDRESSPRIVATE_KEYETHERSCAN_API_KEYSupported Networks
mainnetsepoliapolygonarbitrumoptimismbasebscavalancheSecurity
simulate=Falseto execute--read-onlyto completely disable writesDevelopment
Real-World Applications
1. DeFi Portfolio Agent
Generate servers for each protocol, Claude handles the rest.
2. DAO Governance Assistant
3. NFT Collection Manager
4. Wallet Assistant
Keywords
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
Roadmap
We welcome contributions! See CONTRIBUTING.md.
🔴 High Priority
🟡 Good First Issues
🚀 Future
License
MIT License — see LICENSE.
Acknowledgments
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
Relevant Links
☑️ UCAI in MCP Registry→
📚 Documentation →
🌐 Try the Web Builder →
Beta Was this translation helpful? Give feedback.
All reactions