Loyalteez MCP Server
Provides tools for integrating loyalty program capabilities into Android apps, including event tracking, user identity resolution, and reward management.
Allows designing and managing loyalty programs for Discord communities, including creating custom events, tracking user engagement, and rewarding contributions.
Enables Flutter apps to integrate loyalty program functionality, including event management, user stats, and reward drops.
Offers integration for iOS apps to incorporate loyalty program features such as custom events, streaks, and leaderboards.
Integrates loyalty features into Shopify stores, allowing event creation, user rewards, and engagement tracking for customers.
Enables loyalty program integration for Telegram communities, supporting custom events, streak tracking, and reward drops.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Loyalteez MCP Server Design a loyalty program for my coffee shop"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Loyalteez MCP Server
Model Context Protocol (MCP) server for Loyalteez - enabling AI assistants to design loyalty programs, create events, track rewards, and access comprehensive documentation.
Overview
The Loyalteez MCP Server provides AI tools (Claude, ChatGPT, Cursor, etc.) with direct access to Loyalteez's loyalty infrastructure. Design entire programs through natural conversation, create custom events, track rewards, and access full documentation - all via the MCP protocol.
The First Loyalty Platform with Native AI Integration - Enable AI assistants to build complete loyalty integrations through natural conversation.
Related MCP server: RL-MCP
Features
30 Tools: Comprehensive toolset for loyalty program integration
11 Resources: Reference materials including contracts, SDK docs, error codes, and more
Program Design: AI-powered loyalty program generation with event structures, tiers, and implementation code
Event Management: Create and track infinitely flexible custom events with channel constraints and domain validation
User Identity: Resolve platform identities to Loyalteez wallets
Engagement Services: Streak tracking, leaderboards, achievements, and activity logging
Webhook Support: Validate signatures and generate receiver code for any framework
Mobile Examples: React Native, iOS, Android, and Flutter integration examples
Code Generation: Generate complete implementations with TypeScript types, error handling, and tests
Documentation Access: Full developer docs available as MCP resources (lazy-loaded and cached)
Platform Support: Discord, Telegram, Web, Shopify, Gaming, and more
Scope
The MCP server focuses on 3rd-party developer integration capabilities. For brand admin features (Stripe checkout, DNS verification, analytics), use the Partner Portal. See SCOPE.md for detailed scope definition.
Installation
Option 1: Install from npm (Recommended)
npm install -g @loyalteez/mcp-serverOr install locally:
npm install @loyalteez/mcp-serverOption 2: Install from GitHub
# Clone the repository
git clone https://github.com/Alpha4-Labs/loyalteez-mcp.git
cd loyalteez-mcp
# Install dependencies
npm install
# Build the project
npm run buildThe built server will be available at dist/index.js.
Usage
With Claude Desktop
Add to your Claude Desktop MCP configuration:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
If installed via npm:
{
"mcpServers": {
"loyalteez": {
"command": "npx",
"args": ["@loyalteez/mcp-server"],
"env": {
"LOYALTEEZ_NETWORK": "mainnet",
"LOYALTEEZ_BRAND_ID": "0x47511fc1c6664c9598974cb112965f8b198e0c725e"
}
}
}
}If installed from GitHub:
{
"mcpServers": {
"loyalteez": {
"command": "node",
"args": ["/absolute/path/to/loyalteez-mcp/dist/index.js"],
"env": {
"LOYALTEEZ_NETWORK": "mainnet",
"LOYALTEEZ_BRAND_ID": "0x47511fc1c6664c9598974cb112965f8b198e0c725e"
}
}
}
}Environment Variables
LOYALTEEZ_NETWORK: Network to use -mainnet(default) ortestnetLOYALTEEZ_BRAND_ID: Your brand wallet address (optional, can also be provided per-tool)
Available Tools
Program Design
loyalteez_design_program: Design a complete loyalty program from context
Event Management
loyalteez_create_event: Create a single custom event
loyalteez_create_events_batch: Create multiple events at once
loyalteez_track_event: Fire any event and reward users
loyalteez_get_event_config: Get all configured events for a brand
loyalteez_bulk_events: Submit multiple events in a single request
loyalteez_admin_reward: Manually reward users (mod/admin triggered)
User Identity & Balance
loyalteez_resolve_user: Convert platform identity to Loyalteez wallet
loyalteez_get_user_balance: Get user's LTZ balance and transaction history
loyalteez_check_eligibility: Check if user can claim an event reward
loyalteez_get_user_stats: Get comprehensive user statistics
Engagement Services
loyalteez_streak_checkin: Process streak check-in with multipliers
loyalteez_get_streak_status: Get current streak status
loyalteez_claim_streak_milestone: Claim milestone bonuses (7, 30, 100, 365 days)
loyalteez_log_activity: Track voice time, messages, reactions with daily caps
loyalteez_calculate_reward: Calculate final reward with role multipliers
loyalteez_get_leaderboard: Get ranked leaderboards by metric
loyalteez_update_leaderboard_stats: Update user stats after reward
Social Features
loyalteez_create_drop: Create time-limited reward drops
loyalteez_claim_drop: Process drop claims from users
loyalteez_process_third_party_event: Handle events from Mee6, Arcane, Tatsu, etc.
Perks & Redemption
loyalteez_list_perks: Get available perks for a brand
loyalteez_check_perk_eligibility: Check if user can claim a specific perk
loyalteez_redeem_perk: Redeem a perk for a user
Achievements
loyalteez_get_user_achievements: Get all achievements for a user
loyalteez_update_achievement_progress: Update progress toward achievements
Transactions
loyalteez_relay_transaction: Execute gasless blockchain transactions
Available Resources
Documentation Resources
All developer documentation is available as MCP resources with URIs like:
loyalteez://docs/architectureloyalteez://docs/api/rest-apiloyalteez://docs/integrations/discordloyalteez://docs/guides/custom-events... and many more
Static Resources
Contracts:
loyalteez://contracts/ltz-token,loyalteez://contracts/perk-nft,loyalteez://contracts/points-sale,loyalteez://contracts/allNetwork:
loyalteez://network/config- Soneium network configurationEvent Types:
loyalteez://events/standard- Standard event types reference (includes channel constraints and domain validation)Shared Services:
loyalteez://shared-services/endpoints- API endpoints for gamification servicesOAuth Providers:
loyalteez://platforms/mappings- OAuth provider ID formatsError Codes:
loyalteez://errors/codes- Complete HTTP status codes and error response referenceError Handling:
loyalteez://errors/handling- Error handling patterns and best practicesRate Limits:
loyalteez://rate-limits/endpoints- Rate limits by endpoint with reset periodsRate Limit Strategies:
loyalteez://rate-limits/strategies- Code examples for handling rate limitsSDK Methods:
loyalteez://sdk/methods- JavaScript SDK method reference with examplesSDK Examples:
loyalteez://sdk/examples- SDK usage examples for React, Vue, Next.js
Example Usage
Design a Discord Program
User: "Design a loyalty program for my developer Discord with events for quality contributions"
AI: [Uses loyalteez_design_program tool]
Returns: Complete program with events, implementation code, and best practicesCreate Custom Events
User: "Create 5 events for my Telegram trading community"
AI: [Uses loyalteez_create_events_batch tool]
Returns: All created events + Telegram bot implementation codeTrack Events
User: "Track a helpful_answer event for Discord user 123456789"
AI: [Uses loyalteez_track_event tool]
Returns: Success, reward amount, new balance, transaction hashDaily Check-in with Streaks
User: "Set up daily check-ins with streak bonuses for my Telegram bot"
AI: [Uses loyalteez_streak_checkin tool]
Returns: Current streak, multiplier, reward amount, next milestoneCheck User Balance
User: "What's the balance for user discord_123456789?"
AI: [Uses loyalteez_get_user_balance tool]
Returns: Current balance, wallet address, transaction historyCreate a Reward Drop
User: "Create a reaction drop for 50 LTZ, first 100 users"
AI: [Uses loyalteez_create_drop tool]
Returns: Drop ID, claim URL, embed data for postingArchitecture
AI Assistant (Claude/ChatGPT)
↓ MCP Protocol
Loyalteez MCP Server
↓ HTTP API
Loyalteez APIs
- Event Handler (api.loyalteez.app)
- Shared Services (services.loyalteez.app)
- Pregeneration (register.loyalteez.app)Development
Build
npm run buildType Check
npm run typecheckTesting
npm testSee Testing section for details.
Project Structure
loyalteez-mcp/
├── src/
│ ├── index.ts # Entry point
│ ├── server.ts # MCP server setup
│ ├── tools/ # MCP tools
│ │ ├── events.ts
│ │ ├── program-design.ts
│ │ ├── identity.ts
│ │ ├── engagement.ts
│ │ ├── user.ts
│ │ ├── transactions.ts
│ │ ├── drops.ts
│ │ ├── integrations.ts
│ │ ├── perks.ts
│ │ └── achievements.ts
│ ├── resources/ # MCP resources
│ │ ├── docs.ts
│ │ ├── contracts.ts
│ │ ├── network.ts
│ │ ├── event-types.ts
│ │ ├── shared-services.ts
│ │ ├── oauth.ts
│ │ ├── errors.ts
│ │ ├── rate-limits.ts
│ │ └── sdk.ts
│ ├── utils/ # Utilities
│ │ ├── api-client.ts
│ │ ├── brand-id.ts
│ │ ├── doc-loader.ts
│ │ ├── doc-index.ts
│ │ └── validation.ts
│ └── types/ # TypeScript types
│ └── index.ts
├── tests/ # Test suite
│ ├── brand-id.test.ts
│ ├── validation.test.ts
│ ├── resources.test.ts
│ ├── tools.test.ts
│ ├── api-client.test.ts
│ ├── integration.test.ts
│ └── README.md
├── examples/ # Usage examples
└── README.mdAPI Endpoints
The MCP server interacts with these Loyalteez APIs:
Event Handler:
https://api.loyalteez.app(mainnet) /https://api.loyalteez.xyz(testnet)Shared Services:
https://services.loyalteez.app(mainnet) /https://services.loyalteez.xyz(testnet)Pregeneration:
https://register.loyalteez.app(mainnet) /https://register.loyalteez.xyz(testnet)
BrandId Configuration
The brandId parameter is required for most operations but can be provided in two ways:
Environment Variable (Recommended): Set
LOYALTEEZ_BRAND_IDin your environmentTool Parameter: Provide
brandIdas a parameter to each tool call
If neither is provided, tools will return a helpful error message explaining how to set it up.
Security
No API keys required - uses public
brandIdidentifierAll inputs validated server-side
Rate limiting awareness (documented limits)
Support for testnet/mainnet separation
BrandId can be set via environment variable for convenience
Documentation
Full documentation is available as MCP resources. Access via:
loyalteez://docs/{path}For example:
loyalteez://docs/architecture- System architectureloyalteez://docs/api/rest-api- REST API referenceloyalteez://docs/integrations/discord- Discord integration guide
Testing
The MCP server includes a comprehensive test suite to validate all tools and patterns.
Run Tests
# Run all tests
npm test
# Run tests in watch mode (for development)
npm run test:watch
# Run tests with coverage report
npm run test:coverageTest Coverage
Tests cover:
BrandId Resolution: Environment variable vs parameter handling
Input Validation: All validation utilities (brandId, email, eventType, etc.)
Resource Loading: All MCP resource types (contracts, network, events, etc.)
Tool Registration: All 24+ tools are properly registered
Tool Schemas: Schema validation and brandId optionality
API Client: All API methods and error handling
Server Integration: Server initialization and configuration
See tests/ directory for detailed test files and tests/README.md for test documentation.
Troubleshooting
BrandId Not Found
If you see "BrandId is required but not provided":
Set
LOYALTEEZ_BRAND_IDenvironment variable, orProvide
brandIdas a parameter to the tool call
Tool Not Found
Ensure you've built the project:
npm run buildResource Not Found
Resources are loaded at server startup. Ensure:
Documentation files exist in the expected location
Resource URIs match the expected format (e.g.,
loyalteez://docs/...)
Contributing
This is an internal tool for Alpha4 Labs. For issues or questions, contact the Loyalteez team.
License
MIT
Related
Available Tools
30 toolsloyalteez_admin_rewardA
Manually reward users (mod/admin triggered). Wrapper around track_event with admin context. Use this when admins want to manually reward users for special contributions.
See also: loyalteez://docs/api/rest-api
Inputs: platform (required), eventType (required), targetUserId (required), amount, +4 more.
loyalteez_bulk_eventsB
Submit multiple events in a single request. Use this for batch processing, importing historical data, or high-volume integrations. More efficient than calling track_event multiple times.
See also: loyalteez://docs/api/rest-api
Inputs: events (required).
loyalteez_calculate_rewardA
Calculate final reward with role multipliers & bonuses. Returns breakdown of base reward, multipliers, and final amount.
Supports Discord role bonuses (multipliers 1.0-5.0x and flat bonuses 0-1000 LTZ). Multiple roles combine based on stacking mode (multiplicative, additive, highest_only).
See also: loyalteez://docs/shared-services/tier-service
Inputs: platform (required), eventType (required), baseReward (required), userIdentifier (required), +2 more.
loyalteez_check_eligibilityA
Check if a user is eligible to receive a reward for a specific event. Returns eligibility status, cooldown info, and claim history. Use this BEFORE tracking an event to validate the user can receive the reward.
Implementation Note: Eligibility checking requires event configuration (maxClaims, cooldown, reward) and user claim history. If the endpoint is unavailable, eligibility can be determined by:
Calling
loyalteez_get_event_configto get event settingsChecking user's claim count against maxClaims
Verifying cooldown period has elapsed
See also: loyalteez://docs/api/rest-api
Inputs: eventType (required), userEmail (required), brandId.
loyalteez_check_perk_eligibilityB
Check if user can claim a specific perk. Returns eligibility status, balance check, cost, and missing amount.
See also: loyalteez://docs/shared-services/perks-service
Inputs: perkId (required), platform (required), userIdentifier (required), brandId.
loyalteez_claim_dropB
Process a drop claim from a user. Returns success status, reward amount, position, and remaining claims.
See also: loyalteez://docs/shared-services/drops-service
Inputs: dropId (required), platform (required), platformUserId (required).
loyalteez_claim_streak_milestoneA
Claim a milestone bonus (7, 30, 100, 365 days) for a user's streak. Returns the bonus LTZ amount awarded.
See also: loyalteez://docs/shared-services/streak-service
Inputs: platform (required), milestoneDays (required), userIdentifier (required), brandId, +1 more.
loyalteez_create_dropA
Create time-limited reward drops (reaction drops, claim buttons). Returns drop ID, claim URL, and embed data for posting.
See also: loyalteez://docs/shared-services/drops-service
Inputs: reward (required), platform (required), serverId (required), eventType (required), +6 more.
loyalteez_create_eventB
Create a custom event for your loyalty program. Events are infinitely flexible - any string can be an event type. Once created, the backend handles: fire event → check auth → reward from balance.
See also: loyalteez://docs/guides/custom-events
Inputs: event (required), brandId.
loyalteez_create_events_batchB
Create multiple events at once. Perfect for setting up entire programs. Returns all created events plus platform-specific implementation code.
See also: loyalteez://docs/guides/custom-events
Inputs: events (required), platform (required), brandId.
loyalteez_design_programB
Design a complete loyalty program from context. AI analyzes your app/community and generates optimal event structure, tiers, streaks, and implementation code.
Uses documentation context to generate platform-specific implementations and best practices.
See also:
loyalteez://docs/architecture
loyalteez://docs/integrations/discord
loyalteez://docs/integrations/telegram
loyalteez://docs/guides/custom-events
Inputs: context (required), brandId.
loyalteez_get_event_configA
Get all active event configurations for a brand, including custom events, reward amounts, and detection methods. Use this to understand what events are available and how much LTZ each event rewards.
See also: loyalteez://docs/api/rest-api
Inputs: brandId.
loyalteez_get_leaderboardB
Get ranked leaderboards by any metric. Supports multiple time periods and platform filtering.
See also: loyalteez://docs/shared-services/leaderboard-service
Inputs: metric (required), period (required), limit, brandId, +1 more.
loyalteez_get_streak_statusB
Get a user's current streak status including streak length, multiplier, next milestone, and whether they've checked in today.
See also: loyalteez://docs/shared-services/streak-service
Inputs: userIdentifier (required), brandId, streakType.
loyalteez_get_user_achievementsB
Get all achievements for a user, showing progress toward each and which are unlocked.
See also: loyalteez://docs/shared-services/achievement-service
Inputs: userIdentifier (required), brandId.
loyalteez_get_user_balanceA
Get a user's current LTZ balance and recent transaction history. Use this to display balance in your app or verify rewards were distributed.
Implementation Note: LTZ balances are stored on-chain. If the API endpoint is unavailable:
Get the user's wallet address via
loyalteez_resolve_useror SDKgetUserWallet()Query the LTZ token contract (
0x5242b6DB88A72752ac5a54cFe6A7DB8244d743c9) usingbalanceOf(address)on Soneium Mainnet (Chain ID: 1868)
See also: loyalteez://docs/api/rest-api, loyalteez://contracts/ltz-token
Inputs: userEmail (required), brandId, historyLimit, includeHistory.
loyalteez_get_user_statsA
Get comprehensive stats for a single user including balance, lifetime earnings, streak, activity, and rank.
Implementation Note: User stats aggregate data from multiple services. If the aggregation endpoint is unavailable, stats can be obtained by calling:
loyalteez_get_streak_statusfor streak dataloyalteez_get_leaderboardfor rank and lifetime earningsloyalteez_get_user_balancefor balancePlatform-specific APIs for activity (messages, voice, reactions)
See also: loyalteez://docs/shared-services/leaderboard-service
Inputs: platform (required), userIdentifier (required), brandId.
loyalteez_health_checkA
Check the health status of Loyalteez APIs. Verifies that the Event Handler, database, blockchain, and Privy services are operational. Useful for diagnostics and verifying API availability before making calls.
See also: loyalteez://docs/api/rest-api
Inputs: brandId.
loyalteez_list_perksA
Get all available perks (NFT rewards) that users can claim with their LTZ balance. Returns perk details, pricing, and availability.
See also: loyalteez://docs/shared-services/perks-service
Inputs: brandId, category, activeOnly, userAddress.
loyalteez_log_activityB
Track voice time, messages, reactions with daily caps. Returns reward earned, daily progress, and cap status.
See also: loyalteez://docs/shared-services/activity-service
Inputs: platform (required), activityType (required), userIdentifier (required), count, +2 more.
loyalteez_process_third_party_eventA
Handle events from Mee6, Arcane, Tatsu, etc. Parses bot messages and converts to Loyalteez events. Use this to integrate with existing Discord leveling bots.
See also: loyalteez://docs/integrations/third-party
Inputs: platform (required), eventType (required), sourceBot (required), targetUserId (required), +5 more.
loyalteez_redeem_perkA
Redeem a perk for a user. Creates a redemption record and returns confirmation code. Note: You must separately deduct LTZ from the user's balance.
See also: loyalteez://docs/shared-services/perks-service
Inputs: perkId (required), platform (required), userIdentifier (required), brandId.
loyalteez_relay_transactionB
Execute a gasless blockchain transaction. Users can claim perks, transfer LTZ, or interact with Loyalteez contracts without needing ETH for gas. Requires Privy authentication.
See also: loyalteez://docs/api/gas-relayer
Inputs: to (required), data (required), userAddress (required), privyAccessToken (required), +2 more.
loyalteez_resolve_userA
Convert any platform identity to a Loyalteez wallet. Creates wallet if needed. Uses deterministic email pattern: {platform}_{userId}@loyalteez.app.
See also: loyalteez://docs/architecture
Inputs: platform (required), platformUserId (required), brandId, platformUsername.
loyalteez_streak_checkinB
Process a streak check-in with automatic multipliers and milestones. Tracks consecutive daily activity and applies bonus multipliers.
See also: loyalteez://docs/shared-services/streak-service
Inputs: userId (required), platform (required), brandId.
loyalteez_track_eventB
Fire any event. Works for ANY event type - predefined or custom. The backend handles: check auth (brandId) → check eligibility → reward from balance.
See also: loyalteez://docs/api/rest-api
Inputs: eventType (required), userIdentifier (required), domain, brandId, +3 more.
loyalteez_update_achievement_progressA
Update user progress toward an achievement. When progress reaches the threshold, the achievement automatically unlocks. Returns newly unlocked achievements.
See also: loyalteez://docs/shared-services/achievement-service
Inputs: newValue (required), platform (required), userIdentifier (required), achievementType (required), +2 more.
loyalteez_update_leaderboard_statsA
Update user statistics after rewarding them. This keeps leaderboard data current. Call after every reward distribution.
See also: loyalteez://docs/shared-services/leaderboard-service
Inputs: platform (required), ltzAmount (required), userIdentifier (required), brandId, +2 more.
loyalteez_validate_webhookA
Validate a webhook signature to ensure the request is from Loyalteez. Use this to verify webhook authenticity before processing events.
Webhook signatures use HMAC-SHA256. Always verify signatures to prevent unauthorized requests.
See also: loyalteez://docs/guides/webhooks
Inputs: secret (required), payload (required), signature (required).
loyalteez_webhook_exampleA
Generate complete webhook receiver code for your framework. Returns ready-to-use code with signature verification, error handling, and event processing.
Supports: Node.js/Express, Next.js API routes, Python/Flask, Ruby/Rails, PHP.
See also: loyalteez://docs/guides/webhooks
Inputs: framework (required), endpoint.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 30 tools
Many event-related tools overlap: create_event vs create_events_batch, and track_event vs bulk_events/admin_reward/process_third_party_event are easy to confuse. get_user_stats also duplicates data available from get_user_balance, get_streak_status, and get_leaderboard. Descriptions help, but an agent can still misselect among the batch/fire/admin paths.
All tools use a consistent loyalteez_ prefix and snake_case, with most following a verb_noun pattern (create_event, get_user_balance, redeem_perk). Exceptions like streak_checkin, bulk_events, admin_reward, and health_check are noun-first but still readable and only minor deviations.
30 tools is heavy for a single MCP server, well above the typical 3-15 range. Although the loyalty domain is broad, many event/reward utilities could be consolidated, making the set feel burdensome for an agent to navigate.
Core lifecycle coverage exists for events, rewards, streaks, leaderboards, perks, achievements, drops, and webhooks. However, notable gaps remain: no update/delete for event configs, perks, or achievements, and redeem_perk requires separate balance deduction without a clear dedicated tool, creating potential dead ends.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
The Mercado Pago MCP Server implements the Model Context Protocol to provide AI agents and LLMs with access to Mercado Pago's APIs and tools within compatible development environments. It acts as an intermediary that translates Mercado Pago resources into executable functions (tools) that AI applications can invoke to perform actions and automate flows. The server simplifies integration, enables using documentation to implement or improve code, and optimizes operations through natural language interactions without manual implementations.
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA high-performance Model Context Protocol (MCP) server designed for large language models, enabling real-time communication between AI models and applications with support for session management and intelligent tool registration.2MIT
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that provides AI models with structured access to external data and services, acting as a bridge between AI assistants and applications, databases, and APIs in a standardized, secure way.2-
- FlicenseNot gradedqualityFmaintenanceA Model Context Protocol server that enables AI assistants to interact with a complete e-commerce application, providing authentication, product browsing, and shopping cart management through standardized MCP tools.-
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server for Marketing Connect AI integrations that provides tools, resources, and prompts for AI models to interact with marketing systems and data.-