obol
obol
付钱给摆渡人。通过 x402 实现的 Solana 智能体网关。
Obol 是一个面向 AI 智能体的按次付费 Solana API。无需 API 密钥,无需订阅——智能体使用 x402 支付协议 以 USDC 按请求付费。Solana 低于一美分的交易成本使微支付首次成为可能。
名字来源于放在死者舌头上、用来付给卡戎以渡过冥河的硬币。这就是最初的微支付。
工作原理
智能体向付费端点请求数据
Obol 返回 HTTP 402,附带支付要求(金额、收款方、网络)
智能体在 Solana 上发送匹配要求的 USDC
智能体在
X-PAYMENT头中携带交易证明重试Obol 在链上验证并返回数据
无需账户。无需代币。无需注册。付钱即走。
Related MCP server: AgentWallet MCP Server
端点
钱包分析
端点 | 价格 | 描述 |
| $0.01 | SOL 余额、代币数量、总价值 |
| $0.05 | 完整持仓,含价格、NFT、明细拆分 |
| $0.05 | 交易历史,含分类 |
| $0.10 | 多因素风险评估 |
| $0.15 | 代币流向分析、当前价值、盈亏 |
代币数据
端点 | 价格 | 描述 |
| $0.005 | 通过 Jupiter 获取实时价格 |
| $0.01 | 名称、符号、供应量、精度 |
DeFi
端点 | 价格 | 描述 |
| $0.005 | Jupiter 兑换报价,含路由规划 |
| $0.25 | Jupiter 兑换交易构建器 |
| $0.10 | DeFi 持仓——LST、LP、借贷 |
| $0.02 | Solana 上 LST 收益率对比 |
免费
端点 | 描述 |
| API 信息和定价 |
| 服务状态 |
| 代理的 Helius RPC(白名单方法) |
智能体示例
完整参考实现见 examples/agent-client.ts。关键流程:
import { ObolAgent } from './examples/agent-client';
const agent = new ObolAgent();
await agent.discover(); // fetch pricing
agent.loadWallet(process.env.AGENT_PRIVATE_KEY);
// Auto-discovers price, pays, and returns data
const price = await agent.fetch('/api/v1/token/USDC_MINT/price');以仅发现模式运行(无需钱包):
npx tsx examples/agent-client.tsMCP 服务器
Obol 以 MCP 服务器形式提供——任何支持 Model Context Protocol 的 AI 智能体都可以原生发现并调用 Obol 的工具。
从 npm 安装
npm install -g obol-mcpClaude Desktop / Claude Code
添加到你的 MCP 配置中:
{
"mcpServers": {
"obol": {
"command": "npx",
"args": ["-y", "obol-mcp"],
"env": {
"OBOL_URL": "https://obol-production.up.railway.app"
}
}
}
}或者在本地开发时:
{
"mcpServers": {
"obol": {
"command": "npx",
"args": ["tsx", "/path/to/obol/src/mcp.ts"],
"env": {
"OBOL_URL": "http://localhost:3000"
}
}
}
}可用的 MCP 工具
工具 | 描述 |
| SOL 余额、代币数量、总价值 |
| 完整持仓,含价格和明细拆分 |
| 交易历史,含分类 |
| 多因素风险评估 |
| 代币流向分析和盈亏 |
| 通过 Jupiter 获取实时价格 |
| 名称、符号、供应量、精度 |
| Jupiter 兑换报价,含路由 |
| 构建兑换交易以供签名 |
| LST、LP、借贷持仓 |
| LST 收益率对比 |
| API 健康检查(免费) |
| 端点定价和信息(免费) |
本地运行
npm run mcp技术栈
Fastify 5 — 高性能 HTTP
@x402/svm — 官方 Solana x402 SDK
Helius — RPC + DAS API
Jupiter — 代币价格 + 兑换执行
Upstash Redis — 缓存 + 支付回执
TypeScript — 完整类型安全
Zod — 运行时验证
设置
git clone https://github.com/halfkey/obol.git
cd obol
npm install
cp .env.example .env
# Edit .env with your Helius key and merchant wallet address
npm run dev测试
# Unit + integration tests (46 tests)
npm test -- --run
# Smoke test against live deployment
npx tsx scripts/smoke-test.ts https://obol-production.up.railway.app
# Manual payment test
npx tsx scripts/test-payment.ts <tx-signature>环境变量
参见 .env.example。关键变量:
PAYMENT_MODE—mock(开发环境,自动批准)或onchain(生产环境)PAYMENT_RECIPIENT_ADDRESS— 接收 USDC 的 Solana 钱包地址HELIUS_API_KEY— Helius RPC 访问UPSTASH_REDIS_REST_URL/TOKEN— 缓存层
路线图
11 个付费端点(钱包、代币、DeFi、LST、盈亏)
链上 USDC 验证,带重放防护
测试套件(46 个 vitest + 20 点冒烟测试)
智能体客户端参考实现
GitHub Actions CI
钱包监控的 WebSocket 订阅
基于拥塞的动态定价
多链支持
许可证
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with the x402 payment protocol on Solana, allowing discovery and consumption of x402-enabled services, USDC payment management, and access to Solana development resources.10MIT
- AlicenseAqualityDmaintenanceProvides permissionless wallet infrastructure for AI agents to manage wallets, sign transactions, and handle tokens across Solana and all EVM-compatible chains. It includes 29 specialized tools for on-chain operations, featuring built-in security guards and automated x402 payment processing without KYC requirements.293343MIT
- AlicenseNot gradedqualityFmaintenanceEnables AI agents to make micropayments using USDC on Solana via the x402 protocol, supporting payment requests, on-chain verification, and revenue tracking.MIT
- AlicenseBqualityCmaintenanceProvides 13 Solana DeFi intelligence tools for AI agents, paid per-call via micropayments (USDC). Enables pulling live DeFi data and automatic payment settlement.13631MIT
Related MCP Connectors
Pay-per-use weather, environment, finance, and on-chain intelligence tools for AI agents via x402.
Token swaps and honeypot/rug checks for AI agents on 8 chains, paid per-call in USDC via x402.
63 pay-per-call tools for agents: vision, text, data, web, blockchain. USDC on Base via x402.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/halfkey/obol'
If you have feedback or need assistance with the MCP directory API, please join our Discord server