riot-api-mcp-server

Muddl/riot-api-mcp-server

3.3

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).

Tools
4
Resources
0
Prompts
0

Riot API MCP Server

Java Version Spring Boot

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

  1. Clone the repository

    git clone https://github.com/muddl/riot-api-mcp-server.git
    cd riot-api-mcp-server
    
  2. Configure API Keys

    # application.yml
    riot:
      apiKey: "YOUR_RIOT_API_KEY"
      region: "AMERICAS"  # or EUROPE, ASIA, SEA
    
    anthropic:
      apiKey: "YOUR_ANTHROPIC_API_KEY"
    
  3. Build and Run

    ./gradlew build
    ./gradlew bootRun
    
  4. 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

ToolPurposeAI Model Usage
RiotAccountToolCross-game account lookup"Find account for Player#TAG"
SummonerToolLoL summoner profiles"Get summoner rank and level"
AnalyticsToolAdvanced match analytics"Analyze champion performance"
LiveGameToolReal-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

DocumentPurposeAudience
Development guidance & patternsDevelopers
Current features & roadmapProduct & Tech
Production deployment strategyDevOps & Leadership
Version history & changesAll 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 and GlobalExceptionHandler
  • 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

  1. Account Lookup → Cross-game identifier resolution
  2. Platform Routing → Region-specific data retrieval
  3. Data Aggregation → Multi-endpoint result combination
  4. 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 EndpointStatusCapabilities
Account-v1āœ… CompleteCross-game account lookup
Summoner-v4āœ… CompleteLoL player profiles
Match-v5āœ… CompleteMatch history & details
Spectator-v4āœ… CompleteLive game monitoring
Champion Mastery-v4šŸ”„ PlannedChampion expertise data
League-v4šŸ”„ PlannedRanked 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

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. 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 • • •