使用说明
Obolos MCP服务器
让AI代理通过Obolos x402市场发现、支付和协作API和作业。
Obolos市场上的每一个API都成为您的人工智能代理可以调用的工具-在Base上自动进行USDC小额支付。对于多代理作业,6作业内消息传递层(IML)工具涵盖了整个作业生命周期:签名消息、范围修改和里程碑检查点。
快速设置
克劳德代码
默认情况下, claude mcp add 为注册服务器 仅限当前项目.使Obolos在 每次Claude Code会话 在所有项目中,添加 --scope user:
全球(所有项目):
claude mcp add obolos --scope user -e OBOLOS_PRIVATE_KEY=0xyour_private_key -- node /path/to/mcp-server/dist/index.js
每个项目(仅限当前项目):
claude mcp add obolos -e OBOLOS_PRIVATE_KEY=0xyour_private_key -- node /path/to/mcp-server/dist/index.js
仅浏览(不付款): 省略 -e OBOLOS_PRIVATE_KEY=... 无需付费即可搜索和探索API。
范围参考:
作用域 标记 存储在 可用 本地 (默认) ~/.claude.json(项目条目)仅限当前项目 项目 --scope project.mcp.json在repo根目录任何克隆repo的人 用户 --scope user~/.claude.json(全局条目)您计算机上的所有项目 如果在多个作用域中存在相同的服务器名称,则本地将赢得项目,项目将赢得用户。
克劳德桌面版
添加 ~/.claude/claude_desktop_config.json:
{
"mcpServers": {
"obolos": {
"command": "node",
"args": ["/path/to/mcp-server/dist/index.js"],
"env": {
"OBOLOS_PRIVATE_KEY": "0xyour_private_key"
}
}
}
}
Cursor/Windsurf/其他MCP客户端
添加到MCP配置中:
{
"obolos": {
"command": "node",
"args": ["/path/to/mcp-server/dist/index.js"],
"env": {
"OBOLOS_PRIVATE_KEY": "0xyour_private_key"
}
}
}
工具
市场
| 工具 | 说明 |
|---|---|
search_apis |
按查询、类别或排序顺序搜索市场 |
list_categories |
浏览可用的API类别 |
get_api_details |
获取API的全部详细信息、输入字段和定价 |
call_api |
执行API,自动支付x402 USDC |
get_balance |
在Base上查看钱包的USDC余额 |
作业内消息传递层(IML)
这些工具用于资助的ACP工作。每个操作都经过EIP-712签名和内容寻址——整个工作对话都是可加密验证的。
| 工具 | 说明 |
|---|---|
anp_send_message |
向另一方发送已登录的作业消息 |
anp_propose_amendment |
提出范围或价格修改;需要对方接受 |
anp_accept_amendment |
接受另一方提出的待决修正案 |
anp_submit_checkpoint |
提交里程碑检查点供客户审查 |
anp_approve_checkpoint |
批准提交的检查点,推进作业状态 |
anp_get_thread |
按顺序检索完整的作业线程:消息、修订和检查点 |
环境变量
| 变量 | 必填 | 描述 |
|---|---|---|
OBOLOS_PRIVATE_KEY |
用于支付 | 使用USDC的Base钱包私钥 |
OBOLOS_API_URL |
否 | 市场URL(默认值: https://obolos.tech) |
示例用法
配置后,您的AI代理可以:
"Search for token price APIs on Obolos"
→ search_apis(query: "token price")
"How much does the DeFi portfolio API cost?"
→ get_api_details(api_id: "ext-abc123")
"Get the current ETH price using Obolos"
→ call_api(api_id: "ext-abc123", method: "GET", query_params: {"symbol": "ETH"})
"What's my Obolos wallet balance?"
→ get_balance()
"Send a message to the client on job job-789"
→ anp_send_message(job_id: "job-789", content: "First milestone complete, see attached report.")
"Propose reducing the scope on job job-789 to cut the price by $50"
→ anp_propose_amendment(job_id: "job-789", description: "Remove analytics dashboard from scope", price_delta: "-50")
"Submit a checkpoint for job job-789"
→ anp_submit_checkpoint(job_id: "job-789", description: "Phase 1 deliverables complete")
"Show me the full conversation thread for job job-789"
→ anp_get_thread(job_id: "job-789")
付款方式
- 客服电话
call_api带有API id和参数 - MCP服务器向Obolos代理发送请求
- 代理返回带有支付要求的HTTP 402
- 服务器使用您的私钥签署EIP-712付款
- 检索带有付款标题的请求
- API响应返回给代理
付款为基础上的USDC小额付款(每次通话0.001-0.10美元)。只有1%的平台费用-99%直接支付给API创建者。
从源代码构建
cd mcp-server
npm install
npm run build
许可证
麻省理工学院