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]
Recommended Program: Developer Community
Philosophy: Reward quality over quantity. Focus on helpfulness and technical contributions.
Onboarding Events (One-time)
| Event | Reward | Purpose |
|---|---|---|
| Server Join | 50 LTZ | Welcome new members |
| Read Rules | 10 LTZ | Encourage rule awareness |
| First Post | 10 LTZ | Break the ice |
Daily Engagement
| Event | Reward | Cooldown |
|---|---|---|
| Daily Check-in | 10 LTZ | 24h |
| GM/GN | 25/15 LTZ | 24h each |
Technical Contributions
| Event | Reward | Validation |
|---|---|---|
| Helpful Answer | 25 LTZ | Admin triggered |
| Code Review | 50 LTZ | Admin triggered |
| Bug Report | 75 LTZ | Per 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-timeread_rules- 10 LTZ, one-timefirst_post- 10 LTZ, one-timedaily_checkin- 10 LTZ, 24h cooldowngm_checkin- 25 LTZ, 24h cooldowngn_checkin- 15 LTZ, 24h cooldownhelpful_answer- 25 LTZ, admin-triggeredcode_review- 50 LTZ, admin-triggeredbug_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
| Metric | Value |
|---|---|
| Balance | 3,450 LTZ |
| Current Streak | 12 days |
| Multiplier | 1.25x |
| Events Claimed | 47 |
| Achievements | 5/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!
| Setting | Value |
|---|---|
| Type | Reaction |
| Reward | 25 LTZ |
| Max Claims | 50 |
| Expires | 24 hours |
| Emoji | 🎉 |
To use:
- Post your AMA announcement
- Copy the message ID
- 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
| Rank | User | LTZ Earned |
|---|---|---|
| 1 | discord_456789... | 2,450 LTZ |
| 2 | discord_123456... | 1,890 LTZ |
| 3 | discord_789012... | 1,650 LTZ |
| 4 | discord_345678... | 1,420 LTZ |
| 5 | discord_901234... | 1,180 LTZ |
| 6 | discord_567890... | 980 LTZ |
| 7 | discord_234567... | 850 LTZ |
| 8 | discord_890123... | 720 LTZ |
| 9 | discord_456789... | 650 LTZ |
| 10 | discord_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!
| Setting | Value |
|---|---|
| Name | VIP Access |
| Price | 5,000 LTZ |
| Max Supply | 100 |
| Category | access |
| Status | Active |
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:
-
Set environment variables:
LOYALTEEZ_BRAND_IDLOYALTEEZ_SECURITY_KEY
-
Create a
purchaseevent 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"