Loyal Spark Loyalty Protocol
Summary: This Loyal Spark MCP server gives an AI agent end-to-end control of onchain loyalty programs on Base — deploy/register/activate programs, mint and transfer tokens, manage rewards and vouchers, and read analytics.
Protocol & identity —
get_platform_info(protocol overview) andget_my_profile(authenticated agent's profile/permissions).Program lifecycle —
list_loyalty_programs(optionally include expired),create_loyalty_program(returns factory calldata to deploy an ERC-20 loyalty token, 2–5 char symbol, duration),register_loyalty_program(record a deployed token address),activate_loyalty_program(unpauseUtility + enableMinting calldata),update_program_status(active/paused/inactive).Rewards —
list_rewardsby token address,create_reward(name, cost in tokens, description),redeem_reward(requires a verified onchain transfer tx hash; issues a voucher to the customer).Vouchers —
use_voucher(mark redeemed, merchant-only, by ID or code),check_voucher_status(public, no API key needed).Token operations —
mint_loyalty_tokens(mint intent + contract call params),transfer_loyalty_tokens(transfer calldata between wallets),get_token_balance(balance plus tier info for a customer).Analytics —
get_program_analyticsacross your loyalty programs.Marketplace —
list_marketplace_offers(active/completed/cancelled P2P token trading offers, limit 1–100).Scope note — this schema exposes 16 of the 39 documented MCP tools: no B20-native creation, x402/Bazaar side-car, CDP wallet, gift certificate, P2P offer write actions, or multi-step workflow tools; descriptions assume legacy ERC-20 only.
Enables AI agents to manage Coinbase CDP MPC wallets for autonomous onchain operations, including secure transaction signing and wallet creation on the Base network.
Supports integration with the Farcaster decentralized social network via a protocol manifest, enabling discovery and interaction within Farcaster-compatible clients.
Utilizes Supabase for database management, authentication, and edge functions to power loyalty program operations, analytics, and agent API tools.
This server has a remotely hosted endpoint. Open its connector listing for connection details, authentication requirements, and setup instructions:
Loyal Spark — Onchain Loyalty Protocol
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).
Overview
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 Coinbase Embedded Wallets — Google, email code, or external wallets (MetaMask, Coinbase Wallet, Base App). Coinbase automatically creates a gas-sponsored smart account 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 QR code (resolved to wallet address automatically).
┌─────────────────────────────────────────────────┐
│ Loyal Spark Platform │
│ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ Web UI │ │ REST API │ │MCP Server│ │
│ │ (humans) │ │ (agents) │ │ (agents) │ │
│ └─────┬─────┘ └─────┬────┘ └─────┬────┘ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌──────────────────────────────────────────┐ │
│ │ Backend (Edge Functions) │ │
│ │ Auth · RLS · DB · Realtime │ │
│ └─────────────────┬────────────────────────┘ │
│ │ │
│ ┌───────────┴───────────┐ │
│ ▼ ▼ │
│ ┌──────────┐ ┌──────────────┐ │
│ │ Base L2 │ │ CDP Server │ │
│ │ Contracts│ │ Wallet (MPC) │ │
│ └──────────┘ └──────────────┘ │
└─────────────────────────────────────────────────┘Related MCP server: Free USDC Transfer MCP Server
Features
For Merchants (Web UI)
Deploy Loyalty Tokens: Create custom loyalty tokens on Base (B20 default; legacy ERC-20 via API)
Mint Tokens: Issue loyalty points to customers via wallet addresses or QR scan
Create Rewards: Design voucher rewards with token costs
CRM & Analytics: Customer profiles, RFM segmentation, tier management
Marketing Automation: Automated campaigns, personalized offers
Referral Programs: Generate referral codes with bonuses
Voucher Management: Track redemptions with QR code verification
AI Agent Management: Register agents, manage API keys, monitor activity
Team & branches: Invite cashiers/managers by wallet or one-time invite code (redeem on Merchant → Team); requires Postgres RPC
accept_merchant_invite— see docs/development/PORTALS_AND_TEAM.md
For Customers (Web UI)
Multi-Token Dashboard: View all loyalty tokens from different merchants
Browse Rewards: Explore available vouchers across all programs
Redeem Vouchers: Burn tokens to claim exclusive rewards with QR codes
Tier System: Bronze → Silver → Gold → Platinum with increasing perks
Frozen module (not a product promise):
marketplace/(DEX) remains in the tree but is explicitly frozen — no active development
For AI Agents (REST API + MCP)
Full CRUD via API: Create programs, mint tokens, manage rewards, view analytics
MCP Server: Connect Claude, GPT, Cursor, or any MCP-compatible LLM directly
Server Wallets: Coinbase CDP MPC wallets for autonomous onchain operations
Scoped Permissions: Granular access control (read, mint, manage_rewards, trade)
Activity Logging: Full audit trail of all agent operations
Tiered Pricing (agents): Free (200 calls/mo, 1 agent, 1,000 tokens minted/mo, 1.25% mint fee) → Pro ($49/mo, 0.5%) → Enterprise ($129/mo, 0.25%) — subscriptions in USDC, mint fee in loyalty tokens (off-chain obligation, not enforced by the token contract); see docs/business/MONETIZATION_AND_PRICING.md
Skills Documentation: 16 structured step-by-step guides (
00–15under/.well-known/skills/) for agent onboarding, B20 semantics, and payment rails
Technology Stack
Layer | Technology |
Frontend | React 18, TypeScript, Vite, Tailwind CSS, shadcn/ui (Radix) |
Animations | Framer Motion |
Blockchain | Wagmi v2, Viem, RainbowKit, Coinbase CDP ( |
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 |
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) |
Smart Contract Architecture
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) |
| Default — |
LoyaltyTokenFactory (legacy) |
| Opt-in |
LoyalSparkERC20 (implementation) |
| Logic for legacy proxy tokens |
LoyaltyTokenEscrow (P2P) |
| Marketplace swaps |
Network: Base Mainnet (Chain ID: 8453)
Program creation (summary)
Path | Deploy | Activate | Portal |
B20 (default) | 1× | Not required | Yes |
Legacy ERC-20 | 1× |
| API only |
Token operations (both standards)
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 balance
AI Agent Integration
Quick Start
Merchant dashboard:
Go to loyalspark.online/merchant and sign in (Google, email via Coinbase, or a wallet)
Open AI Agents tab → Register an agent → Copy your API key (
lsk_...)Use the key in
x-api-keyheader for REST or MCP calls
Without 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.
Optional repo scripts (development / agent onboarding)
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 |
Smoke test: paid MCP via x402 (USDC on Base, | |
Same stack, paid agent-api routes ( | |
Helper: build SIWE message + sign + call |
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.
REST API
# List loyalty programs
curl -H "x-api-key: lsk_YOUR_KEY" \
https://api.loyalspark.online/agent-api/programs
# Mint tokens — returns a fee-first calls[] bundle (1.25% fee on Free plan,
# minted in your own loyalty tokens); settle it via POST /agent-api/mint/confirm
curl -X POST \
-H "x-api-key: lsk_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"token_address":"0x...","recipient_address":"0x...","amount":100}' \
https://api.loyalspark.online/agent-api/mintAPI Endpoints (28 authenticated + 1 public)
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).
Method | Path | Scope | Description |
GET |
| authenticated | Agent profile & permissions |
GET |
| read | Autonomous planner: lifecycle step + |
GET |
| read | List loyalty programs |
POST |
| read, mint, or | Propose program name, symbol, economics, and starter rewards from business context |
POST |
| mint or | Calldata to deploy loyalty token (B20 default, or legacy ERC-20 with |
POST |
| mint or | Register deployed token (optional |
POST |
| mint or | Update |
POST |
| mint or | Legacy ERC-20 activation only (no-op for B20) |
POST |
| mint or | Update program status |
GET |
| read | List rewards |
POST |
| manage_rewards | Create reward |
POST |
| mint | Fee-first mint |
POST |
| mint | Settle protocol fee after mint/earn (obligation_id + fee_tx_hash) |
POST |
| mint | Cashback: mint from purchase amount × rate (same fee-first + confirm) |
POST |
| mint | Transfer tokens |
GET |
| read | Token balance & tier |
GET |
| read | Customer list |
GET |
| read | List vouchers |
GET |
| public | Check voucher status (no API key) |
POST |
| read | Redeem reward → create voucher |
POST |
| manage_rewards | Mark voucher as used |
GET |
| read | Program analytics |
GET |
| read | Marketplace offers |
POST |
| trade | Create P2P offer |
POST |
| trade | Accept P2P offer |
POST |
| trade | Cancel P2P offer |
GET |
| authenticated | Extract token_address from deploy tx |
GET |
| read | Read merchant profile |
POST |
| manage_rewards | Create or update merchant profile ( |
MCP Server (for LLMs)
Connect Claude, GPT, or any MCP-compatible agent:
{
"mcpServers": {
"loyal-spark": {
"url": "https://api.loyalspark.online/loyalty-mcp",
"headers": {
"x-api-key": "lsk_YOUR_KEY"
}
}
}
}MCP tools (39) — defined in supabase/functions/loyalty-mcp/index.ts:get_platform_info, get_my_profile, generate_program_defaults, get_program_workflow_status, list_loyalty_programs, create_loyalty_program, register_loyalty_program, activate_loyalty_program, update_program_status, update_program_config, list_rewards, create_reward, mint_loyalty_tokens, transfer_loyalty_tokens, earn_points, confirm_mint_fee, get_token_balance, get_program_analytics, list_marketplace_offers, redeem_reward, use_voucher, check_voucher_status, get_platform_stats, cancel_stale_offers, create_personalized_offer, update_reward_status, export_customers, send_report, list_my_reports, update_report_status, delete_report, create_gift_certificate, list_gift_certificates, revoke_gift_certificate, mark_gift_certificate_minted, bazaar_discover_resources, bazaar_discover_mcp_servers, bazaar_probe_x402, bazaar_pay_and_call (confirm_mint_fee = lsk_-only fee settlement, not x402-priced; last four = Bazaar side-car).
Base MCP custom plugin (send_calls-ready calldata)
For AI users already connected to Base MCP (mcp.base.org), Loyal Spark ships GET-friendly calldata endpoints at https://api.loyalspark.online/agent-prepare/*. Each response returns a send_calls-compatible transaction batch with Builder Code bc_wdmnog7m already appended (ERC-8021). Base Account signs and broadcasts.
Actions: create-program, activate-program, mint, transfer (merchant, lsk_) · recipient-transfer, recipient-approve (holder, rwk_).
# Prepare a mint (returns { transactions: [{to,data,value}], … } for send_calls)
curl -H "x-api-key: lsk_YOUR_KEY" \
"https://api.loyalspark.online/agent-prepare/mint?token=0xTOKEN&to=0xCUSTOMER&amount=100"Plugin spec: skills/loyal-spark/plugins/loyal-spark.md.
Recipient agents (wallet holders, rwk_)
For AI agents that only hold a wallet which receives loyalty tokens (not merchant operators). Humans are unchanged; this is an optional machine path.
Piece | URL / path |
REST |
|
MCP |
|
Register key |
|
REST (14 routes; all require x-api-key: rwk_… except register): GET /me, GET /balances, GET /balance?token_address=, GET /rewards?token_address=, GET /vouchers, GET /workflow/reward-status, POST /register (SIWE), POST /redeem-reward with { reward_id, transaction_hash } (customer is always the bound wallet), POST /prepare-transfer with { token_address, to, amount }, POST /workflow/prepare-reward-redemption. P2P: GET /offers?token_address=, POST /offers, POST /accept-offer, POST /cancel-offer (same bodies as merchant agent-api marketplace; creator_address is the bound wallet).
MCP tools (20) — supabase/functions/recipient-loyalty-mcp/index.ts: get_recipient_profile, list_my_loyalty_balances, get_my_loyalty_balance, get_reward_workflow_status, prepare_reward_redemption, prepare_loyalty_token_transfer, list_rewards_for_program, list_my_vouchers, redeem_my_reward, list_p2p_offers, create_p2p_offer, accept_p2p_offer, cancel_p2p_offer, lookup_gift_certificate, claim_gift_certificate, list_my_gift_certificates, bazaar_discover_resources, bazaar_discover_mcp_servers, bazaar_probe_x402, bazaar_pay_and_call (last four = Bazaar side-car; bazaar_pay_and_call requires opt-in delegated CDP wallet).
Pay-per-call (recipient, MPP / x402): Autonomous agents that should pay USDC per request use the same gateways as merchants: mpp-gateway/recipient-api/… (Tempo MPP) or x402-gateway/recipient-api/… and x402-gateway/recipient-mcp-tools/<tool> (x402). USD prices match the merchant corridor (reads ~$0.001, writes ~$0.005–0.01; prepare-transfer / prepare_loyalty_token_transfer $0.005). Canonical tables: docs/business/MONETIZATION_AND_PRICING.md §4.1 · source constants: supabase/functions/_shared/recipient-paid-routes.ts, recipient-mcp-bazaar-tools.ts. Direct functions/v1/recipient-api / recipient-loyalty-mcp calls use rwk_ + rate limits only (no per-request USDC in the gateway layer).
Example MCP fragment: examples/recipient-agent-mcp/cursor-mcp.json.
Agent Discovery
AI agents can discover the protocol automatically via:
/.well-known/agent.json— Full protocol specification, capabilities, pricing/.well-known/skills/— 16 structured Skills (00–15, step-by-step guides)/api-docs— Interactive API documentation
Skills for AI Agents
Structured Markdown guides that teach agents how to use the protocol:
# | Skill | Description |
00 | Getting Started | Register agent (merchant UI or SIWE), get |
01 | Create Loyalty Program | Deploy B20 loyalty token on Base (legacy ERC-20 optional) |
02 | Mint Tokens | Mint tokens to customer wallets |
03 | Transfer Tokens | Transfer tokens between wallets |
04 | Manage Rewards | Create redeemable rewards catalog |
05 | Balance & Tiers | Check balances and tier status |
06 | Marketplace Trading | P2P token trading with atomic escrow |
07 | Analytics & CRM | Program analytics and CRM data |
08 | Referrals | Referral programs for organic growth |
09 | Vouchers | Voucher lifecycle management |
10 | Server Wallets | CDP MPC wallets for autonomous transactions |
11 | Earn Points (Cashback) | Mint from purchase amount × cashback rate |
12 | Gift Certificates | Issue, claim, and mint |
13 | Endpoint Workflows | Multi-step REST/MCP flows and prerequisites |
14 | B20 Native Spec | Base Beryl B20 Asset semantics for loyalty tokens |
15 | Payment Scenarios | x402 exact, MPP, subscriptions, spend policies |
Installable skill bundle (CLI): npx skills add aspekt19/unboxed-loyalty-spark --skill loyal-spark — source in skills/loyal-spark/.
Skills index: https://loyalspark.online/.well-known/skills/index.md
Server Wallets (CDP MPC)
Agents can create their own Coinbase MPC wallets on Base for autonomous transactions:
curl -X POST \
-H "x-api-key: lsk_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"action":"create_wallet"}' \
https://api.loyalspark.online/agent-walletBenefits:
No private key management — keys are in Coinbase's secure enclave
Server-side transaction signing
Automatic Builder Code attribution (ERC-8021)
Pricing
Plan | Monthly | API Calls | Agents | Mint fee | Mint cap |
Free | $0 | 200 | 1 | 1.25% | 1,000 tokens/mo |
Pro | $49 USDC | 10,000 | 5 | 0.5% | Unlimited |
Enterprise | $129 USDC | Unlimited | Unlimited | 0.25% | Unlimited |
Merchant SaaS (portal): Starter $39 / Growth $79 / Scale $149 per month (annual discount 15–20% optional) — details in docs/business/MONETIZATION_AND_PRICING.md.
Payments for agent plans on-chain in USDC on Base ($1 = 1 USDC). Plan limits (API calls, agent seats, Free-tier mint cap) are enforced server-side in Edge Functions — see MONETIZATION_AND_PRICING.md.
Mint fee is not USDC. It is charged in the merchant's own loyalty tokens — a second mint(address,uint256) to the platform fee wallet on the same token contract, returned first in the calls[] bundle. The token contract has no mintWithFee, so settlement is tracked off-chain: each prepared mint creates a fee obligation, and 5+ obligations unpaid for over 60 minutes block further mints with HTTP 402. Confirm with POST /agent-api/mint/confirm.
Getting Started
Prerequisites
Node.js 18+ or Bun
An email, phone number, Google account, or Web3 wallet (MetaMask, Coinbase Wallet, WalletConnect)
Some ETH on Base for gas fees (merchants only)
Installation
git clone https://github.com/aspekt19/unboxed-loyalty-spark.git
cd unboxed-loyalty-spark
npm install
npm run devSign In Options
Google / Email (recommended): Click "Sign In" — a Coinbase smart wallet is created automatically, no crypto knowledge needed
MetaMask / Coinbase Wallet / WalletConnect: Traditional Web3 wallet connection
Farcaster: Auto-connects inside Warpcast miniapp
On Merchant and Customer portals, use the header Sign In / wallet control until a session exists; the Profile control appears only after you are signed in. See docs/development/PORTALS_AND_TEAM.md.
Network: Base Mainnet (Chain ID: 8453) | RPC: https://mainnet.base.org | Explorer: https://basescan.org
Project Structure
unboxed-loyalty-spark/
├── AGENTS.md # Entry map for AI / coding agents
├── docs/ # Human docs (guides, integrations, pitch notes)
│ ├── development/ # Build & deploy
│ ├── integrations/ # Farcaster, OpenServ, A2A, prompts
│ ├── pitch-deck/ # Investor deck (Markdown sources)
│ └── supabase/ # DB/edge runbooks
├── src/
│ ├── components/
│ │ ├── ui/ # shadcn/ui library
│ │ ├── agents/ # AI agent management
│ │ ├── rewards/ # Rewards & vouchers
│ │ ├── crm/ # CRM & analytics
│ │ ├── marketing/ # Campaigns
│ │ ├── automation/ # Marketing automation
│ │ ├── tiers/ # Customer tiers
│ │ ├── referral/ # Referral programs
│ │ ├── marketplace/ # Token trading (frozen)
│ │ ├── reviews/ # Customer reviews
│ │ ├── onboarding/ # Welcome flows & tours
│ │ ├── merchant/ # Merchant shell & tabs (Team, Programs, …)
│ │ ├── team/ # Branches, employees, invite redemption
│ │ └── admin/ # Platform administration
│ ├── hooks/ # Data fetching (TanStack Query + Supabase) — keep queries here
│ ├── config/ # Contract addresses & ABIs
│ ├── contexts/ # Auth context
│ ├── integrations/supabase/ # Database client & types
│ ├── pages/ # Routes (e.g. ForAgentsPage → /for-agents, ApiDocsPage → /api-docs)
│ └── lib/ # Utilities
├── examples/agent-mcp/ # Copy-paste MCP + curl for agents
├── scripts/ # Optional dev helpers (x402 MCP smoke test, SIWE lsk_ helper) — not bundled in the web app
├── public/
│ ├── .well-known/
│ │ ├── agent.json # AI agent discovery
│ │ ├── skills/ # Markdown skills for agents (00–12)
│ │ └── farcaster.json # Farcaster manifest
│ ├── openapi.json # OpenAPI 3.1 (API + x402 hints)
│ ├── llms.txt / llms-full.txt # Short / long summaries for LLM crawlers
│ └── media-kit/ # Brand & press assets
├── capacitor.config.ts # Native app IDs (see docs/development/)
├── contracts/ # Solidity contracts
├── supabase/
│ ├── functions/ # Edge Functions — see supabase/functions/README.md
│ └── migrations/ # Database migrations
└── README.mdIndexes: AGENTS.md (AI agents) · docs/README.md (human guides) · docs/development/PORTALS_AND_TEAM.md (portal UI & team invites) · supabase/functions/README.md (Edge Functions).
Edge Functions
See the supabase/functions/README.md catalogue (grouped by role: API, MCP, auth, payments, jobs). The root README table is intentionally shortened here to avoid duplication.
Security
Flexible Authentication: Google/email via Coinbase (gas-sponsored smart wallets), or SIWE for Farcaster and crypto-native users
API Key Auth: SHA-256 hashed keys with
lsk_prefix for agentsRow Level Security: All database tables protected with RLS policies
Scoped Permissions: Agents operate within granted scopes only
MPC Wallets: Private keys never leave Coinbase's secure enclave
Rate Limiting: Per-agent rate limits prevent abuse
Builder Code Attribution: All transactions tagged with ERC-8021 builder code
Builder Code
All on-chain transactions are tagged with Base Builder Code bc_wdmnog7m (ERC-8021 format) for analytics visibility in base.dev.
For AI Agents
Loyal Spark is a machine-payment-native API. AI agents can discover, authenticate, and pay for API calls without human intervention.
Discovery Endpoints
Resource | URL | Purpose |
Agent onboarding (web) | Keys, REST, MCP, gateways, discovery — one page for builders | |
Agent Manifest | Full protocol spec, capabilities, pricing | |
MPP Manifest | Machine Payment Protocol manifest | |
OpenAPI Spec | OpenAPI 3.1.0 with x-payment-info | |
Skills Library | 16 step-by-step guides for agents ( | |
LLMs.txt | Protocol summary for LLM crawlers | |
Prompt Guide | Ready-to-use system prompts | |
Copy-paste MCP / curl | Starter configs in the repo | |
Repo quickstart (keys, SIWE, x402) | Short paths for coding agents |
Payment Gateways (pay per call — no subscription)
Agents can pay per request with onchain micropayments instead of a monthly plan. Write actions still need a free lsk_ or rwk_ key for identity and scopes; x402/MPP cover the per-call USDC/pathUSD fee only.
Protocol | Network | Asset | Gateway |
x402 exact | Base | USDC |
|
MPP | Tempo | pathUSD / USDC |
|
Pricing: $0.001–$0.005 per read · $0.005–$0.05 per write · HTTP 402 challenge/response flow.
Paid MCP (merchant): POST …/x402-gateway/mcp-tools/<tool_name> (JSON-RPC tools/call); after settlement, pass x-api-key: lsk_… like direct MCP. Recipient / holder MCP: POST …/x402-gateway/recipient-mcp-tools/<tool_name> with x-api-key: rwk_…. Tool lists + JSON Schemas: mcp-bazaar-tools.ts · recipient-mcp-bazaar-tools.ts. 402 + Bazaar (discovery) metadata for both families: x402-bazaar-accept.ts (extensions.bazaar, outputSchema.input.type: "mcp"). After successful settle, the CDP facilitator may return EXTENSION-RESPONSES (bazaar.status: success | processing | rejected).
Catalogues & Registries
Official MCP Registry —
io.github.aspekt19/loyal-spark(remote Streamable HTTP →api.loyalspark.online/loyalty-mcp; see rootserver.json)mppscan.com — MPP service scanner (indexed via OpenAPI)
glama.ai — MCP server directory
mcp.so — MCP server registry
smithery.ai — MCP marketplace (
loyalspark/loyalty-protocol)
Links & Resources
Website: loyalspark.online
API Docs: loyalspark.online/api-docs
Agent Discovery: loyalspark.online/.well-known/agent.json
Twitter/X: x.com/Loyal_Spark
Email: admin@loyalspark.online
Built With
Base — Ethereum L2 by Coinbase
Coinbase Developer Platform — Embedded Wallets, Paymaster & Authentication
Coinbase CDP — MPC Server Wallets (for AI agents)
Wagmi — React Hooks for Ethereum
shadcn/ui — UI Components
Lovable — Full-Stack Development Platform
Viem — TypeScript Interface for Ethereum
License
MIT License — see LICENSE file for details.
Available Tools
17 toolsactivate_loyalty_programAInspect
Get activation calldata (unpauseUtility + enableMinting) for an inactive program
Inputs: token_address (required).
check_voucher_statusAInspect
Check voucher status by code or ID. Public endpoint — no API key or authentication required.
Inputs: code, voucher_id.
create_loyalty_programAInspect
Get factory calldata to deploy a new ERC-20 loyalty token on Base
Inputs: name (required), symbol (required), expiration_days.
create_rewardBInspect
Create a new reward redeemable with loyalty tokens
Inputs: token_address (required), name (required), cost (required), description.
get_my_profileAInspect
Get authenticated agent's profile
Inputs: no named parameters.
get_platform_infoAInspect
Get info about Loyal Spark protocol on Base L2
Inputs: no named parameters.
get_program_analyticsBInspect
Get analytics for your loyalty programs
Inputs: no named parameters.
get_token_balanceBInspect
Get loyalty token balance and tier info for a customer
Inputs: token_address (required), customer_address (required).
list_loyalty_programsAInspect
List loyalty programs owned by the agent's merchant
Inputs: include_expired.
list_marketplace_offersAInspect
List active token trading offers on the marketplace
Inputs: status, limit.
list_rewardsCInspect
List rewards for a loyalty program by token_address
Inputs: token_address (required).
mint_loyalty_tokensBInspect
Record mint intent and get smart contract call params
Inputs: token_address (required), recipient (required), amount (required).
redeem_rewardAInspect
Redeem a reward by providing a verified token transfer transaction hash. Creates a voucher for the customer.
Inputs: reward_id (required), customer_address (required), transaction_hash (required).
register_loyalty_programCInspect
Register a deployed token as a loyalty program in the database
Inputs: name (required), symbol (required), token_address (required), expiration_days.
transfer_loyalty_tokensAInspect
Get calldata to transfer loyalty tokens between wallets
Inputs: token_address (required), to (required), amount (required).
update_program_statusAInspect
Update program status in database after on-chain activation/pause
Inputs: token_address (required), status (required).
use_voucherAInspect
Mark a voucher as used (redeemed by customer at merchant). Merchant-only operation.
Inputs: voucher_code, voucher_id.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 17 tools
Tools are mostly distinct, though create_loyalty_program vs register_loyalty_program and activate_loyalty_program vs update_program_status operate on similar resources and could cause brief hesitation. Descriptions clarify the deployment vs. registration and calldata generation vs. database update distinctions sufficiently.
Excellent consistency throughout with strict verb_noun snake_case pattern (e.g., create_reward, transfer_loyalty_tokens, check_voucher_status). All 17 tools follow the same convention without deviation.
17 tools is slightly large but justified for the scope, covering full lifecycle: program deployment/registration, token minting/transfers, reward management, voucher handling, marketplace queries, and analytics. Each tool earns its place without redundancy.
Strong coverage of loyalty protocol workflows including deployment, activation, token operations, reward redemption, and voucher lifecycle. Minor gaps exist for reward updates/deletion and explicit pause calldata generation, but agents can work around these using existing tools.
Maintenance
Related MCP Connectors
Agent-commerce MCP server for x402/USDC payments and affiliate splits on Base.
MCP server for Boson Protocol — on-chain agentic commerce for physical & digital goods.
PHANTOM ID MCP payment server: agent-to-agent USDC payments on Base.
MCP server for AI agents to discover campaigns by humans and donate USDC directly on Base.
Related MCP Servers
AlicenseNot gradedqualityFmaintenanceProvides onchain tools for Claude AI to interact with the Base blockchain and Coinbase API, enabling wallet management, fund transfers, and smart contract deployment.22 npm351MIT- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables fee-free USDC transfers on the Base blockchain network using Coinbase CDP MPC Wallet integration, with support for ENS and BaseName domain resolution.15 npm21MIT
- AlicenseNot gradedqualityDmaintenanceMCP (Model Context Protocol) server for the MAIN DEX on Base. Provides AI agents (Claude, Cursor, etc.) with tools to interact with the protocol: swap tokens, manage liquidity, enter/exit ALM strategies(10% APY), and more.MIT
- AlicenseNot gradedqualityDmaintenanceMCP server enabling rapid Web3 development on Base with Farcaster integration.MIT