Skip to main content

MCP Examples

Real examples of designing and managing loyalty programs through AI conversation.

Example 1: Design a Complete Program

You: "Design a loyalty program for my developer Discord. We want to reward helpful contributions, daily activity, and contest wins."

AI: I'll design a comprehensive developer community loyalty program for you.

[Uses loyalteez_design_program tool]

Philosophy: Reward quality over quantity. Focus on helpfulness and technical contributions.

Onboarding Events (One-time)

EventRewardPurpose
Server Join50 LTZWelcome new members
Read Rules10 LTZEncourage rule awareness
First Post10 LTZBreak the ice

Daily Engagement

EventRewardCooldown
Daily Check-in10 LTZ24h
GM/GN25/15 LTZ24h each

Technical Contributions

EventRewardValidation
Helpful Answer25 LTZAdmin triggered
Code Review50 LTZAdmin triggered
Bug Report75 LTZPer validated

Streaks

  • 7-day streak: +50 LTZ bonus
  • 30-day streak: +200 LTZ bonus
  • Multipliers: 1.1x → 1.5x → 2.0x

Shall I create these events for you?


Example 2: Create Events Batch

You: "Yes, create all those events for my brand"

AI: Creating all events now...

[Uses loyalteez_create_events_batch tool]

✅ Created 10 events:

  • server_join - 50 LTZ, one-time
  • read_rules - 10 LTZ, one-time
  • first_post - 10 LTZ, one-time
  • daily_checkin - 10 LTZ, 24h cooldown
  • gm_checkin - 25 LTZ, 24h cooldown
  • gn_checkin - 15 LTZ, 24h cooldown
  • helpful_answer - 25 LTZ, admin-triggered
  • code_review - 50 LTZ, admin-triggered
  • bug_report - 75 LTZ, validated

All events are now active in your Partner Portal!


Example 3: Track an Event Manually

You: "User discord_123456789 just gave a really helpful code review. Reward them with the code_review event."

AI: Rewarding user for code review...

[Uses loyalteez_track_event tool]

Reward Sent!

  • User: [email protected]
  • Event: code_review
  • Amount: 50 LTZ
  • New Balance: 1,250 LTZ
  • Transaction: 0xabc123...

The user will see this reward in their /balance next time they check.


Example 4: Check User Stats

You: "Show me the stats for user discord_987654321"

AI: Getting user statistics...

[Uses loyalteez_get_user_stats tool]

User Stats: discord_987654321

MetricValue
Balance3,450 LTZ
Current Streak12 days
Multiplier1.25x
Events Claimed47
Achievements5/12

Recent Activity:

  • Daily check-in (2 hours ago)
  • GM bonus (this morning)
  • Helpful answer reward (yesterday)

Achievements Unlocked:

  • ✅ First Steps (10 claims)
  • ✅ Streak Starter (7-day streak)
  • ✅ Getting Started (25 claims)

Example 5: Create a Drop

You: "We're doing a community AMA tomorrow. Create a reaction drop for 25 LTZ, available to the first 50 people who react."

AI: Creating AMA reaction drop...

[Uses loyalteez_create_drop tool]

Drop Created!

SettingValue
TypeReaction
Reward25 LTZ
Max Claims50
Expires24 hours
Emoji🎉

To use:

  1. Post your AMA announcement
  2. Copy the message ID
  3. Run in Discord:
    /drop event_id:ama_reward type:reaction message_id:MESSAGE_ID emoji:🎉

Or I can generate the full command once you have the message ID.


Example 6: View Leaderboard

You: "Show me the top 10 users in my community by total earnings this month."

AI: Fetching monthly leaderboard...

[Uses loyalteez_get_leaderboard tool]

🏆 Top Earners - This Month

RankUserLTZ Earned
1discord_456789...2,450 LTZ
2discord_123456...1,890 LTZ
3discord_789012...1,650 LTZ
4discord_345678...1,420 LTZ
5discord_901234...1,180 LTZ
6discord_567890...980 LTZ
7discord_234567...850 LTZ
8discord_890123...720 LTZ
9discord_456789...650 LTZ
10discord_012345...580 LTZ

Summary:

  • Total distributed this month: 15,370 LTZ
  • Average per top-10 user: 1,537 LTZ
  • Top user is 4x above average

Example 7: Create a Perk

You: "Create a VIP access perk that costs 5000 LTZ and is limited to 100 people."

AI: Creating VIP perk...

[Uses loyalteez_create_perk tool]

Perk Created!

SettingValue
NameVIP Access
Price5,000 LTZ
Max Supply100
Categoryaccess
StatusActive

The perk is now available in /perks and on perks.loyalteez.app.

Would you like me to:

  • Add a description?
  • Create additional perks?
  • Set up a Discord role linked to this perk?

Example 8: Generate Integration Code

You: "Generate Python code to track a purchase event when a user buys something on my website."

AI: Generating Python integration code...

[Uses loyalteez_generate_code tool]

import hmac
import hashlib
import time
import json
import requests
import os

def track_purchase(user_id: str, order_id: str, amount: float):
"""Track a purchase event and reward the user."""

brand_id = os.environ['LOYALTEEZ_BRAND_ID']
security_key = os.environ['LOYALTEEZ_SECURITY_KEY']
timestamp = str(int(time.time() * 1000))

# Create user email identifier
user_email = f"mysite_{user_id}@loyalteez.app"

body = json.dumps({
'brandId': brand_id,
'eventType': 'purchase',
'userEmail': user_email,
'metadata': {
'order_id': order_id,
'amount': amount
}
}, separators=(',', ':'))

# Generate HMAC signature
signing_string = f"{timestamp}:{brand_id}:{body}"
signature = hmac.new(
security_key.encode(),
signing_string.encode(),
hashlib.sha256
).hexdigest()

# Send request
response = requests.post(
'https://api.loyalteez.app/loyalteez-api/manual-event',
headers={
'Content-Type': 'application/json',
'X-Loyalteez-Brand-Id': brand_id,
'X-Loyalteez-Signature': signature,
'X-Loyalteez-Timestamp': timestamp
},
data=body
)

return response.json()

# Usage
result = track_purchase('user_123', 'order_456', 99.99)
print(f"Rewarded {result['rewardAmount']} LTZ")

Prerequisites:

  1. Set environment variables:

    • LOYALTEEZ_BRAND_ID
    • LOYALTEEZ_SECURITY_KEY
  2. Create a purchase event in Partner Portal

Would you like me to explain any part of this code?


Tips for AI Conversations

Be Specific

Good: "Create a daily check-in event with 25 LTZ reward and 24-hour cooldown"

Less Good: "Create an event"

Ask for Recommendations

"What events would you recommend for a trading community?"

"What's a good reward structure for a 500-member server?"

Iterate

"That looks good, but can we increase the daily reward to 30 LTZ?"

"Add another perk tier at 10,000 LTZ"

Request Code

"Generate the code to integrate this in my Node.js backend"

"Show me the curl command to test this event"