Onchain loyalty MCP on Base: programs, mint, rewards, vouchers for AI agents.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
A Web3-powered loyalty platform built on Base Mainnet: merchants and AI agents create onchain loyalty programs (B20 by default), mint points, manage rewards/vouchers, and automate the loop via REST, MCP, and pay-per-call gateways (x402 / MPP).
Loyal Spark revolutionizes traditional loyalty programs by bringing them onchain. It operates as a dual-mode platform: humans interact via the web UI with flexible authentication (email, phone, social login, or wallet), while AI agents interact via REST API or MCP Server β sharing the same database, smart contracts, and tokens.
Wallet Abstraction: Users and merchants sign in via Privy β email, phone/SMS, Google, or external wallets (MetaMask, WalletConnect, Coinbase Wallet). Privy automatically creates an embedded wallet on Base β no crypto experience needed. Farcaster miniapp and SIWE for crypto-native users are also fully supported. Merchants can send tokens to customers by email or phone number (resolved to wallet address automatically).
accept_merchant_invite β see docs/development/PORTALS_AND_TEAM.mdmarketplace/ (DEX) and roundup/ (DeFi) remain in the tree but are explicitly frozen β no active development00β15 under /.well-known/skills/) for agent onboarding, B20 semantics, and payment rails| Layer | Technology |
|---|---|
| Frontend | React 18, TypeScript, Vite, Tailwind CSS, shadcn/ui (Radix) |
| Animations | Framer Motion |
| Blockchain | Wagmi v2, Viem, RainbowKit, Privy (@privy-io/react-auth + @privy-io/wagmi) |
| Network | Base Mainnet (Chain ID: 8453) |
| Smart Contracts | Base-native B20 Asset precompile + legacy ERC-20 factory |
| Backend | Supabase (PostgreSQL, RLS, Deno Edge Functions, Realtime) |
| Native apps | Capacitor 8 (iOS / Android) β see docs/development/NATIVE_BUILD_GUIDE.md |
| Agent Wallets | Coinbase CDP MPC (Server Wallets) |
| State | TanStack Query v5 |
| Routing | React Router DOM v6 |
| Forms | React Hook Form + Zod validation |
| Builder Attribution | Base Builder Code (ERC-8021) |
New loyalty programs (default) deploy via Baseβs native B20 factory precompile β one transaction, active immediately after register-program. Legacy programs use the Loyal Spark ERC-20 factory below (token_standard: "erc20" in API only). Full flows: docs/development/LOYALTY_PROGRAM_CONTRACTS.md.
| Role | Address | When |
|---|---|---|
| B20 Factory (Base precompile) | 0xB20f000000000000000000000000000000000000 | Default β createB20 β token 0xB200β¦ |
| LoyaltyTokenFactory (legacy) | 0x5F3DdBa12580CFdc6016258774cCc19C4250dA80 | Opt-in erc20 β createLoyaltyToken + activation |
| LoyalSparkERC20 (implementation) | 0xe6BA426C9c51281B929a17444De02c65815E27C3 | Logic for legacy proxy tokens |
| LoyaltyTokenEscrow (P2P) | 0xA569C95AfC1BCF381c48BcF336ED9D2c014bcdDF | Marketplace swaps |
Network: Base Mainnet (Chain ID: 8453)
| Path | Deploy | Activate | Portal |
|---|---|---|---|
| B20 (default) | 1à createB20 on 0xB20f⦠| Not required | Yes |
| Legacy ERC-20 | 1à createLoyaltyToken on 0x5F3DdB⦠| unpauseUtility + enableMinting | API only |
B20 tokens are ERC-20βcompatible for balances, transfers, mint, and escrow:
mint(address to, uint256 amount) β issue points (role-gated)transfer / transferFrom β move tokens between walletsbalanceOf(address) β query balanceMerchant dashboard:
lsk_...)x-api-key header for REST or MCP callsWithout the web app (autonomous agents): free lsk_ via wallet signature β Edge Function agent-register-siwe + nonce from siwe-nonce. See docs/agents/AUTONOMOUS_AGENT_REGISTRATION.md and docs/agents/QUICKSTART.md.
These directories are not imported by the web app; they are optional helpers for developers and agents reproducing flows locally. Secrets stay in environment variables only.
| Folder | Purpose |
|---|---|
scripts/x402-paid-mcp-test/ | Smoke test: paid MCP via x402 (USDC on Base, @x402/fetch). |
scripts/x402-paid-agent-api/ | Same stack, paid agent-api routes (GET/POST to x402-gateway/<resource>). |
scripts/traffic-bot-x402-bridge.py | Example Python β Node subprocess hook for bots that already send loyalty txs on Base. |
scripts/agent-register-siwe/ | Helper: build SIWE message + sign + call agent-register-siwe (same as production). |
Schemas for paid MCP: merchant mcp-tools/<name> β mcp-bazaar-tools.ts; recipient recipient-mcp-tools/<name> β recipient-mcp-bazaar-tools.ts. HTTP 402 accepts + Coinbase x402 Bazaar discovery metadata for all paid routes are built in x402-bazaar-accept.ts. These scripts are not linked from the marketing homepage; primary onboarding remains /for-agents and the merchant portal.
All routes below require x-api-key: lsk_... except GET /vouchers/status (public). Canonical catalogue: public/.well-known/agent.json (must match supabase/functions/agent-api/index.ts).
Factual signals from GitHub, npm, and our automated checks β not a rating.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/loyal-spark)<a href="https://allmcps.com/mcp/loyal-spark"><img src="https://allmcps.com/api/badge/loyal-spark?style=directory" alt="Loyal Spark on AllMCPs" /></a>