Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
halfkey avatar

Obol

  • Updated April 7, 2026
  • halfkey/obol

Obol is a MCP server that connects agents to Solana wallet, token, DeFi, and swap tools via an x402 pay-per-request gateway.

About

Obol is an MCP server that acts as a Solana agent gateway, wrapping wallet, token, DeFi, and swap capabilities behind tools your coding agent can call. It uses the x402 pattern so requests are paid per use rather than requiring you to self-host full chain infrastructure on day one—useful when you are prototyping a crypto-native feature or an agent that needs bounded on-chain actions. You install the obol-mcp npm package, set OBOL_URL to your Obol API endpoint, and register stdio MCP in Claude Code or similar clients. Version 2.0.1 is published in the official MCP server schema. Obol fits developers shipping Solana-adjacent agents or backends who want MCP-native tooling, not teams that need a regulated custodial wallet product out of the box. Always treat keys, spend limits, and mainnet vs devnet as your own operational guardrails.

  • Solana agent gateway exposed as MCP with wallet, token, DeFi, and swap-oriented tools
  • x402 pay-per-request model for metered API usage
  • npm package obol-mcp (registry version 2.0.1) with stdio transport
  • Configurable OBOL_URL for your Obol API instance
  • GitHub source at halfkey/obol for server metadata and updates

Obol by the numbers

  • Data as of Jul 7, 2026 (Skillselion catalog sync)
terminal
claude mcp add --env OBOL_URL=YOUR_OBOL_URL obol-mcp -- npx -y obol-mcp

Add your badge

Show developers this MCP server is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Packageobol-mcp
TransportSTDIO
AuthNone
Last updatedApril 7, 2026
Repositoryhalfkey/obol

What it does

Give your Solana-aware agent wallet, token, DeFi, and swap tools through Obol’s x402 pay-per-request gateway.

Who is it for?

Best when you're experimenting with Solana-native agents or DeFi automations and already run an Obol API instance.

Skip if: Products that must avoid blockchain entirely, need non-Solana chains only, or cannot accept pay-per-request API costs.

What you get

After registering Obol, your agent can call gateway-backed Solana tools through MCP with usage tied to the x402 pay-per-request model.

  • MCP-callable Solana wallet and token operations via gateway
  • DeFi and swap tool access for agent-driven workflows
  • Pay-per-request usage through the x402 gateway model

By the numbers

  • Server version 2.0.1
  • npm package identifier obol-mcp
  • stdio transport
README.md

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

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

Token Data

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

DeFi

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

Free

Endpoint Description
GET / API info and pricing
GET /health Service status
POST /api/v1/rpc Proxied 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

Tool Description
obol_wallet_overview SOL balance, token count, total value
obol_wallet_portfolio Full holdings with prices and breakdown
obol_wallet_activity Transaction history with categorization
obol_wallet_risk Multi-factor risk assessment
obol_wallet_pnl Token flow analysis and P&L
obol_token_price Real-time price via Jupiter
obol_token_metadata Name, symbol, supply, decimals
obol_swap_quote Jupiter swap quote with routing
obol_swap_execute Build swap transaction for signing
obol_defi_positions LSTs, LPs, lending positions
obol_lst_yields LST yield comparison
obol_health API health check (free)
obol_info Endpoint 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_MODEmock (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

Recommended MCP Servers

How it compares

Solana finance MCP gateway, not a general-purpose coding skill or self-custody wallet app.

FAQ

Who is Obol for?

Obol is for developers building AI agents or tools that need Solana wallet, token, DeFi, or swap operations through a hosted gateway.

When should I use Obol?

Use Obol when you are in the integration phase and want MCP tools for Solana with metered x402 billing instead of embedding full chain clients in your project.

How do I add Obol to my agent?

Install the obol-mcp npm package, set the OBOL_URL environment variable to your Obol API base URL, and add the server as a stdio MCP entry in your agent configuration.

Financepaymentsfinance

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.