Muddl/riot-api-mcp-server
If you are the rightful owner of riot-api-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.
The Riot API MCP Server is a Spring Boot middleware server that connects AI models with the Riot Games API ecosystem using the Model Context Protocol (MCP).
Riot API MCP Server
AI-First Gaming API Platform - A Spring Boot middleware server that bridges AI models with the Riot Games API ecosystem through the Model Context Protocol (MCP).
š Quick Start
Prerequisites
- Java 21 (OpenJDK or Oracle JDK)
- Riot API Key - Get yours here
- Anthropic API Key (for AI integration)
Installation & Setup
-
Clone the repository
git clone https://github.com/muddl/riot-api-mcp-server.git cd riot-api-mcp-server
-
Configure API Keys
# application.yml riot: apiKey: "YOUR_RIOT_API_KEY" region: "AMERICAS" # or EUROPE, ASIA, SEA anthropic: apiKey: "YOUR_ANTHROPIC_API_KEY"
-
Build and Run
./gradlew build ./gradlew bootRun
-
Verify Installation
curl http://localhost:8080/actuator/health
šÆ What is this?
The Riot API MCP Server transforms League of Legends data into AI-consumable insights through standardized tools. It serves as intelligent middleware that allows AI models to:
- š Query player profiles and match histories
- š Generate analytics and performance insights
- š® Monitor live games in real-time
- š§ Process complex gaming data through natural language
Real-World Use Cases
š¤ AI Model: "Analyze the last 10 ranked games for Faker on Korean server"
š” MCP Server: Fetches data from Riot API ā Processes analytics ā Returns insights
šÆ Result: "Faker has 8-2 W/L, 3.2 KDA, prefers Azir mid (60% pick rate)"
š ļø Core Features
š§ MCP Tools Portfolio
Tool | Purpose | AI Model Usage |
---|---|---|
RiotAccountTool | Cross-game account lookup | "Find account for Player#TAG" |
SummonerTool | LoL summoner profiles | "Get summoner rank and level" |
AnalyticsTool | Advanced match analytics | "Analyze champion performance" |
LiveGameTool | Real-time spectator data | "Check if player is in game" |
šļø Architecture Highlights
- š Regional Architecture: Automatic routing across Riot's global infrastructure
- ā” Advanced Analytics: Multi-API data aggregation and statistical analysis
- š Real-time Monitoring: Live game spectating with the Spectator API v4
- š”ļø Production Ready: Enterprise security, monitoring, and deployment planning
š Documentation
Document | Purpose | Audience |
---|---|---|
Development guidance & patterns | Developers | |
Current features & roadmap | Product & Tech | |
Production deployment strategy | DevOps & Leadership | |
Version history & changes | All stakeholders |
š Development
Build Commands
# Build project and run tests
./gradlew build
# Run tests only
./gradlew test
# Start development server
./gradlew bootRun
# Clean build artifacts
./gradlew clean
Testing Strategy
- Unit Tests: Service and tool method validation
- Integration Tests: Disabled by default (require live API keys)
- Compilation Tests: DTO validation and Lombok verification
Development Guidelines
- Lombok Pattern: All DTOs require
@Data
,@Builder
,@NoArgsConstructor
,@AllArgsConstructor
- Error Handling: Use
RiotApiException
andGlobalExceptionHandler
- Testing: Mock Riot API responses for reliable unit testing
šļø Architecture
Service Layer Structure
āāā riot/
ā āāā account/ # Cross-game account management
ā āāā lol/
ā ā āāā summoner/ # LoL summoner data
ā ā āāā match/ # Match history & details
ā ā āāā analytics/ # Advanced analytics engine
ā ā āāā spectator/ # Live game monitoring
āāā shared/ # Configuration & utilities
MCP Integration Flow
graph LR
A[AI Model] --> B[MCP Protocol]
B --> C[Spring Boot Server]
C --> D[Service Layer]
D --> E[Riot API]
E --> D
D --> C
C --> B
B --> A
š® Live Game Monitoring
Real-Time Capabilities
- Current Game Data: Players, champions, bans, game mode
- Platform Support: All LoL regions (NA1, EUW1, KR, etc.)
- Error Handling: Graceful "not in game" responses
- AI Optimization: Structured data for model consumption
Example Usage
@Tool(name = "check_if_summoner_in_game")
public boolean checkIfSummonerInGame(String summonerName, String platform) {
// Returns true/false for live game status
}
šÆ Analytics Engine
Comprehensive Statistics
- Performance Metrics: KDA, win rate, champion mastery
- Match Analysis: Recent game trends and patterns
- Champion Insights: Pick rates, success rates, role preferences
- Edge Case Handling: Zero games, perfect KDA scenarios
Multi-API Orchestration
- Account Lookup ā Cross-game identifier resolution
- Platform Routing ā Region-specific data retrieval
- Data Aggregation ā Multi-endpoint result combination
- Statistical Processing ā Analytics and insights generation
š Production Deployment
AWS Infrastructure Ready
- Container Orchestration: ECS Fargate with auto-scaling
- Load Balancing: Application Load Balancer with SSL
- Caching Layer: Redis ElastiCache with intelligent TTL
- Security: WAF, IAM roles, encrypted API key management
- Monitoring: Prometheus, Grafana, comprehensive alerting
Deployment Timeline
- Phase 1-2 (Weeks 1-4): Infrastructure & core services
- Phase 3-4 (Weeks 5-8): Security, monitoring, optimization
- Phase 5-6 (Weeks 9-12): Production hardening & launch
Estimated Monthly Cost: $2,000-5,000 (scalable based on usage)
š¤ Multi-Agent Development
Proven Coordination Patterns
This project demonstrates successful multi-agent development using Claude Code subagents:
Live Game Monitor Implementation Team
- java-pro: DTOs, service layer, Spring Boot integration
- mcp-developer: MCP tool implementation and optimization
- test-automator: Comprehensive test suite creation
- agent-organizer: Team coordination and workflow optimization
Production Deployment Planning Team
- cloud-architect: AWS infrastructure design
- security-auditor: Security frameworks and compliance
- performance-engineer: Caching and optimization strategies
- deployment-engineer: CI/CD pipelines and automation
Team Assembly Patterns
Feature Request ā agent-organizer ā specialized team ā coordinated execution
š§ API Coverage
Current Riot API Integration
API Endpoint | Status | Capabilities |
---|---|---|
Account-v1 | ā Complete | Cross-game account lookup |
Summoner-v4 | ā Complete | LoL player profiles |
Match-v5 | ā Complete | Match history & details |
Spectator-v4 | ā Complete | Live game monitoring |
Champion Mastery-v4 | š Planned | Champion expertise data |
League-v4 | š Planned | Ranked ladder information |
Regional Support
- AMERICAS: NA1, BR1, LA1, LA2, OC1
- EUROPE: EUW1, EUNE1, TR1, RU1
- ASIA: KR, JP1
- SEA: PH2, SG2, TH2, TW2, VN2
š¤ Contributing
Development Workflow
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit changes (
git commit -m 'Add amazing feature'
) - Push to branch (
git push origin feature/amazing-feature
) - Open a Pull Request
Code Standards
- Follow existing Lombok patterns for DTOs
- Include comprehensive tests for new features
- Update documentation for API changes
- Use multi-agent coordination for complex features
š Project Status
Current Version: 1.0.0
- ā Core MCP Tools: Account, Summoner, Analytics, Live Game
- ā Production Planning: Complete AWS deployment roadmap
- ā Multi-Agent Success: Proven coordination patterns
- ā Enterprise Ready: Security, monitoring, scalability
Next Release (1.1.0) - Q2 2025
- š Champion Mastery API: Player expertise analytics
- š Ranked Ladder Tools: League positioning data
- š Enhanced Analytics: AI-powered insights engine
- š Performance Optimization: Sub-100ms response times
š License
This project is licensed under the MIT License - see the file for details.
š Acknowledgments
- Riot Games for providing comprehensive API access
- Spring AI Team for MCP protocol implementation
- Claude Code Community for multi-agent development patterns
- Contributors who helped build this AI-first gaming platform
Made with ā¤ļø for the intersection of AI and Gaming
Transform gaming data into AI insights ⢠⢠ā¢