Obol

io.github.halfkey由 GitHub 帳號 halfkey 發布v2.0.1更新於 Oct 25, 2026

Solana agent gateway via x402. Wallet, token, DeFi, and swap tools. Pay per request.

已驗證STDIO僅桌面資料庫金融

概覽

AI 產生的概覽

一個本機 MCP 伺服器,為助理提供按請求付費的 Solana 資料工具:錢包分析、代幣價格、DeFi 持倉與兌換報價,透過 x402 以 USDC 支付。

可以做什麼
查詢 Solana 錢包:概覽、持倉組合、交易活動、風險評估與損益分析,每次請求以 USDC 計費。
適用情境
當助理需要 Solana 錢包分析、代幣價格、DeFi 持倉資料或兌換報價,且使用者願意按請求支付少量 USDC 費用、不想管理 API 金鑰或訂閱時適用。
執行需求
透過 npm 套件 obol-mcp 以 npx 在本機執行(需要 Node.js)。需要設定 OBOL_URL 環境變數指向 Obol API 實例。付費端點需要持有 USDC 的 Solana 錢包並走 x402 支付流程;無需帳號或 API 金鑰。
安裝前請注意
每次呼叫付費工具都會從使用者的 Solana 錢包實際支出 USDC,單次價格從 0.005 到 0.25 美元不等。兌換執行工具會建構待簽章交易。README 範例從環境變數載入錢包私鑰,應避免讓此類金鑰出現在日誌和設定中。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Obol,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

obol

Pay the ferryman. Solana agent gateway via x402.

Obol is a pay-per-use Solana API for AI agents. No API keys, no subscriptions — agents pay per request in USDC using the x402 payment protocol. Solana's sub-cent transaction costs make micropayments viable for the first time.

Named after the coin placed on the tongue of the dead to pay Charon for passage across the River Styx. The original micropayment.

How it works

  1. Agent requests data from a paid endpoint
  2. Obol returns HTTP 402 with a payment requirement (amount, recipient, network)
  3. Agent sends USDC on Solana matching the requirement
  4. Agent retries with transaction proof in the X-PAYMENT header
  5. Obol verifies on-chain and returns the data

No accounts. No tokens. No onboarding. Just pay and go.

Endpoints

Wallet Analytics

EndpointPriceDescription
GET /api/v1/wallet/:addr/overview$0.01SOL balance, token count, total value
GET /api/v1/wallet/:addr/portfolio$0.05Full holdings with prices, NFTs, breakdown
GET /api/v1/wallet/:addr/activity$0.05Transaction history with categorization
GET /api/v1/wallet/:addr/risk$0.10Multi-factor risk assessment
GET /api/v1/wallet/:addr/pnl$0.15Token flow analysis, current values, P&L

Token Data

EndpointPriceDescription
GET /api/v1/token/:mint/price$0.005Real-time price via Jupiter
GET /api/v1/token/:mint/metadata$0.01Name, symbol, supply, decimals

DeFi

EndpointPriceDescription
GET /api/v1/defi/swap/quote$0.005Jupiter swap quote with route planning
POST /api/v1/defi/swap/execute$0.25Jupiter swap transaction builder
GET /api/v1/defi/positions/:addr$0.10DeFi positions — LSTs, LPs, lending
GET /api/v1/defi/lst/yields$0.02LST yield comparison across Solana

Free

EndpointDescription
GET /API info and pricing
GET /healthService status
POST /api/v1/rpcProxied Helius RPC (allowlisted methods)

Agent Example

See examples/agent-client.ts for a full reference implementation. The key flow:

typescript
import { ObolAgent } from './examples/agent-client';
const agent = new ObolAgent();await agent.discover();  // fetch pricingagent.loadWallet(process.env.AGENT_PRIVATE_KEY);
// Auto-discovers price, pays, and returns dataconst price = await agent.fetch('/api/v1/token/USDC_MINT/price');

Run in discovery-only mode (no wallet needed):

bash
npx tsx examples/agent-client.ts

MCP Server

Obol ships as an MCP server — any AI agent that supports the Model Context Protocol can discover and call Obol's tools natively.

Install from npm

bash
npm install -g obol-mcp

Claude Desktop / Claude Code

Add to your MCP config:

json
{  "mcpServers": {    "obol": {      "command": "npx",      "args": ["-y", "obol-mcp"],      "env": {        "OBOL_URL": "https://obol-production.up.railway.app"      }    }  }}

Or if developing locally:

json
{  "mcpServers": {    "obol": {      "command": "npx",      "args": ["tsx", "/path/to/obol/src/mcp.ts"],      "env": {        "OBOL_URL": "http://localhost:3000"      }    }  }}

Available MCP Tools

ToolDescription
obol_wallet_overviewSOL balance, token count, total value
obol_wallet_portfolioFull holdings with prices and breakdown
obol_wallet_activityTransaction history with categorization
obol_wallet_riskMulti-factor risk assessment
obol_wallet_pnlToken flow analysis and P&L
obol_token_priceReal-time price via Jupiter
obol_token_metadataName, symbol, supply, decimals
obol_swap_quoteJupiter swap quote with routing
obol_swap_executeBuild swap transaction for signing
obol_defi_positionsLSTs, LPs, lending positions
obol_lst_yieldsLST yield comparison
obol_healthAPI health check (free)
obol_infoEndpoint pricing and info (free)

Run locally

bash
npm run mcp

Stack

  • Fastify 5 — high-performance HTTP
  • @x402/svm — official x402 SDK for Solana
  • Helius — RPC + DAS API
  • Jupiter — token prices + swap execution
  • Upstash Redis — cache + payment receipts
  • TypeScript — full type safety
  • Zod — runtime validation

Setup

bash
git clone https://github.com/halfkey/obol.gitcd obolnpm installcp .env.example .env# Edit .env with your Helius key and merchant wallet addressnpm run dev

Testing

bash
# Unit + integration tests (46 tests)npm test -- --run
# Smoke test against live deploymentnpx tsx scripts/smoke-test.ts https://obol-production.up.railway.app
# Manual payment testnpx tsx scripts/test-payment.ts <tx-signature>

Environment

See .env.example. Key variables:

  • PAYMENT_MODE — mock (dev, auto-approve) or onchain (production)
  • PAYMENT_RECIPIENT_ADDRESS — your Solana wallet that receives USDC
  • HELIUS_API_KEY — Helius RPC access
  • UPSTASH_REDIS_REST_URL / TOKEN — cache layer

Roadmap

  • 11 paid endpoints (wallet, token, DeFi, LST, P&L)
  • On-chain USDC verification with replay prevention
  • Test suite (46 vitest + 20-point smoke test)
  • Agent client reference implementation
  • GitHub Actions CI
  • WebSocket subscriptions for wallet monitoring
  • Dynamic congestion-based pricing
  • Multi-chain support

License

MIT

來源:README.md,提交 86297f1

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v2.0.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分