Model Context Protocol server for League of Legends game data via Riot Games API
Project description
League of Legends MCP Server
A Model Context Protocol server that provides LLMs comprehensive access to League of Legends game data through the Riot Games API. This server enables LLMs to retrieve player statistics, match history, champion information, tournament data, and much more.
https://github.com/user-attachments/assets/101ee6dc-af42-4bf0-81b0-3caba49c83a7
Note: This server requires a valid Riot Games API key. You can obtain one for free at developer.riotgames.com.
Available Tools
Account API
get_account_by_puuid- Get account information by PUUIDget_account_by_riot_id- Get account by Riot ID (gameName#tagLine)get_active_shard- Get the active shard for a playerget_active_region- Get the active region for a player
Summoner API
get_summoner_by_puuid- Get summoner information by PUUIDget_summoner_by_account_id- Get summoner by account IDget_summoner_by_summoner_id- Get summoner by summoner IDget_summoner_by_rso_puuid- Get summoner by RSO PUUID
Match API
get_match_history- Get match history IDs with filtering optionsget_match_details- Get detailed match information and player statisticsget_match_timeline- Get match timeline with events and frame-by-frame data
League API
get_challenger_league- Get challenger tier league informationget_grandmaster_league- Get grandmaster tier league informationget_master_league- Get master tier league informationget_league_entries_by_puuid- Get league entries for a playerget_league_entries_by_summoner- Get league entries by summoner IDget_league_by_id- Get league information by IDget_league_entries- Get league entries by tier and division
Champion API
get_champion_rotations- Get current free-to-play champion rotation
Spectator API
get_active_game- Get active game information for a summonerget_featured_games- Get list of featured games
Clash API
get_clash_player- Get Clash tournament registrations for a playerget_clash_team- Get Clash team informationget_clash_tournaments- Get list of Clash tournamentsget_clash_tournament_by_team- Get tournament information by team IDget_clash_tournament_by_id- Get tournament by ID
Challenges API
get_all_challenges- Get all challenge configuration dataget_challenge_config- Get specific challenge configuration detailsget_challenge_leaderboards- Get challenge leaderboards (Master/Grandmaster/Challenger)get_player_challenges- Get player challenge progress and achievementsget_challenge_percentiles- Get challenge percentile data
Tournament API
register_tournament_provider- Register as tournament provider (Production key required)create_tournament- Create tournaments for organized playcreate_tournament_code- Generate tournament codes for matchesget_tournament_code- Get tournament code details and participantsget_lobby_events- Monitor tournament lobby events
Status API
get_platform_status- Get platform status and maintenance information
Resources
Data Dragon Resources
ddragon://versions- All available Data Dragon versionsddragon://languages- Supported localization languagesddragon://champions- All champions summary dataddragon://champion/{id}- Detailed champion informationddragon://items- Complete items databaseddragon://summoner_spells- Summoner spells data
Game Constants
constants://queues- Queue types and IDs referenceconstants://routing- Platform/regional routing guide
Installation
Using pip
pip install league-mcp
Using uv
When using uv no specific installation is needed. We will use uvx to directly run league-mcp.
Using pip from source
git clone https://github.com/kostadindevLeague-of-Legends-MCP.git
cd League-of-Legends-MCP/mcp-server
pip install -e .
After installation, you can run it as a script using:
league-mcp
Configuration
Configure for Claude.app
Add to your Claude settings:
Using pip installation
{
"mcpServers": {
"league-mcp": {
"command": "league-mcp",
"args": ["--transport", "stdio"],
"env": {
"RIOT_API_KEY": "your_riot_api_key_here"
}
}
}
}
Using uvx
{
"mcpServers": {
"league-mcp": {
"command": "uvx",
"args": ["league-mcp", "--transport", "stdio"],
"env": {
"RIOT_API_KEY": "your_riot_api_key_here"
}
}
}
}
Usage
Basic Usage
# Run with default stdio transport
league-mcp
# Run with SSE transport for remote integrations
league-mcp --transport sse
# Get help
league-mcp --help
Environment Variables
Set your Riot API key:
export RIOT_API_KEY=your_riot_api_key_here
Or create a .env file:
RIOT_API_KEY=your_riot_api_key_here
Testing the Server
You can test the League MCP Server using:
Option 1: Provided MCP Client (Recommended)
Use the included MCP client with a web UI for interactive testing
The MCP client is available at: https://github.com/kostadindev/League-of-Legends-MCP/tree/main/mcp-client
Option 2: Claude Desktop
Configure the server in Claude Desktop using the configuration examples above.
Customization
Transport Types
The server supports two transport types:
- stdio (default): Standard input/output transport for direct integration with MCP clients like Claude Desktop
- sse: Server-Sent Events transport for web-based integrations and HTTP connections
API Coverage
This server provides comprehensive coverage of the Riot Games API:
- 10 API endpoints with 35+ tools
- Static game data via Data Dragon resources
- Game constants for queues, routing, and more
Contributing
We encourage contributions to help expand and improve league-mcp. Whether you want to add new tools, enhance existing functionality, or improve documentation, your input is valuable.
For examples of other MCP servers and implementation patterns, see: https://github.com/modelcontextprotocol/servers
Pull requests are welcome! Feel free to contribute new ideas, bug fixes, or enhancements to make league-mcp even more powerful and useful.
License
league-mcp is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.
Disclaimer
This project is not endorsed by Riot Games and does not reflect the views or opinions of Riot Games or anyone officially involved in producing or managing Riot Games properties. Riot Games and all associated properties are trademarks or registered trademarks of Riot Games, Inc.
Project details
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_mcp-0.1.1.tar.gz.
File metadata
- Download URL: league_mcp-0.1.1.tar.gz
- Upload date:
- Size: 27.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c7eb6004b9f3d2f48b98f7e34acd1b4e493a1c9f6526ad8452f56ce00d4a1d0
|
|
| MD5 |
54ea64dd8e8e11c6de5bb993efd085c2
|
|
| BLAKE2b-256 |
a7927121f5dba57eb16ce865638d49c7d182664ef55791e9b8874057e602abaf
|
File details
Details for the file league_mcp-0.1.1-py3-none-any.whl.
File metadata
- Download URL: league_mcp-0.1.1-py3-none-any.whl
- Upload date:
- Size: 40.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f63c363289bef199a48807c743f22b7870edb86b5e1e6bd739955c87455f872
|
|
| MD5 |
eb272d30a19419a3075a9b9fe0d96111
|
|
| BLAKE2b-256 |
a34b9e8c8546d64b7c2e3370fb6e62d1c205492dec03ab76b5768ec734783371
|