logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

league-client-accessor-mcp

Facilitates real-time telemetry retrieval from the active League of Legends instance utilizing the local Live Client Data API interface. Offers utilities for fetching current match statistics and related runtime metadata.

Author

league-client-accessor-mcp logo

johnnyinlee

Apache License 2.0

Quick Info

GitHub GitHub Stars 7
NPM Weekly Downloads 0
Tools 1
Last Updated 2026-02-19

Tags

apiapisrequestsgame datalegends clientretrieving game

League Client Data Accessor (MCP)

This component functions as a Model-Controller-Processor (MCP) layer designed to interface with the operational data stream exposed by the running League of Legends game application via its internal Live Client Data API endpoints. It exposes structured access points, materialized as 'tools', through the FastMCP environment.

Reference documentation for the underlying API suite is available at: https://developer.riotgames.com/docs/lol.

Deployment and Operation

Prerequisites

  • Requires Python version 3.8 or newer.
  • Installation of the [uv] dependency manager is recommended:
    • Installation command: pip install uv
  • A functional installation of the League of Legends application is mandatory.

Setup Procedure

  1. Clone the source repository:

bash git clone https://github.com/yourusername/lol-client-mcp.git cd lol-client-mcp

  1. Install necessary libraries using uv:

bash uv pip install httpx fastmcp

Launching the Server Core

Execute the primary bootstrap script:

bash python main.py

Integration with Claude Environment

Two primary methods exist for integrating this service with the Claude agent environment:

1. Claude Desktop Configuration Method

Incorporate the following configuration block into your claude_desktop_config.json file:

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

Crucial Note: Substitute C:\ABSOLUTE\PATH\TO\PARENT\FOLDER\lol-client-mcp with the exact file system location of this project directory.

2. Web Interface Connection

To link this MCP service to the web-based Claude application:

  1. Ensure the core service is active (python main.py).
  2. Navigate to the MCP settings interface within the Claude web application (typically located at the bottom when initiating a dialogue).
  3. Select 'league-client-accessor-mcp' from the list and establish the connection.

Available Toolset

Current Match Information

  • get_all_game_data(): Fetches a comprehensive data payload equivalent to the /allgamedata endpoint. Recommended for diagnostic testing; for specific data retrieval, utilize the more granular functions listed below.
  • get_game_stats(): Provides fundamental statistics characterizing the ongoing match state.
  • get_event_data(): Returns a chronological sequence of significant occurrences within the game session.

Active Participant Metrics

  • get_active_player(): Retrieves the complete data record pertaining to the currently controlled player.
  • get_active_player_name(): Outputs the associated player identifier string.
  • get_active_player_abilities(): Fetches the current status and details of the active player's in-game abilities.
  • get_active_player_runes(): Obtains the full configuration details of the primary and secondary rune pages selected by the active participant.

Participant Roster and Individual Details

  • get_player_list(): Returns an enumeration of all participants ('heroes') in the match along with their statistical aggregates.
  • get_player_scores(riot_id): Retrieves the current scoring metrics for a specified participant, identified by their riot_id.
  • get_player_summoner_spells(riot_id): Fetches the assigned summoner spell loadout for a specified player.
  • get_player_main_runes(riot_id): Retrieves the core rune selections for any listed participant.
  • get_player_items(riot_id): Returns the inventory manifest (items currently held or completed) for a specified player.

Troubleshooting Guide

  • Connection Issues: Confirm that the League of Legends application is operational and foregrounded.
  • Timeout Errors: Ensure that the match has fully transitioned past the pre-game lobby phase and is actively running. This API set is inactive during queue waiting periods.

Operational Caveats

  • Functionality is strictly contingent upon the LoL client being open and a match being underway.
  • Adherence to Riot Games' published API usage guidelines is required.

Licensing

Riot Games retains all intellectual property rights associated with the game itself.

== Background on XMLHttpRequest (XHR) == XMLHttpRequest (XHR) defines a set of methods within a JavaScript object, specialized for dispatching HTTP requests from a web browser environment back to a server. This capability allows client-side applications to asynchronously fetch data following initial page load, bypassing full page refreshes common in older web paradigms. XHR is fundamental to Asynchronous JavaScript and XML (Ajax) development. Before Ajax, server interaction was predominantly managed via standard hyperlink navigation or HTML form submissions, which inherently caused the entire viewport content to be replaced.

== Genesis == The fundamental concept driving XMLHttpRequest was introduced in 2000 by developers working on Microsoft Outlook. The initial implementation appeared in Internet Explorer 5 (1999), though it did not use the standardized XMLHttpRequest identifier initially. Instead, proprietary object instantiations like ActiveXObject("Msxml2.XMLHTTP") and ActiveXObject("Microsoft.XMLHTTP") were employed. By the release of Internet Explorer 7 (2006), universal support for the XMLHttpRequest standard identifier was established across all major browsing platforms, including Mozilla's Gecko engine (2002), Safari 1.2 (2004), and Opera 8.0 (2005).

=== Standardization Efforts === The World Wide Web Consortium (W3C) issued the first formal Working Draft specification for the XMLHttpRequest object on April 5, 2006. This was succeeded by the Level 2 Working Draft on February 25, 2008, which introduced enhancements such as progress monitoring capabilities, allowance for cross-origin requests (CORS), and mechanisms for stream handling of byte data. By the close of 2011, the Level 2 features were merged back into the primary specification document. Subsequently, development stewardship transitioned to the WHATWG initiative near the end of 2012, which now maintains the specification as a living document utilizing Web IDL definitions.

== Operational Flow == Typically, invoking a request via XMLHttpRequest involves a standardized sequence of programming actions:

  1. Instantiate the required XMLHttpRequest object via its constructor call.
  2. Invoke the open() method to specify the request method (GET, POST, etc.), define the target resource URI, and set the operation mode (synchronous or asynchronous).
  3. If employing asynchronous communication, assign an event handler (listener) to be notified upon state transitions.
  4. Commence the request transmission by calling the send() method, optionally passing payload data.
  5. Monitor the event listener for state changes. Upon receiving server acknowledgement and data, the response payload resides within the responseText attribute. The object signals completion when its state transitions to 4 (the 'done' state).

Beyond these core steps, XMLHttpRequest offers extensive configuration options. Custom HTTP headers can be appended to modify server behavior, and data can be transmitted to the server within the send() invocation. Responses can be automatically parsed from raw JSON strings into native JavaScript objects, or processed incrementally as data streams arrive rather than waiting for the entire transmission to conclude. Furthermore, requests can be halted prematurely or configured with strict timeouts to enforce completion deadlines.

== Cross-Origin Communication ==

In the nascent stages of the World Wide Web, security constraints quickly revealed the vulnerability of allowing unrestricted data fetching across different domains, a scenario which led to the implementation of limitations that XHR Level 2 later sought to address via CORS mechanisms.

See Also

`