A Model Context Protocol (MCP) server that provides access to League of Legends game data through the Riot Games API
Project description
League-Data-MCP
A Model Context Protocol (MCP) server that provides access to League of Legends game data through the Riot Games API.
Features
- Player's PUUID Lookup: Get player's PUUID using game names and tag lines
- Match History List: Retrieve match lists for players with optional filtering
- Match Details: Get detailed match information including statistics and game data
- Match Summary List: Get truncated match data with player-specific context (optimized for large datasets)
Prerequisites
- Python 3.13+
- Riot Games API key (get one from Riot Developer Portal)
- MCP-compatible client (like Claude Desktop)
Installation
Method 1: Install from PyPI (Recommended)
pip install league-data-mcp
Method 2: Install with uvx
uvx install league-data-mcp
Method 3: Development Installation
-
Clone the repository
git clone https://github.com/syy674998887/league-data-mcp.git cd league-data-mcp
-
Install dependencies
uv sync -
Set environment variable
export API="Your Riot API key here"
Configuration
For Claude Desktop/Cherry Studio etc.
- Configure MCP Client
Add the server configuration to your MCP client:
{ "mcpServers": { "League-Data-MCP": { "command": "uvx", "args": ["league-data-mcp@latest"], "env": { "API": "Your Riot API key here" } } } }
Available Tools
get_puuid
Get player PUUIDs by their game names and tag lines (supports batch queries).
Parameters:
players(List[dict]): List of player dictionaries withgame_nameandtag_linekeys
Example:
get_puuid([
{"game_name": "Faker", "tag_line": "KR1"},
{"game_name": "Untargetable", "tag_line": "666"}
])
get_match_list
Get a list of matches for a player by their PUUID.
Parameters:
puuid(str): Player's PUUIDtype(str, optional): Match type filter (normal, ranked, etc.)count(str, optional): Number of matches to return
Example:
get_match_list(
puuid="Player's Puuid",
type="ranked",
count="20"
)
get_match_detail
Get detailed match data by match ID.
Parameters:
match_id(str): Match ID (e.g., "NA1_5354690210")
Example:
get_match_detail(match_id="NA1_5354690210")
get_match_summary
Get truncated match summaries for multiple matches (max 10 matches) with player-specific context.
Parameters:
match_ids(List[str]): List of match IDsgame_name(str): Player's game name to search for additional context
Example:
get_match_summary(
match_ids=["NA1_5354690210", "NA1_5354690211"],
game_name="Faker"
)
Rate Limiting
The server respects Riot Games API rate limits. If you encounter rate limiting issues, consider implementing additional retry logic or request throttling.
Error Handling
The server includes comprehensive error handling:
- API errors are logged with status codes and error messages
- Network failures are caught and logged
- Invalid requests return
Nonevalues
License
This project is licensed under the MIT License - see the LICENSE file for details.
Disclaimer
This project is not affiliated with Riot Games. League of Legends is a trademark of Riot Games, Inc.
Support
For issues and questions:
- Check the Riot Games API documentation
- Open an issue in this repository
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file league_data_mcp-1.0.2.tar.gz.
File metadata
- Download URL: league_data_mcp-1.0.2.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2efd6469b3ad61d1d4eec0c4c3fc3c3cef470c36e0ee8c9fa3582a7b25cddc3
|
|
| MD5 |
af4616fbc0aea6680071c5a687525d6f
|
|
| BLAKE2b-256 |
8898bcceb9fe9933d301336d291c4c19000434450294e40623ddacde85ce5c54
|
File details
Details for the file league_data_mcp-1.0.2-py3-none-any.whl.
File metadata
- Download URL: league_data_mcp-1.0.2-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2164211d5f8f53e806cac7d56a2a25adfc290e1eba18833f2cb09f0d7bbbb2ce
|
|
| MD5 |
9bfa9616877d573630b1d4ca18442b86
|
|
| BLAKE2b-256 |
54ba41358c6a588be27fe3233c5ee60c992e02a34123405d1f337ca3e89af150
|