关于 toolfi
toolfi 是面向 AI Agent 的 API 市场,提供加密货币数据及相关工具,供 Agent 自动发现和调用。它支持通过 Base 上的 USDC 按调用付费,并提供 MCP 服务端接入方式。
主要功能
- 01发现并选择 API 工具
- 02通过 USDC 按调用付费
- 03提供结构化数据响应
- 04涵盖价格、安全、跨链与 DeFi 数据
适用场景
- 01查询加密货币价格和热门代币
- 02检查代币或钱包风险
- 03查找跨链路线与 DeFi 收益
MCP 相关
项目包含面向 Claude Desktop 的 MCP 服务端,可通过 MCP 接入其 API 工具。
配置
远程服务无需本地安装。选择你使用的客户端,复制配置或使用一键安装。
服务地址
https://web-ten-alpha-81.vercel.app/api/mcp一键复制安装命令
Claude CodeTerminal
claude mcp add --transport http tsubaki414-toolfi https://web-ten-alpha-81.vercel.app/api/mcpCursor.cursor/mcp.json
{"mcpServers":{"tsubaki414-toolfi":{"type":"http","url":"https://web-ten-alpha-81.vercel.app/api/mcp"}}}在 Cursor 中打开VS Code.vscode/mcp.json
{"servers":{"tsubaki414-toolfi":{"type":"http","url":"https://web-ten-alpha-81.vercel.app/api/mcp"}}}在 VS Code 中打开Claude Desktopclaude_desktop_config.json
{"mcpServers":{"tsubaki414-toolfi":{"type":"http","url":"https://web-ten-alpha-81.vercel.app/api/mcp"}}}Windsurf~/.codeium/windsurf/mcp_config.json
{"mcpServers":{"tsubaki414-toolfi":{"serverUrl":"https://web-ten-alpha-81.vercel.app/api/mcp"}}}命令在终端中运行;JSON 粘贴到对应客户端的 MCP 配置后重启。需要授权的服务会在首次连接时提示登录。
工具
详细介绍
ToolFi — 面向 AI Agent 的 API 市场
“下一个独角兽将是一个面向 Agent 的 API 市场……Claude 应能在其中选择合适的 API 并自动连接” — @auralix4
API 市场早已存在,但它们是为人类开发者打造的。ToolFi 专为 AI 工作流 打造 — Agent 可以自动发现、选择并支付 API,无需人工干预。
问题
AI Agent 需要外部数据(价格、安全检查、路线)。现有方案:
- RapidAPI 等 — 为人类打造。Agent 无法浏览并点击“订阅”
- 硬编码密钥 — 存在安全风险,且无法扩展
- 手动集成 — 每个新工具都需要人工配置
解决方案
ToolFi = Agent 可以自主发现和使用的 API。
- 发现 — Agent 通过
.well-known/mcp.json、MCP 注册表和语义搜索查找工具 - 选择 — 丰富的描述帮助 Agent 选择合适的工具
- 支付 — 使用 Base 上的 USDC,无需 API 密钥,付费即可使用
- 数据 — 结构化响应,针对大模型使用进行了优化
工作原理
Agent → GET /api/price?symbol=ETH
↓
Server → 402 Payment Required
{ toolId, price, paymentInstructions }
↓
Agent → USDC.approve() → Registry.payForCall(toolId)
↓
Agent → Retry with X-Payment-Tx header
↓
Server → Verify on-chain → Return data
可用工具
| 工具 | 价格 | 功能 |
|---|---|---|
| 加密货币价格预言机 | 0.001 USDC | 通过 DexScreener 获取实时价格 |
| Rug Pull 扫描器 | 0.003 USDC | 通过 GoPlus 检查代币安全性 |
| 跨链桥路由器 | 0.002 USDC | 通过 Li.Fi 获取跨链路线 |
| DeFi 收益查找器 | 0.002 USDC | 通过 DefiLlama 查找最佳收益 |
| 兑换路由器 | 0.002 USDC | 通过 Li.Fi 聚合 DEX |
| 热门币种 | 0.001 USDC | 通过 CoinGecko 查看热门币种 |
| 协议 TVL | 0.001 USDC | 通过 DefiLlama 获取 DeFi TVL 数据 |
| Gas 追踪器 | 0.0005 USDC | 获取 EVM 链的 Gas 价格 |
| 钱包风险扫描器 | 0.005 USDC | 分析地址风险 |
| 新闻摘要 | 0.002 USDC | 加密货币新闻摘要 |
集成选项
选项 1:HTTP API(任何 Agent)
# Pay on-chain, then call with payment proof
curl -H "X-Payment-Tx: 0x..." "https://toolfi.vercel.app/api/price?symbol=ETH"
选项 2:MCP 服务(Claude Desktop)
cd mcp-server
uv venv && source .venv/bin/activate
uv pip install -e .
添加到 Claude Desktop 配置中:
{
"mcpServers": {
"toolfi": {
"command": "/path/to/.venv/bin/python",
"args": ["-m", "src.server"],
"cwd": "/path/to/mcp-server"
}
}
}
然后向 Claude 提问:“检查 Base 上代币 0x... 的安全性”
面向工具创建者
发布 API 并赚取 USDC:
cast send $REGISTRY \
"registerTool(string,string,string,uint256)" \
"My Tool" "https://api.example.com" "Description" 10000 \
--rpc-url https://sepolia.base.org --private-key $KEY
价格使用 6 位小数:10000 = 每次调用 $0.01
提取收益:
cast send $REGISTRY "withdraw()" --rpc-url https://sepolia.base.org
合约
| 链 | Base Sepolia (84532) |
| USDC | 0x036CbD53842c5426634e7929541eC2318f3dCF7e |
| 注册表 | 0x3D6C600799C67b45061eCAbfD5bBF8ef57Dded88 |
项目结构
toolfi/
├── api/ # Vercel serverless API
├── web/ # Next.js frontend
├── mcp-server/ # Python MCP server for Claude
├── src/ # Solidity contracts
├── skill/ # OpenClaw skill spec
└── script/ # Deployment scripts
开发
# Contracts
forge build
forge test -v
# API
cd api && npm install && npm start
# MCP Server
cd mcp-server && uv pip install -e . && python -m src.server
路线图
- 核心注册表合约
- 提供 10 个工具的 Web API
- 面向 Claude Desktop 的 MCP 服务
- 部署至主网
- 创建者仪表板
- Agent SDK(Python/TypeScript)
- 幂等键
- 使用情况分析
许可证
MIT
评论
支持 Markdown
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。