Skip to main content
Glama

obol

渡し守に支払え。x402 による Solana エージェントゲートウェイ。

Obol は AI エージェント向けの従量課金制 Solana API です。API キーもサブスクリプションも不要で、エージェントは x402 支払いプロトコル を使用してリクエストごとに USDC で支払います。Solana のサブセント級のトランザクションコストにより、マイクロペイメントが初めて実現可能になりました。

死者の舌に置かれ、ステュクス川を渡るためのカロンへの支払いに使われた硬貨にちなんで名付けられました。元祖マイクロペイメントです。

仕組み

  1. エージェントが有料エンドポイントからデータを要求

  2. Obol は支払い要件(金額、受取人、ネットワーク)を含む HTTP 402 を返す

  3. エージェントは要件に一致する USDC を Solana 上で送信

  4. エージェントは X-PAYMENT ヘッダーにトランザクション証明を付けて再試行

  5. Obol はオンチェーンで検証し、データを返す

アカウント不要。トークン不要。オンボーディング不要。支払って進むだけです。

Related MCP server: deriveai

エンドポイント

ウォレット分析

エンドポイント

価格

説明

GET /api/v1/wallet/:addr/overview

$0.01

SOL 残高、トークン数、合計価値

GET /api/v1/wallet/:addr/portfolio

$0.05

価格、NFT、内訳を含む全保有資産

GET /api/v1/wallet/:addr/activity

$0.05

カテゴリ分類付きの取引履歴

GET /api/v1/wallet/:addr/risk

$0.10

多要素リスク評価

GET /api/v1/wallet/:addr/pnl

$0.15

トークンフロー分析、現在価値、P&L

トークンデータ

エンドポイント

価格

説明

GET /api/v1/token/:mint/price

$0.005

Jupiter によるリアルタイム価格

GET /api/v1/token/:mint/metadata

$0.01

名前、シンボル、供給量、小数桁

DeFi

エンドポイント

価格

説明

GET /api/v1/defi/swap/quote

$0.005

ルート計画付き Jupiter スワップ見積もり

POST /api/v1/defi/swap/execute

$0.25

Jupiter スワップトランザクションビルダー

GET /api/v1/defi/positions/:addr

$0.10

DeFi ポジション — LST、LP、レンディング

GET /api/v1/defi/lst/yields

$0.02

Solana 全体の LST 利回り比較

無料

エンドポイント

説明

GET /

API 情報と価格

GET /health

サービスステータス

POST /api/v1/rpc

プロキシされた 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.ts

MCP サーバー

Obol は MCP サーバーとして提供されます。Model Context Protocol をサポートする AI エージェントは、Obol のツールをネイティブに発見して呼び出すことができます。

npm からインストール

npm install -g obol-mcp

Claude 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 ツール

ツール

説明

obol_wallet_overview

SOL 残高、トークン数、合計価値

obol_wallet_portfolio

価格と内訳を含む全保有資産

obol_wallet_activity

カテゴリ分類付きの取引履歴

obol_wallet_risk

多要素リスク評価

obol_wallet_pnl

トークンフロー分析と P&L

obol_token_price

Jupiter によるリアルタイム価格

obol_token_metadata

名前、シンボル、供給量、小数桁

obol_swap_quote

ルーティング付き Jupiter スワップ見積もり

obol_swap_execute

署名用スワップトランザクションの構築

obol_defi_positions

LST、LP、レンディングポジション

obol_lst_yields

LST 利回り比較

obol_health

API ヘルスチェック(無料)

obol_info

エンドポイント価格と情報(無料)

ローカルで実行

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、P&L)

  • リプレイ防止付きオンチェーン USDC 検証

  • テストスイート(vitest 46 件 + 20 項目のスモークテスト)

  • エージェントクライアントのリファレンス実装

  • GitHub Actions CI

  • ウォレット監視用 WebSocket サブスクリプション

  • 動的な輻輳ベースの価格設定

  • マルチチェーン対応

ライセンス

MIT

Available Tools

13 tools
obol_defi_positionsB

Get DeFi positions for a wallet — LSTs, LP tokens, lending positions, categorized by protocol. Costs $0.10 USDC.

Inputs: address (required).

obol_healthA

Check Obol API health and status. Free.

Inputs: no named parameters.

obol_infoA

Get Obol API info — all available endpoints, pricing, and payment mode. Free.

Inputs: no named parameters.

obol_lst_yieldsA

Compare LST yields across Solana — jitoSOL, mSOL, bSOL, jupSOL, hSOL, and more. APYs from Sanctum, exchange rates from Jupiter. Costs $0.02 USDC.

Inputs: no named parameters.

obol_swap_executeA

Build a Jupiter swap transaction for signing. Returns a serialized transaction the agent must sign and submit. Costs $0.25 USDC.

Inputs: amount (required), inputMint (required), outputMint (required), userPublicKey (required), +2 more.

obol_swap_quoteB

Get a Jupiter swap quote with route planning and price impact. Costs $0.005 USDC.

Inputs: amount (required), inputMint (required), outputMint (required), slippageBps.

obol_token_metadataA

Get token metadata — name, symbol, supply, decimals. Costs $0.01 USDC.

Inputs: mint (required).

obol_token_priceB

Get real-time token price via Jupiter. Costs $0.005 USDC.

Inputs: mint (required).

obol_wallet_activityA

Get wallet transaction history with categorization (swaps, transfers, etc). Costs $0.05 USDC.

Inputs: address (required).

obol_wallet_overviewA

Get a Solana wallet overview — SOL balance, token count, total value. Costs $0.01 USDC.

Inputs: address (required).

obol_wallet_pnlC

Wallet P&L analysis — token flows, current values, transaction history analysis. Costs $0.15 USDC.

Inputs: address (required).

obol_wallet_portfolioA

Get full wallet portfolio — all token holdings with prices, NFTs, and breakdown. Costs $0.05 USDC.

Inputs: address (required).

obol_wallet_riskB

Multi-factor risk assessment for a Solana wallet — age, diversification, activity patterns. Costs $0.10 USDC.

Inputs: address (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 13 tools

    Disambiguation5/5

    Each tool targets a clearly distinct resource or granularity level: wallet overview vs. full portfolio vs. activity vs. risk vs. P&L vs. DeFi positions are separately scoped. Token price/metadata, swap quote/execute, LST yields, health, and info also have unambiguous purposes.

    Naming Consistency5/5

    All tools follow the consistent `obol_<area>_<detail>` snake_case pattern, e.g. wallet_overview, token_price, swap_quote, lst_yields. Even the simpler health and info tools fit the prefix convention without disrupting the pattern.

    Tool Count5/5

    13 tools is well within the ideal range and each tool earns its place by covering a distinct wallet analytics, token data, or swap workflow. The count feels complete without being bloated.

    Completeness5/5

    The tool surface covers the full advertised Solana workflow: wallet analytics, portfolio detail, transaction history, risk, P&L, DeFi positions, token price/metadata, swap quoting/execution, and LST yield comparison. There are no obvious dead ends or missing core operations for the stated domain.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Enables MCP-capable AI agents to access pay-per-call Solana data such as health, token prices, account balances, transactions, and trending DEX pairs, with automated x402 USDC settlement and no signup or API key required.
      5
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables MCP-capable AI agents to make pay-per-call Solana data requests (snapshots, risk checks, token reports, health, balances, transactions, trending pairs) with automatic USDC settlement over x402.
      5
      MIT