UCAI
by nirholas·★ 33·综合分 44
UCAI 是一个将智能合约 ABI 转换为 MCP 服务器的工具,让 AI 代理能与区块链协议交互。
概述
通用合约 AI 接口 (UCAI) 为 AI 代理与智能合约交互提供了一种标准化方式。abi-to-mcp 工具能从任何合约 ABI 生成生产就绪的 MCP 服务器,自动创建工具模式、类型映射和安全机制。它支持多种区块链协议,包括 Uniswap、Aave、ERC20 和 NFT,跨越以太坊、Polygon 和 Arbitrum 等 EVM 链。
试试问 AI
装完之后,这里有 5 个你可以让 AI 做的事:
什么时候选它
当构建需要与区块链合约交互的AI应用,并希望避免手动创建MCP服务器的繁琐工作时。
什么时候不要选它
如果您需要非EVM区块链支持,或者您需要标准ABI到MCP转换未涵盖的高级功能。
此 server 暴露的工具
从 README 抽取出 5 个工具getAmountsOutCalculate the output amounts for token swaps on Uniswap
swapExactTokensForTokensExecute a token swap on Uniswap
ownerOfGet the owner of a specific NFT in a collection
balanceOfGet the token balance of an address
getUserAccountDataGet user's account data on Aave including health factor
说明:Tool names inferred from contract examples and use cases in the README. Actual tool signatures would be generated by the abi-to-mcp tool based on contract ABIs.
可对比工具
安装
安装
pip install abi-to-mcp快速开始
为智能合约生成 MCP 服务器:
abi-to-mcp generate 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D -o ~/uniswap-server
cd ~/uniswap-server && pip install -r requirements.txt连接到 Claude Desktop,在配置文件中添加:
{
"mcpServers": {
"uniswap": {
"command": "python",
"args": ["/path/to/uniswap-server/server.py"],
"env": {
"RPC_URL": "https://eth.llamarpc.com"
}
}
}
}FAQ
- 支持哪些区块链?
- UCAI 支持所有兼容 EVM 的区块链,包括以太坊、Polygon、Arbitrum、Base 等。任何可以通过 RPC 端点访问的链都可以使用。
- 安全扫描器如何工作?
- 安全扫描器分析智能合约中的常见漏洞,如蜜罐、抽地毯和恶意函数。它会检查 OpenZeppelin 使用情况、所有者权限和铸造功能,以提供风险评分。
UCAI 对比
最后更新于 · 由 README + GitHub 公开数据自动生成。