MCPサーバー

Loyal Spark

io.github.aspekt19/loyal-spark
コマース・小売 暗号資産・Web3 公開・接続可能 MCP 2025-11-25

このMCPでできること

Creates and operates token-based loyalty programs on Base, including minting, rewards, vouchers, customer balances, analytics, offers, and marketplace interactions.

activate_loyalty_program
For legacy ERC-20 programs: returns unpauseUtility + enableMinting calldata. For B20 programs: no-op (already active).
入力スキーマ
{'type': 'object', 'required': ['token_address'], 'properties': {'token_address': {'type': 'string', 'description': 'Token contract address (0x...)'}}}
bazaar_discover_mcp_servers
Discover third-party MCP servers published in Coinbase CDP's Bazaar. Read-only. Filter by free-text q and/or network.
入力スキーマ
{'type': 'object', 'properties': {'q': {'type': 'string', 'description': 'Free-text filter matched against the server JSON'}, 'limit': {'type': 'number', 'description': 'Max rows (default 25, max 100)'}, 'cursor': {'type': 'string', 'description': 'Pagination cursor'}, 'network': {'type': 'string', 'description': "Filter by network, e.g. 'base'"}}}
bazaar_discover_resources
Discover third-party x402-paid resources published in Coinbase CDP's Bazaar (docs, data feeds, AI inference, etc). Read-only. Filter by free-text q and/or network (e.g. 'base').
入力スキーマ
{'type': 'object', 'properties': {'q': {'type': 'string', 'description': 'Free-text filter matched against the resource JSON (name/description/url)'}, 'limit': {'type': 'number', 'description': 'Max rows returned (default 25, max 100)'}, 'cursor': {'type': 'string', 'description': 'Pagination cursor from a previous call'}, 'network': {'type': 'string', 'description': "Filter by network, e.g. 'base' or 'base-sepolia'"}}}
bazaar_pay_and_call
Pay and call any x402-paid HTTPS endpoint using the merchant agent's CDP MPC wallet (EIP-3009 exact scheme on Base USDC). Probes the URL for HTTP 402, picks a compatible requirement, signs TransferWithAuthorization via CDP, retries with X-PAYMENT header, and returns the paid response. Requires scope 'mint' and a pre-created CDP wallet. Safety cap: max_usdc (default 0.25, hard limit 10).
入力スキーマ
{'type': 'object', 'required': ['url'], 'properties': {'url': {'type': 'string', 'description': 'Full https:// URL of the x402 resource'}, 'body': {'description': 'Optional JSON request body for non-GET methods'}, 'method': {'enum': ['GET', 'POST', 'PUT', 'PATCH', 'DELETE'], 'type': 'string', 'description': 'HTTP method (default GET)'}, 'headers': {'type': 'object', 'description': 'Extra request headers (Accept/Content-Type auto-set)'}, 'max_usdc': {'type': 'number', 'description': 'Spend cap for THIS call in USDC (default 0.25, must be â\x89¤ 10)'}, 'allowed_schemes': {'type': 'array', 'items': {'type': 'string'}, 'description': "x402 schemes to accept (default ['exact'])"}, 'allowed_networks': {'type': 'array', 'items': {'type': 'string'}, 'description': "Networks to accept (default ['base'])"}}}
bazaar_probe_x402
GET a candidate x402 URL and, if it responds HTTP 402, return the parsed payment requirements (accepts[]) so the caller can decide whether to pay. HTTPS only. No signing performed.
入力スキーマ
{'type': 'object', 'required': ['url'], 'properties': {'url': {'type': 'string', 'description': 'Full https:// URL of the x402-paid endpoint'}}}
cancel_stale_offers
Cancel marketplace offers that have been active for more than N days with no completions. Admin-only action tool.
入力スキーマ
{'type': 'object', 'properties': {'max_age_days': {'type': 'number', 'description': 'Cancel offers older than this many days (default: 14)'}}}
check_voucher_status
Check voucher status by code or ID. Public endpoint — no API key or authentication required.
入力スキーマ
{'type': 'object', 'properties': {'code': {'type': 'string', 'description': 'Voucher code (e.g. LOYAL-XXXX-XXXX-XXXX-XXXX)'}, 'voucher_id': {'type': 'string', 'description': 'Voucher UUID (alternative to code)'}}}
confirm_mint_fee
Confirm that the protocol fee transaction for a previous mint/earn was broadcast on Base. Verifies the fee mint on-chain and clears the obligation. Unconfirmed fee obligations block future mints.
入力スキーマ
{'type': 'object', 'required': ['obligation_id', 'fee_tx_hash'], 'properties': {'fee_tx_hash': {'type': 'string', 'description': 'Transaction hash of the protocol fee mint'}, 'obligation_id': {'type': 'string', 'description': 'fee_obligation_id returned by mint_loyalty_tokens or earn_points'}, 'recipient_tx_hash': {'type': 'string', 'description': 'Optional transaction hash of the recipient mint'}}}
create_gift_certificate
Create a gift / welcome certificate (UDS-style) with a unique 6-character redemption code (LOYAL-XXXXXX). Customer redeems via QR or by entering the code; merchant then mints tokens on-chain. Use for welcome bonuses, promo campaigns, partnership gifts.
入力スキーマ
{'type': 'object', 'required': ['token_address', 'usd_amount'], 'properties': {'title': {'type': 'string', 'description': "Display title (default: 'Gift Certificate')"}, 'quantity': {'type': 'number', 'description': 'Number of certificates to create as a batch (1â\x80\x93100, default 1)'}, 'image_url': {'type': 'string', 'description': 'Optional public image URL for the cert design'}, 'usd_amount': {'type': 'number', 'description': 'Certificate face value in USD (positive)'}, 'description': {'type': 'string', 'description': 'Optional descriptive text shown to the customer'}, 'token_address': {'type': 'string', 'description': "ERC-20 loyalty token address (must belong to the agent's merchant)"}, 'expires_in_days': {'type': 'number', 'description': 'Validity period in days (omit for no expiry)'}, 'points_per_dollar': {'type': 'number', 'description': "Optional override of program rate (e.g. 10 = 10 tokens per $1). Defaults to program's points_per_dollar."}, 'max_redemption_percent': {'type': 'number', 'description': 'Max % of any future purchase the customer can pay with these tokens (5â\x80\x93100). Default 50.'}}}
create_loyalty_program
Get factory calldata to deploy a new loyalty token on Base. Defaults to B20 (Base native ERC-20 superset, single tx, active immediately). Pass token_standard='erc20' for the legacy factory. For B20, MINT_ROLE is granted atomically to the merchant admin AND to the agent's CDP wallet (or explicit extra_minters) so autonomous agents can mint with no follow-up transaction.
入力スキーマ
{'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'Program name (required for external agents)'}, 'locale': {'type': 'string'}, 'symbol': {'type': 'string', 'description': 'Token symbol, 2-5 chars (required for external agents)'}, 'auto_generate': {'type': 'boolean', 'description': 'Internal automation only â\x80\x94 fills missing name/symbol from examples. External agents should pass explicit name and symbol.'}, 'extra_minters': {'type': 'array', 'items': {'type': 'string'}, 'description': '(B20 only) Extra addresses to grant MINT_ROLE atomically in the same deploy tx.'}, 'token_standard': {'type': 'string', 'description': "'b20' (default, single-tx deploy on Base precompile factory) or 'erc20' (legacy factory, requires activate_loyalty_program follow-up)"}, 'expiration_days': {'type': 'number', 'description': 'Program duration in days (default: 365)'}, 'preferred_style': {'type': 'string'}, 'target_audience': {'type': 'string'}, 'business_context': {'type': 'object', 'description': 'Optional context for examples only'}, 'agent_wallet_address': {'type': 'string', 'description': "(B20 only) Additional wallet to grant MINT_ROLE atomically. Defaults to the agent's active CDP MPC wallet if not provided."}}}
create_personalized_offer
Create a personalized offer for a specific customer. Use when analytics reveal engagement patterns (e.g., inactive customers, high-value segments).
入力スキーマ
{'type': 'object', 'required': ['token_address', 'customer_address', 'title'], 'properties': {'title': {'type': 'string', 'description': "Offer title (e.g., 'Welcome back! 20% bonus tokens')"}, 'valid_days': {'type': 'number', 'description': 'How many days the offer is valid (default: 7)'}, 'description': {'type': 'string', 'description': 'Offer description'}, 'bonus_tokens': {'type': 'number', 'description': 'Bonus tokens to award'}, 'token_address': {'type': 'string', 'description': 'Token contract address'}, 'customer_address': {'type': 'string', 'description': 'Customer wallet address'}, 'discount_percentage': {'type': 'number', 'description': 'Discount percentage (0-100)'}}}
create_reward
Create a new reward redeemable with loyalty tokens
入力スキーマ
{'type': 'object', 'required': ['token_address', 'name', 'cost'], 'properties': {'cost': {'type': 'number', 'description': 'Token cost to redeem'}, 'name': {'type': 'string', 'description': 'Reward name'}, 'description': {'type': 'string', 'description': 'Reward description'}, 'token_address': {'type': 'string', 'description': 'Token contract address'}}}
delete_report
Delete a report that is no longer relevant. Use to clean up outdated or irrelevant reports.
入力スキーマ
{'type': 'object', 'required': ['report_id'], 'properties': {'report_id': {'type': 'string', 'description': 'UUID of the report to delete'}}}
earn_points
Calculate and mint loyalty tokens based on purchase amount and program's cashback rate. Returns a fee-first `calls[]` bundle (protocol fee mint first, then the customer mint) — submit in order, atomically via EIP-5792 if supported, then call confirm_mint_fee (or POST /agent-api/mint/confirm). Unconfirmed fee obligations block future mints.
入力スキーマ
{'type': 'object', 'required': ['token_address', 'customer_address', 'purchase_amount'], 'properties': {'cashback_rate': {'type': 'number', 'description': "Override cashback rate (%). If omitted, uses the program's default rate."}, 'token_address': {'type': 'string', 'description': 'Token contract address (0x...)'}, 'purchase_amount': {'type': 'number', 'description': 'Purchase amount in currency units (e.g. dollars)'}, 'customer_address': {'type': 'string', 'description': 'Customer wallet (0x...)'}}}
export_customers
Export customer data for a specific loyalty program. Returns wallet addresses, voucher stats, balances, and tier info. Use for analytics, segmentation, and personalized offers.
入力スキーマ
{'type': 'object', 'required': ['token_address'], 'properties': {'token_address': {'type': 'string', 'description': 'Token address of the loyalty program'}}}
generate_program_defaults
Workflow planner: field catalog, required parameters, next_actions, and non-binding examples. External agents must choose their own name, symbol, and economics.
入力スキーマ
{'type': 'object', 'properties': {'locale': {'type': 'string'}, 'category': {'type': 'string'}, 'description': {'type': 'string'}, 'business_name': {'type': 'string'}, 'preferred_style': {'type': 'string'}, 'target_audience': {'type': 'string'}}}
get_my_profile
Get authenticated agent's profile
入力スキーマ
{'type': 'object', 'properties': {}}
get_platform_info
Get info about Loyal Spark protocol on Base L2
入力スキーマ
{'type': 'object', 'properties': {}}
get_platform_stats
Get global platform statistics across all merchants. Admin-only: requires agent owned by an admin wallet.
入力スキーマ
{'type': 'object', 'properties': {}}
get_program_analytics
Get analytics for your loyalty programs
入力スキーマ
{'type': 'object', 'properties': {}}
get_program_workflow_status
Explain the next merchant action: current_step, required fields, and ordered next_actions (you provide all parameter values)
入力スキーマ
{'type': 'object', 'properties': {'token_address': {'type': 'string', 'description': 'Optional token to inspect'}}}
get_token_balance
Get loyalty token balance and tier info for a customer
入力スキーマ
{'type': 'object', 'required': ['token_address', 'customer_address'], 'properties': {'token_address': {'type': 'string', 'description': 'Token contract address'}, 'customer_address': {'type': 'string', 'description': 'Customer wallet'}}}
list_gift_certificates
List gift certificates issued by the agent's merchant (with status and redemption info).
入力スキーマ
{'type': 'object', 'properties': {'limit': {'type': 'number', 'description': 'Max rows (default 50, max 200)'}, 'status': {'type': 'string', 'description': 'Filter by status: active, pending_mint, redeemed, expired, revoked'}, 'token_address': {'type': 'string', 'description': 'Filter by program token address (optional)'}}}
list_loyalty_programs
List loyalty programs owned by the agent's merchant
入力スキーマ
{'type': 'object', 'properties': {'include_expired': {'type': 'boolean', 'description': 'Include expired programs'}}}
list_marketplace_offers
List active token trading offers on the marketplace
入力スキーマ
{'type': 'object', 'properties': {'limit': {'type': 'number', 'description': 'Max results (1-100)'}, 'status': {'type': 'string', 'description': 'Filter: active/completed/cancelled'}}}
list_my_reports
List your previously submitted reports. Allows reviewing past reports, checking status (new/reviewed/done), and identifying what still needs attention.
入力スキーマ
{'type': 'object', 'properties': {'limit': {'type': 'number', 'description': 'Max results 1-50 (default: 20)'}, 'status': {'type': 'string', 'description': 'Filter by status: new, reviewed, done (optional)'}}}
list_rewards
List rewards for a loyalty program by token_address. Includes redemption metrics (total vouchers issued, redeemed, and last-30-day counts) for each reward.
入力スキーマ
{'type': 'object', 'required': ['token_address'], 'properties': {'token_address': {'type': 'string', 'description': 'Token contract address (0x...)'}}}
mark_gift_certificate_minted
After the merchant submits the on-chain mint transaction for a claimed gift certificate, call this to mark it as minted (status pending_mint → redeemed) and store the mint tx hash.
入力スキーマ
{'type': 'object', 'required': ['certificate_id', 'transaction_hash'], 'properties': {'certificate_id': {'type': 'string', 'description': 'UUID of the certificate'}, 'transaction_hash': {'type': 'string', 'description': 'Base L2 mint transaction hash (0x...)'}}}
mint_loyalty_tokens
Record mint intent and get a fee-first `calls[]` bundle: protocol fee mint FIRST, then the recipient mint. The protocol fee is charged in the merchant's own loyalty tokens (not USDC). Submit both calls in order (atomically via EIP-5792 send_calls if your wallet supports it), then call confirm_mint_fee (or POST /agent-api/mint/confirm) with the fee tx hash. Unconfirmed fee obligations block future mints.
入力スキーマ
{'type': 'object', 'required': ['token_address', 'recipient', 'amount'], 'properties': {'amount': {'type': 'number', 'description': 'Tokens to mint'}, 'recipient': {'type': 'string', 'description': 'Recipient wallet (0x...)'}, 'token_address': {'type': 'string', 'description': 'Token contract address'}}}
redeem_reward
Redeem a reward by providing a verified token transfer transaction hash. Creates a voucher for the customer.
入力スキーマ
{'type': 'object', 'required': ['reward_id', 'customer_address', 'transaction_hash'], 'properties': {'reward_id': {'type': 'string', 'description': 'UUID of the reward to redeem'}, 'customer_address': {'type': 'string', 'description': 'Wallet address of the customer who transferred tokens'}, 'transaction_hash': {'type': 'string', 'description': 'Onchain tx hash of the token transfer from customer to merchant'}}}
register_loyalty_program
Register a deployed token as a loyalty program in the database. B20 tokens are registered as active; legacy ERC-20 as inactive (activate next).
入力スキーマ
{'type': 'object', 'required': ['name', 'symbol', 'token_address'], 'properties': {'name': {'type': 'string', 'description': 'Program name'}, 'symbol': {'type': 'string', 'description': 'Token symbol'}, 'cashback_rate': {'type': 'number', 'description': 'Default cashback percent for earn (1â\x80\x93100). Omit for DB default (5).'}, 'token_address': {'type': 'string', 'description': 'Deployed token contract address (0x...)'}, 'token_standard': {'type': 'string', 'description': "'b20' (default) or 'erc20' (legacy)"}, 'expiration_days': {'type': 'number', 'description': 'Duration in days (default: 365)'}, 'points_per_dollar': {'type': 'number', 'description': 'Loyalty points per $1 spent (1â\x80\x931000). Omit for DB default (1).'}}}
revoke_gift_certificate
Revoke an active gift certificate (status active → revoked). Only the issuing merchant can revoke. Already-redeemed/minted certificates cannot be revoked.
入力スキーマ
{'type': 'object', 'required': ['certificate_id'], 'properties': {'certificate_id': {'type': 'string', 'description': 'UUID of the certificate from create_gift_certificate / list_gift_certificates'}}}
send_report
Send a report to the developer/owner. Use this to submit SEO audits, growth ideas, data reports, anomalies, recommendations, or weekly summaries. The report will appear in the merchant's Agent Reports dashboard.
入力スキーマ
{'type': 'object', 'required': ['agent_role', 'report_type', 'title', 'content'], 'properties': {'title': {'type': 'string', 'description': 'Report title (max 500 chars)'}, 'content': {'type': 'string', 'description': 'Report body text (max 10000 chars)'}, 'priority': {'type': 'string', 'description': 'Priority: low, medium, high, or critical'}, 'agent_role': {'type': 'string', 'description': 'Your role: ceo, seo, growth, or analyst'}, 'report_type': {'type': 'string', 'description': 'Type: seo_audit, growth_idea, data_report, anomaly, task, recommendation, or weekly_report'}, 'action_items': {'type': 'array', 'items': {'type': 'string'}, 'description': 'List of suggested action items'}}}
transfer_loyalty_tokens
Get calldata to transfer loyalty tokens between wallets
入力スキーマ
{'type': 'object', 'required': ['token_address', 'to', 'amount'], 'properties': {'to': {'type': 'string', 'description': 'Recipient wallet (0x...)'}, 'amount': {'type': 'number', 'description': 'Tokens to transfer'}, 'token_address': {'type': 'string', 'description': 'Token contract address (0x...)'}}}
update_program_config
Update default cashback_rate and/or points_per_dollar for a program (same as merchant dashboard sliders)
入力スキーマ
{'type': 'object', 'required': ['token_address'], 'properties': {'cashback_rate': {'type': 'number', 'description': 'New default cashback % for earn (1â\x80\x93100). Omit to leave unchanged.'}, 'token_address': {'type': 'string', 'description': 'Token contract address (0x...)'}, 'points_per_dollar': {'type': 'number', 'description': 'New points per $1 (0â\x80\x931000, exclusive 0). Omit to leave unchanged.'}}}
update_program_status
Update program status in database after onchain activation/pause
入力スキーマ
{'type': 'object', 'required': ['token_address', 'status'], 'properties': {'status': {'type': 'string', 'description': 'New status: active, paused, or inactive'}, 'token_address': {'type': 'string', 'description': 'Token contract address'}}}
update_report_status
Update report status to 'reviewed' or 'done'. Use 'done' when the action items have been completed. Use 'reviewed' to acknowledge a report.
入力スキーマ
{'type': 'object', 'required': ['report_id', 'status'], 'properties': {'status': {'type': 'string', 'description': 'New status: reviewed or done'}, 'report_id': {'type': 'string', 'description': 'UUID of the report'}}}
update_reward_status
Activate or deactivate a reward in the catalog. Use to manage reward availability based on analytics.
入力スキーマ
{'type': 'object', 'required': ['reward_id', 'is_active'], 'properties': {'is_active': {'type': 'boolean', 'description': 'true to activate, false to deactivate'}, 'reward_id': {'type': 'string', 'description': 'UUID of the reward'}}}
use_voucher
Mark a voucher as used (redeemed by customer at merchant). Merchant-only operation.
入力スキーマ
{'type': 'object', 'properties': {'voucher_id': {'type': 'string', 'description': 'Voucher UUID (alternative to code)'}, 'voucher_code': {'type': 'string', 'description': 'Voucher code (e.g. LOYAL-XXXX-XXXX-XXXX-XXXX)'}}}
追加
bazaar_pay_and_call
2026年9月17日12:40
追加
bazaar_probe_x402
2026年9月17日12:40
追加
bazaar_discover_mcp_servers
2026年9月17日12:40
追加
bazaar_discover_resources
2026年9月17日12:40
追加
mark_gift_certificate_minted
2026年9月17日12:40
追加
revoke_gift_certificate
2026年9月17日12:40
追加
list_gift_certificates
2026年9月17日12:40
追加
create_gift_certificate
2026年9月17日12:40
追加
export_customers
2026年9月17日12:40
追加
delete_report
2026年9月17日12:40
追加
update_report_status
2026年9月17日12:40
追加
list_my_reports
2026年9月17日12:40
追加
send_report
2026年9月17日12:40
追加
update_reward_status
2026年9月17日12:40
追加
create_personalized_offer
2026年9月17日12:40
追加
cancel_stale_offers
2026年9月17日12:40
追加
get_platform_stats
2026年9月17日12:40
追加
check_voucher_status
2026年9月17日12:40
追加
use_voucher
2026年9月17日12:40
追加
redeem_reward
2026年9月17日12:40
追加
list_marketplace_offers
2026年9月17日12:40
追加
get_program_analytics
2026年9月17日12:40
追加
get_token_balance
2026年9月17日12:40
追加
confirm_mint_fee
2026年9月17日12:40
追加
earn_points
2026年9月17日12:40
追加
transfer_loyalty_tokens
2026年9月17日12:40
追加
mint_loyalty_tokens
2026年9月17日12:40
追加
create_reward
2026年9月17日12:40
追加
list_rewards
2026年9月17日12:40
追加
update_program_config
2026年9月17日12:40