obol
Provides pay-per-use Solana APIs for AI agents, including wallet analytics, token prices, DeFi positions, swap quotes and execution, and LST yields, with payments in USDC via the x402 protocol.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@obol What's the current price of SOL?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
Agent requests data from a paid endpoint
Obol returns HTTP 402 with a payment requirement (amount, recipient, network)
Agent sends USDC on Solana matching the requirement
Agent retries with transaction proof in the
X-PAYMENTheaderObol verifies on-chain and returns the data
No accounts. No tokens. No onboarding. Just pay and go.
Related MCP server: boo-x402-mcp
Endpoints
Wallet Analytics
Endpoint | Price | Description |
| $0.01 | SOL balance, token count, total value |
| $0.05 | Full holdings with prices, NFTs, breakdown |
| $0.05 | Transaction history with categorization |
| $0.10 | Multi-factor risk assessment |
| $0.15 | Token flow analysis, current values, P&L |
Token Data
Endpoint | Price | Description |
| $0.005 | Real-time price via Jupiter |
| $0.01 | Name, symbol, supply, decimals |
DeFi
Endpoint | Price | Description |
| $0.005 | Jupiter swap quote with route planning |
| $0.25 | Jupiter swap transaction builder |
| $0.10 | DeFi positions — LSTs, LPs, lending |
| $0.02 | LST yield comparison across Solana |
Free
Endpoint | Description |
| API info and pricing |
| Service status |
| 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.tsMCP 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-mcpClaude 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 |
| SOL balance, token count, total value |
| Full holdings with prices and breakdown |
| Transaction history with categorization |
| Multi-factor risk assessment |
| Token flow analysis and P&L |
| Real-time price via Jupiter |
| Name, symbol, supply, decimals |
| Jupiter swap quote with routing |
| Build swap transaction for signing |
| LSTs, LPs, lending positions |
| LST yield comparison |
| API health check (free) |
| Endpoint pricing and info (free) |
Run locally
npm run mcpStack
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 devTesting
# 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) oronchain(production)PAYMENT_RECIPIENT_ADDRESS— your Solana wallet that receives USDCHELIUS_API_KEY— Helius RPC accessUPSTASH_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
Available Tools
13 toolsobol_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
Scored across 13 tools
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.
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.
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.
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
Related MCP Connectors
Pay-per-call Solana data for AI agents over x402: token, account, tx, trending. No signup, no key.
x402 pay-per-call Solana data + crypto market + JWT/unit utils for AI agents.
x402 paid API tools for AI agents on Solana: crypto safety, market data, KYB/AML verification.
Pay-per-call tools for AI agents: Solana, DEX, perps, prediction markets, DeFi, web. USDC via x402.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to make micropayments using USDC on Solana via the x402 protocol, supporting payment requests, on-chain verification, and revenue tracking.MIT
- AlicenseAqualityDmaintenanceEnables AI agents to access crypto/web3 data across 5 chains with pay-per-call billing in USDC via x402, no API key required, and built-in spend caps.3667 npmMIT
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to access 25 pay-per-request intelligence APIs using USDC micropayments via the x402 protocol, without API keys or accounts.-
- AlicenseAqualityCmaintenanceEnables 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.5MIT