Skip to main content

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. โšก

ezgif-7fa704f63ad250

๐Ÿ“‹ 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 PUUID
  • get_account_by_riot_id - Get account by Riot ID (gameName#tagLine)
  • get_active_shard - Get the active shard for a player
  • get_active_region - Get the active region for a player

Summoner API ๐Ÿง™โ€โ™‚๏ธ

  • get_summoner_by_puuid - Get summoner information by PUUID
  • get_summoner_by_account_id - Get summoner by account ID
  • get_summoner_by_summoner_id - Get summoner by summoner ID
  • get_summoner_by_rso_puuid - Get summoner by RSO PUUID

Match API โš”๏ธ

  • get_match_history - Get match history IDs with filtering options
  • get_match_details - Get detailed match information and player statistics
  • get_match_timeline - Get match timeline with events and frame-by-frame data

League API ๐Ÿ†

  • get_challenger_league - Get challenger tier league information
  • get_grandmaster_league - Get grandmaster tier league information
  • get_master_league - Get master tier league information
  • get_league_entries_by_puuid - Get league entries for a player
  • get_league_entries_by_summoner - Get league entries by summoner ID
  • get_league_by_id - Get league information by ID
  • get_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 summoner
  • get_featured_games - Get list of featured games

Clash API ๐Ÿ›ก๏ธ

  • get_clash_player - Get Clash tournament registrations for a player
  • get_clash_team - Get Clash team information
  • get_clash_tournaments - Get list of Clash tournaments
  • get_clash_tournament_by_team - Get tournament information by team ID
  • get_clash_tournament_by_id - Get tournament by ID

Challenges API ๐ŸŽฏ

  • get_all_challenges - Get all challenge configuration data
  • get_challenge_config - Get specific challenge configuration details
  • get_challenge_leaderboards - Get challenge leaderboards (Master/Grandmaster/Challenger)
  • get_player_challenges - Get player challenge progress and achievements
  • get_challenge_percentiles - Get challenge percentile data

Tournament API ๐Ÿ…

  • register_tournament_provider - Register as tournament provider (Production key required)
  • create_tournament - Create tournaments for organized play
  • create_tournament_code - Generate tournament codes for matches
  • get_tournament_code - Get tournament code details and participants
  • get_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 versions
  • ddragon://languages - Supported localization languages
  • ddragon://champions - All champions summary data
  • ddragon://champion/{id} - Detailed champion information
  • ddragon://items - Complete items database
  • ddragon://summoner_spells - Summoner spells data

Game Constants ๐ŸŽฒ

  • constants://queues - Queue types and IDs reference
  • constants://routing - Platform/regional routing guide

Installation ๐Ÿ“ฆ

Using Docker ๐Ÿณ

# Pull and run directly from Docker Hub
docker run -i -e RIOT_API_KEY=your_api_key_here kostadindev/league-mcp:latest

# For web integrations (SSE transport)
docker run -p 8000:8000 -e RIOT_API_KEY=your_api_key_here kostadindev/league-mcp:latest league-mcp --transport sse

Using pip ๐Ÿ

pip install league-mcp

After installation, you can run it as a script using:

league-mcp

Configuration โš™๏ธ

Using Docker ๐Ÿณ

{
  "mcpServers": {
    "league-mcp": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "-e", "RIOT_API_KEY=your_riot_api_key_here", "kostadindev/league-mcp:latest"],
      "env": {}
    }
  }
}

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

Debugging ๐Ÿ”

You can use the MCP inspector to debug the server. Make sure to set your Riot API key first:

For Docker:

# Run the inspector with Docker
npx @modelcontextprotocol/inspector docker run -i --rm -e RIOT_API_KEY=your_api_key_here kostadindev/league-mcp:latest

For uvx installations:

# Set the environment variable and run the inspector
npx @modelcontextprotocol/inspector uvx league-mcp

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

league_mcp-1.0.0.tar.gz (21.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

league_mcp-1.0.0-py3-none-any.whl (34.5 kB view details)

Uploaded Python 3

File details

Details for the file league_mcp-1.0.0.tar.gz.

File metadata

  • Download URL: league_mcp-1.0.0.tar.gz
  • Upload date:
  • Size: 21.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.1

File hashes

Hashes for league_mcp-1.0.0.tar.gz
Algorithm Hash digest
SHA256 2313ab39724f220ac17a26a0791a60f03d0b73d1eb0930f88232154ac10805e8
MD5 6d78188d0eeeb6f046079c7a11b2d6e2
BLAKE2b-256 fe847a5de51c1cd7bac47ef6c11f890602096410e9837a7bfc173af6e3c31be6

See more details on using hashes here.

File details

Details for the file league_mcp-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: league_mcp-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 34.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.1

File hashes

Hashes for league_mcp-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 42e75fe58ccbb40e04de1b7e4abcb71466daef0d7813c0342303700bf5635b72
MD5 53309a7fd99eb16b278c0138591e26af
BLAKE2b-256 13791d4abb3458737922524191d0dfae362ce0cdd633b9345c4221ac21026ee6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page