Skip to main content

LoL Client MCP

An MCP (Model-Controller-Processor) server for accessing League of Legends client data. This server provides a collection of tools that communicate with the League of Legends Live Client Data API to retrieve in-game data.

Overview

This project accesses real-time game data using the League of Legends game client's Live Client Data API. It utilizes the FastMCP framework to expose various endpoints as tools.

API information can be found at https://developer.riotgames.com/docs/lol.

Installation and Usage

Prerequisites

  • Python 3.8 or higher
  • uv - Fast and reliable Python package manager
    • Installation: pip install uv
  • League of Legends client installed

Project Setup

  1. Clone this repository:
git clone https://github.com/yourusername/lol-client-mcp.git
cd lol-client-mcp
  1. Install required packages using uv:
uv pip install httpx fastmcp

Running the MCP Server

To run directly:

python main.py

Integration with Claude

There are two ways to use this with Claude:

1. Claude Desktop Configuration

Add the following to your claude_desktop_config.json file:

{
    "mcpServers": {
        "lol-client-mcp": {
            "command": "uv",
            "args": [
                "--directory",
                "C:\\ABSOLUTE\\PATH\\TO\\PARENT\\FOLDER\\lol-client-mcp",
                "run",
                "main.py"
            ]
        }
    }
}

Important: Replace C:\\ABSOLUTE\\PATH\\TO\\PARENT\\FOLDER\\lol-client-mcp with the actual path to your project.

2. Using with Web Application

To connect the MCP server to the Claude web application:

  1. Run the MCP server:

    python main.py
    
  2. Configure the server connection in the Claude web interface:

    • Go to MCP settings at the bottom when starting a conversation
    • Select 'lol-client-mcp' and connect

API Tools List

Game Data

  • get_all_game_data(): The Live League of Legends Client Data API has a number of endpoints that return a subset of the data returned by the /allgamedata endpoint. This endpoint is great for testing the Live Client Data API, but unless you actually need all the data from this endpoint, use one of the endpoints listed below that return a subset of the response.
  • get_game_stats(): Basic data about the game.
  • get_event_data(): Get a list of events that have occurred in the game.

Active Player Data

  • get_active_player(): Get all data about the active player.
  • get_active_player_name(): Returns the player name.
  • get_active_player_abilities(): Get Abilities for the active player.
  • get_active_player_runes(): Retrieve the full list of runes for the active player.

Player List and Individual Player Data

  • get_player_list(): Retrieve the list of heroes in the game and their stats.
  • get_player_scores(riot_id): Retrieve the list of the current scores for the player.
  • get_player_summoner_spells(riot_id): Retrieve the list of the summoner spells for the player.
  • get_player_main_runes(riot_id): Retrieve the basic runes of any player.
  • get_player_items(riot_id): Retrieve the list of items for the player.

Troubleshooting

  • Connection Error: Check if the League of Legends client is running.
  • Timeout Error: Verify that the game has actually started. This API does not work in the game lobby.

Precautions

  • This API only works when the League of Legends client is running and a game is in progress.
  • Use in compliance with Riot Games API policies.

License

All rights belong to Riot Games.

Metadata

Release files for iflow-mcp_johnnyinlee_lol-client-mcp 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for iflow-mcp_johnnyinlee_lol-client-mcp 0.1.5
File Size Uploaded
iflow_mcp_johnnyinlee_lol_client_mcp-0.1.5.tar.gz 9.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for iflow-mcp_johnnyinlee_lol-client-mcp 0.1.5
File Interpreter ABI Platform
iflow_mcp_johnnyinlee_lol_client_mcp-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 18.1 kB

Release files / iflow_mcp_johnnyinlee_lol_client_mcp-0.1.5.tar.gz

Download URL iflow_mcp_johnnyinlee_lol_client_mcp-0.1.5.tar.gz
Size 9.3 kB
Tags Source
SHA-256 checksum
How to use checksums
0493d3fafc6b21bb0ee01ec41ed33654654b137ce4e1e5f897f23304679bcef6
BLAKE2b-256 checksum
How to use checksums
6f41cd7f311f94fa3c67f9d2f341ebf1f9ef294cf835988d4b0102981185258d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / iflow_mcp_johnnyinlee_lol_client_mcp-0.1.5-py3-none-any.whl

Download URL iflow_mcp_johnnyinlee_lol_client_mcp-0.1.5-py3-none-any.whl
Size 8.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4bebdc0dc7ce583ccabac64173c9ff47f70d8707567f70c8f682e178011d4948
BLAKE2b-256 checksum
How to use checksums
2f0f402f6463f2ead4e08b95b18eff13d1cbc4a8791268b8d585cda5efeb135c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page