Get the FREE Ultimate OpenClaw Setup Guide →

riot-api

A Spring AI MCP server exposing the Riot Developer API

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio muddl-riot-api-mcp-server docker run -i muddl/riot-api-mcp-server:latest \
  --env RIOT_REGION="AMERICAS" \
  --env RIOT_API_KEY="YOUR_RIOT_API_KEY" \
  --env ANTHROPIC_API_KEY="YOUR_ANTHROPIC_API_KEY"

How to use

This Riot API MCP Server is a Spring Boot-based middleware that exposes a set of MCP tools to help AI models interact with the Riot Games API. It translates game data into AI-friendly formats and provides capabilities such as cross-game account lookup, LoL summoner profiling, advanced analytics, and real-time live game monitoring. You can invoke the included MCP tools to fetch player data, compute performance insights, and monitor ongoing matches, all through standardized MCP interfaces. The server is designed to route requests regionally, aggregate data from Riot’s endpoints, and present structured outputs suitable for model consumption.

To use the tools, ensure your MCP client can communicate with the server (e.g., via the /actuator/health endpoint for health checks). The key tools include RiotAccountTool for cross-game identifiers, SummonerTool for summoner profiles and rankings, AnalyticsTool for match analytics and champion insights, and LiveGameTool for real-time spectator data. Typical workflows involve resolving a player, retrieving recent matches, running analytics on champion performance, and checking if a summoner is currently in a live game. Each tool is designed to be invoked through MCP calls with clear input/output contracts so AI models can interpret results and generate actionable insights.

How to install

Prerequisites

  • Java 21 (OpenJDK or Oracle JDK)
  • Docker (for the recommended docker-based run) or a Java build environment if you choose to run locally
  • Riot API Key and Anthropic API Key
  • Optional: Gradle if building locally without Docker

Installation steps (Docker-based)

  1. Ensure Docker is installed and running.

  2. Pull or use the provided image (muddl/riot-api-mcp-server:latest).

  3. Run the MCP server via Docker, supplying required environment variables:

    docker run -i
    -e RIOT_API_KEY=YOUR_RIOT_API_KEY
    -e ANTHROPIC_API_KEY=YOUR_ANTHROPIC_API_KEY
    -e RIOT_REGION=AMERICAS
    muddl/riot-api-mcp-server:latest

Alternative: Local build and run (if you prefer not to use Docker)

  1. Clone the repository: git clone https://github.com/muddl/riot-api-mcp-server.git cd riot-api-mcp-server
  2. Configure API keys in application.yml as shown in the repository: riot: apiKey: "YOUR_RIOT_API_KEY" region: "AMERICAS" anthropic: apiKey: "YOUR_ANTHROPIC_API_KEY"
  3. Build the project (Gradle): ./gradlew build
  4. Run the Spring Boot application: ./gradlew bootRun
  5. Verify the server is running: curl http://localhost:8080/actuator/health

Prerequisites recap

  • Ensure valid Riot and Anthropic API keys
  • Ensure Java 21 compatibility (or run in a container that provides it)
  • Ensure network access to Riot APIs from your environment

Additional notes

Tips and common considerations:

  • Environment variables: Keep API keys secure; avoid hard-coding keys in code. Consider using a secrets manager in production.
  • Health checks: Use /actuator/health to verify the Spring Boot server is alive after startup.
  • Region handling: The server supports multiple Riot regions; set RIOT_REGION accordingly (AMERICAS, EUROPE, ASIA, SEA).
  • Rate limits: Riot API has rate limits; implement appropriate retry/backoff in your MCP client if you plan to poll repeatedly.
  • Logging and monitoring: Integrate with your existing observability stack (Prometheus/Grafana recommended) for metrics on the MCP endpoints.
  • Development mode: When testing, you can disable integration tests that require live Riot data or provide mock responses for reliable unit tests.

Related MCP Servers

Sponsor this space

Reach thousands of developers