zerafachris/igaming_mcp_server
If you are the rightful owner of igaming_mcp_server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
A secure, modular, and extensible Model Context Protocol (MCP) server for the iGaming industry.
iGaming MCP: An Open-Source MCP Server for Hyper-Personalised iGaming CRM
Welcome to the repository for iGaming MCP, a revolutionary Model Context Protocol (MCP) server designed to break down data silos and bring true, real-time personalisation to the iGaming industry.
This repository provides a reference implementation of an MCP server for hyper-personalised iGaming CRM, designed for real-time, secure, and ethical player engagement.
What is iGaming MCP?
iGaming MCP is an intelligent middleware layer that connects an iGaming platform, a Customer Relationship Management (CRM) system, and any MCP-compatible AI agent. It provides AI with the tools and context needed to understand players on an individual level and orchestrate hyper-personalised experiences across all touchpoints. Think of it as the central nervous system for player engagement.
The Problem We Solve
In the iGaming industry, player data is everywhere but nowhere at once. Real-time betting behaviour is on the gaming platform, historical data is in the CRM, and marketing campaigns are run from yet another tool. This fragmentation makes true personalisation impossible, leading to generic marketing, missed opportunities, and player churn. iGaming MCP solves this by creating a single, unified source of truth for any AI agent to consume.
Core Features: The iGaming MCP Toolset
iGaming MCP exposes a powerful set of tools and resources via the open MCP standard, allowing an AI agent to perform complex actions.
| Tool/Resource Name | Type | Description | Parameters | Example AI Agent Use Case |
|---|---|---|---|---|
| get_player_360_view | Resource | Retrieves a unified player profile, combining CRM data (demographics, LTV, VIP status, communication history) with platform data (game preferences, deposit history). | player_id: string | An AI agent asks: "Give me the complete profile for player 'user-789', including their favourite game category and last marketing interaction." |
| get_realtime_behaviour | Resource | Fetches a live feed of the player's current session, including game being played, current wager amounts, and time-in-session. | player_id: string | An AI agent monitors a player: "What is player 'user-123' doing right now and how long have they been playing?" |
| predict_player_state | Tool | Uses AI models to predict key player metrics, such as churn probability, next-day deposit likelihood, or future LTV. | player_id: string, prediction_type: string (e.g., 'churn', 'ltv') | An AI agent assesses a situation: "Calculate the 7-day churn risk for player 'user-456' based on their declining session frequency." |
| recommend_next_best_action | Tool | Generates a ranked list of personalised actions (e.g., bonus offers, game recommendations, content) based on the player's 360 view and predicted state. | player_id: string, context: string (e.g., 'session_end', 'new_login') | An AI agent seeks to engage a player: "What is the best bonus offer to present to player 'user-123' to encourage a second deposit?" |
| trigger_omnichannel_campaign | Tool | Executes a marketing action through a specified channel, such as sending a personalised email, SMS, or in-app push notification. | player_id: string, channel: string, campaign_id: string, content: object | An AI agent decides to act: "Send a push notification to player 'user-456' with the 'ComeBackBonus' offer." |
| personalise_ui_content | Tool | Dynamically customises the player's user interface, such as reordering the game lobby to feature preferred games or displaying a personalised banner. | player_id: string, element_id: string, content: object | An AI agent tailors the experience: "Reorder the main lobby for player 'user-789' to show 'High-Volatility Slots' first." |
| apply_gamification_reward | Tool | Issues a gamification-based reward, such as loyalty points, a spin on a prize wheel, or a badge for completing a challenge. | player_id: string, reward_type: string, amount: int | An AI agent rewards engagement: "Award 500 loyalty points to player 'user-123' for logging in for the 7th consecutive day." |
How It Works: An AI Agent in Action
Imagine an AI agent tasked with reducing player churn. Using iGaming MCP, its thought process might look like this:
- Detects a problem: The agent periodically runs predict_player_state on active players. It flags player-456 with a high churn probability (75%) due to declining session frequency.
- Gathers context: The agent calls get_player_360_view for player-456. It learns the player's favourite game is "Book of Ra," their VIP level is "Gold," and they haven't responded to the last two email offers.
- Asks for a recommendation: The agent calls recommend_next_best_action with the player's ID and the context "high_churn_risk". The iGaming MCP server, using its internal models, recommends a high-value, personalised action: "Offer 50 free spins on Book of Ra, delivered via push notification for immediate impact."
- Takes action: The agent agrees and calls trigger_omnichannel_campaign, specifying the push notification channel and the content of the free spins offer.
- Confirms and logs: The action is executed, and the interaction is logged back to the player's CRM profile, enriching their 360-degree view for future interactions.
Usage
Running Locally
-
Install dependencies:
Bash
pip install -r requirements.txt -
Start the server:
Bash
uvicorn run_server:app --reloadThe server will be available at http://localhost:8000.
Running with Docker Compose
-
Build and start the containers:
Bash
podman compose down && podman compose --file docker-compose.yaml up --buildOr with Docker Compose:
Bash
docker compose down && docker compose --file docker-compose.yaml up --build -
Access the server:
- Landing page: http://localhost:8000/
- Interactive API docs: http://localhost:8000/docs
- ReDoc documentation: http://localhost:8000/redoc
- Health check: http://localhost:8000/health
- Prometheus metrics: http://localhost:8000/metrics
- MCP endpoint: http://localhost:8000/v1/mcp
MCP Endpoint Usage Examples
All requests are sent to /v1/mcp as JSON-RPC 2.0 POST requests. No authentication is required for this demo.
1. get_player_360_view
Bash
curl -X POST http://localhost:8000/v1/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "get_player_360_view", "params": {"player_id": "demo123"}, "id": 1}'
2. get_realtime_behaviour
Bash
curl -X POST http://localhost:8000/v1/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "get_realtime_behaviour", "params": {"player_id": "demo123"}, "id": 2}'
3. predict_player_state
Bash
curl -X POST http://localhost:8000/v1/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "predict_player_state", "params": {"player_id": "demo123", "prediction_type": "churn"}, "id": 3}'
Security, Compliance, and Operational Considerations
As an enterprise-ready MCP server for iGaming, iGaming MCP is designed with the highest standards of security, compliance, and operational excellence in mind.
Data Privacy & GDPR
- All personal data is mock/demo by default. For production, the server supports encryption at rest and in transit (TLS).
- Data retention and deletion policies are configurable to meet GDPR and local regulatory requirements.
- Endpoints and admin tools are provided for data subject requests, including the right to be forgotten.
Authentication & Authorisation
- All endpoints support OAuth2/JWT authentication for secure access.
- Strict permission checks and user-context propagation mitigate the “confused deputy” problem.
Auditability
- All actions, especially those with side effects (e.g., campaign triggers, rewards), are logged with user, timestamp, and parameters.
- Logs are immutable and can be exported to SIEM or audit systems for compliance and forensic analysis.
Vulnerability Management
- The development pipeline integrates SAST and SCA to identify vulnerabilities in code and dependencies.
- All components are cryptographically signed to ensure integrity.
Operational Reliability
- The server is stateless and containerised, supporting horizontal scaling and high availability.
- Health check and readiness endpoints are provided for orchestration and monitoring.
Monitoring & Alerting
- A Prometheus-compatible metrics endpoint is available for real-time monitoring.
- Logging and error alerting hooks are provided for integration with your monitoring stack.
Business & Strategic Considerations
- The solution is based on open standards and widely adopted open-source components, minimising cost and risk.
- Human-in-the-loop controls are available for all player-facing actions, supporting responsible gaming and ethical AI.
- Configurable rules prevent targeting of self-excluded or vulnerable players.
Get Involved!
iGaming MCP is currently under development. We believe in the power of open standards and community collaboration. Watch this space for opportunities to contribute, test, and build the future of personalised iGaming.