io.github.halfkey/obol

Official registry Finance and payments

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

Install

Add this to your client's MCP configuration (Claude Desktop: claude_desktop_config.json; Cursor: .cursor/mcp.json; VS Code and others use the same "mcpServers" shape).

NPM package obol-mcp
Claude Code
claude mcp add obol -e 'OBOL_URL=<OBOL_URL>' -- npx -y obol-mcp@2.0.1
JSON configuration (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "obol": {
            "command": "npx",
            "args": [
                "-y",
                "obol-mcp@2.0.1"
            ],
            "env": {
                "OBOL_URL": "<OBOL_URL>"
            }
        }
    }
}

Environment variables

  • OBOL_URL URL of the Obol API instance

Documentation

From the project's README on GitHub, refreshed weekly. Links open on GitHub.

Contents
  1. obol
  2. How it works
  3. Endpoints
  4. Agent Example
  5. MCP Server
  6. Stack
  7. Setup
  8. Testing
  9. Environment
  10. Roadmap
  11. License

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:

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');

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

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
npm install -g obol-mcp
Claude Desktop / Claude Code

Add to your MCP config:

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

Or if developing locally:

{
  "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
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

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

Testing

# 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>

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

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

License

MIT

Frequently asked questions

What is io.github.halfkey/obol?

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

How do I install io.github.halfkey/obol?

It runs on your machine. In Claude Code: claude mcp add obol -e 'OBOL_URL=<OBOL_URL>' -- npx -y obol-mcp@2.0.1. For other clients, paste the JSON configuration from this page into their MCP settings.

Does io.github.halfkey/obol need an API key?

Its registry entry lists no required key or secret. Some features may still need an account with the service it connects to.

Is io.github.halfkey/obol open source?

Yes. Its code is on GitHub under the MIT license.

Who maintains io.github.halfkey/obol?

It is published by halfkey. AI.tn lists it but does not maintain or endorse it.

From the official MCP Registry. Listing is not an endorsement: review a server's code and permissions before giving it access to your data.