offchain-gift-mcp
v1.0.1
Published
MCP server to browse and buy gift cards, eSIMs, mobile top-ups and real-world products, paying in SOL from your OffChain wallet.
Maintainers
Readme
OffChain Gift — MCP server
Browse and buy gift cards, eSIMs and mobile top-ups (Bitrefill-backed) and pay in SOL (or ETH/BTC) straight from your OffChain wallet — from any MCP client (Claude Desktop, Claude Code, etc.).
It's a thin wrapper over the OffChain backend's /web/gift/* API.
Tools
Gift cards / eSIMs / top-ups (Bitrefill)
| Tool | What it does | Needs |
|---|---|---|
| browse_gift_cards | List products for a country (+ category breakdown) | — |
| search_products | Search brands by name (Amazon, Steam, Japan eSIM…) | — |
| get_product | Denominations, recipient requirements, image | — |
| quote_order | Exact SOL cost, no funds move | phone+pin |
| order_gift | Buy & pay in SOL from your wallet | phone+pin |
| order_status | Delivered code/PIN/QR + fulfilment status | phone+pin |
| order_history | Your recent gift orders | phone+pin |
Shop — real-world products (Sp3nd, Solana-settled)
| Tool | What it does | Needs |
|---|---|---|
| search_shop | Search real products by keyword → titles, prices, URLs | phone |
| preview_cart | Cart total for a product URL, no funds move | — |
| order_product | Buy a product by URL, paid from your wallet | phone+pin |
| get_shipping / set_shipping | Manage your delivery address + email | phone |
| shop_orders / shop_order_status | Your shop orders + tracking | phone |
config_status (no creds) shows your setup. The shopping URL comes from
search_shop or one you paste — both preview_cart and order_product take it.
Browsing/searching is public; anything that moves funds needs your wallet identity + PIN.
Setup
npm install
npm run buildConfigure your MCP client
Add to your client's MCP config (e.g. Claude Desktop claude_desktop_config.json).
The easiest way — run the published package with npx, no install:
{
"mcpServers": {
"offchain-gift": {
"command": "npx",
"args": ["-y", "offchain-gift-mcp"],
"env": {
"OFFCHAIN_PHONE": "+15551234567",
"OFFCHAIN_PIN": "1234",
"OFFCHAIN_PAY": "sol"
}
}
}
}Or point at a local build instead of npx:
"command": "node",
"args": ["/absolute/path/to/offchain-gift-mcp/dist/index.js"]| Env | Default | Notes |
|---|---|---|
| OFFCHAIN_BACKEND_URL | https://api.offchain-transfer.fun | |
| OFFCHAIN_PHONE | — | E.164, required to order |
| OFFCHAIN_PIN | — | wallet PIN, required to order — keep private |
| OFFCHAIN_PAY | sol | sol | eth | btc |
Typical flow
browse_gift_cards { country: "IN" }orsearch_products { query: "Amazon" }get_product { product_id }→ pick a denominationquote_order { product_id, package_value: 25 }→ see the exact SOL cost + agiftIdorder_gift { product_id, package_value: 25, gift_id }→ pays in SOLorder_status { gift_id }→ the delivered code
Security
- Your PIN is passed to the backend to authorize the on-chain payment (same as
the app). It's stored only in your MCP client's env — never printed by any
tool (
config_statusmasks the phone and hides the PIN). order_giftmoves real funds. Quote first and confirm the amount.
