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
Metadata
Release files for league-data-mcp 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| league_data_mcp-1.0.2.tar.gz | 4.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| league_data_mcp-1.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.2 kB
Release files / league_data_mcp-1.0.2.tar.gz
| Download URL | league_data_mcp-1.0.2.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f2efd6469b3ad61d1d4eec0c4c3fc3c3cef470c36e0ee8c9fa3582a7b25cddc3
|
|
BLAKE2b-256 checksum How to use checksums |
8898bcceb9fe9933d301336d291c4c19000434450294e40623ddacde85ce5c54
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.14
|
Release files / league_data_mcp-1.0.2-py3-none-any.whl
| Download URL | league_data_mcp-1.0.2-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2164211d5f8f53e806cac7d56a2a25adfc290e1eba18833f2cb09f0d7bbbb2ce
|
|
BLAKE2b-256 checksum How to use checksums |
54ba41358c6a588be27fe3233c5ee60c992e02a34123405d1f337ca3e89af150
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.14
|
Security for league-data-mcp 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.