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 resonance_design_program tool]

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

Onboarding Events (One-time)

EventRewardPurpose
Server Join50 RSNCWelcome new members
Read Rules10 RSNCEncourage rule awareness
First Post10 RSNCBreak the ice

Daily Engagement

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

Technical Contributions

EventRewardValidation
Helpful Answer25 RSNCAdmin triggered
Code Review50 RSNCAdmin triggered
Bug Report75 RSNCPer validated

Streaks

  • 7-day streak: +50 RSNC bonus
  • 30-day streak: +200 RSNC 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 resonance_create_events_batch tool]

✅ Created 10 events:

  • server_join - 50 RSNC, one-time
  • read_rules - 10 RSNC, one-time
  • first_post - 10 RSNC, one-time
  • daily_checkin - 10 RSNC, 24h cooldown
  • gm_checkin - 25 RSNC, 24h cooldown
  • gn_checkin - 15 RSNC, 24h cooldown
  • helpful_answer - 25 RSNC, admin-triggered
  • code_review - 50 RSNC, admin-triggered
  • bug_report - 75 RSNC, 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 resonance_track_event tool]

Reward Sent!

  • User: discord_123456789@rsnc.network
  • Event: code_review
  • Amount: 50 RSNC
  • New Balance: 1,250 RSNC
  • 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 resonance_get_user_stats tool]

User Stats: discord_987654321

MetricValue
Balance3,450 RSNC
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 RSNC, available to the first 50 people who react."

AI: Creating AMA reaction drop...

[Uses resonance_create_drop tool]

Drop Created!

SettingValue
TypeReaction
Reward25 RSNC
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 resonance_get_leaderboard tool]

🏆 Top Earners - This Month

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

Summary:

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

Example 7: Create a Perk

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

AI: Creating VIP perk...

[Uses resonance_create_perk tool]

Perk Created!

SettingValue
NameVIP Access
Price5,000 RSNC
Max Supply100
Categoryaccess
StatusActive

The perk is now available in /perks and on perks.rsnc.network.

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 resonance_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['RESONANCE_BRAND_ID']
security_key = os.environ['RESONANCE_SECURITY_KEY']
timestamp = str(int(time.time() * 1000))

# Create user email identifier
user_email = f"mysite_{user_id}@rsnc.network"

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.rsnc.network/resonance-api/manual-event',
headers={
'Content-Type': 'application/json',
'X-Resonance-Brand-Id': brand_id,
'X-Resonance-Signature': signature,
'X-Resonance-Timestamp': timestamp
},
data=body
)

return response.json()

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

Prerequisites:

  1. Set environment variables:

    • RESONANCE_BRAND_ID
    • RESONANCE_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 RSNC 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 RSNC?"

"Add another perk tier at 10,000 RSNC"

Request Code

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

"Show me the curl command to test this event"