Riot Games MCP Server — LoL Player Ranks & Stats
Fetch LoL player ranks, champion stats, match history, and account info via the Riot Games MCP server using the Riot API.
npx -y @jifrozen0110/mcp-riotOverview
The Riot Games MCP Server provides a lightweight bridge between the Riot Games API and applications or language models that expect MCP (Model Context Protocol)-style tool endpoints. It centralizes Riot API calls—player rank, champion statistics, match history, and account details—behind a single HTTP service that handles request shaping, simple caching, and rate-limit considerations, so your client code or LLM integration can focus on logic instead of directly managing Riot API details.
This server is useful for developers building analytics dashboards, bots, or conversational agents that need on-demand League of Legends data. Instead of embedding Riot API calls into many different components, you deploy the MCP server once and call consistent endpoints that return normalized JSON suitable for programmatic consumption or summarization by an LLM.
Features
- Fetch player ranks and league entries (by summoner name or PUUID)
- Retrieve champion statistics and mastery data
- Pull recent match history and match details
- Obtain basic account information and region metadata
- MCP-compatible endpoints designed for integration with LLMs or external tools
- Simple caching to reduce repeated Riot API calls (configurable TTL)
- Basic rate-limit handling and error normalization
- Docker-friendly and runnable locally for development
Installation / Configuration
Clone the repository, configure environment variables, and run.
- Clone and install
# If Node.js project:
# Or if it's a Python project replace with pip install -r requirements.txt
- Create .env (example)
RIOT_API_KEY=RGAPI_xxx-your-key-xxx
PORT=3000
CACHE_TTL=60 # seconds, optional
LOG_LEVEL=info
- Start locally
# Node-style example
# or
- Run with Docker
Notes:
- Obtain a Riot API key from developer.riotgames.com and set RIOT_API_KEY.
- Configure CACHE_TTL and PORT to tune caching and exposure.
- If running in production, place behind a reverse proxy and ensure secure storage of your API key.
Available Tools / Resources
Below are the common endpoints you can expect. Paths and parameter names may vary slightly by release—consult the server README for exact paths.
| HTTP | Path | Query / Body | Description |
|---|---|---|---|
| GET | /mcp/riot/player | name={summonerName}&region={region} OR puuid={puuid} | Returns account info and current ranked entries |
| GET | /mcp/riot/ranks | puuid={puuid}&region={region} | Returns solo/duo and flex rank details |
| GET | /mcp/riot/champion-stats | id={championId}&region={region} | Returns statistics and winrate for a champion |
| GET | /mcp/riot/matches | puuid={puuid}&count=20&region={region} | Returns recent match IDs and summaries |
| GET | /mcp/riot/match/{matchId} | region path param | Returns full match detail by match ID |
Example curl: fetch a player’s ranks
Sample trimmed JSON response
Use Cases
- Chatbot integration: Make a League-of-Legends assistant that answers questions like “What is X player’s current rank and recent top champions?” The LLM can call the MCP endpoints and use the normalized JSON to produce summarized natural-language responses.
- Competitive analytics dashboard: Periodically fetch match history and champion stats for a set of players to compute trends (win rate, KDA, champion pool).
- Scouting & recruitment tools: Automate retrieval of ranked history and recent performance for prospects; export to CSV or a database for team review.
- Automated match annotation: Pull match details to annotate replays or generate post-game reports for coaching workflows.
Quick SDK Example (JavaScript)
Using fetch/axios to call the server:
;
"Doublelift"console.logconsole.error;
Notes & Best Practices
- Respect Riot API rules: do not expose your RIOT_API_KEY in client-side code. Keep keys server-side and secure.
- Tune caching and retry behavior to avoid hitting Riot rate limits.
- Validate inputs (region, summoner name, PUUID) before calling endpoints to reduce unnecessary network calls.
- Check the repository README for the latest endpoint names and additional configuration options. GitHub: https://github.com/jifrozen0110/mcp-riot