Skip to main content
Glama
Estaed
by Estaed

LoL Data MCP Server

Python 3.9+ MCP over stdio Selenium MIT licence

An MCP server that lets an AI assistant look up League of Legends champions, items and runes on the official LoL Wiki.

You ask the assistant in your editor: "What are Taric's stats at level 6?" The assistant calls this server's get_champion_stats tool with {"champion": "Taric", "level": 6}. The server opens Taric's wiki page in a headless browser, picks level 6 in the stats dropdown, and returns the numbers as JSON.

  • What it does: 9 MCP tools. They return champion stats (any level 1 to 18), abilities, item data, rune data, and patch history for champions, items and runes.

  • Why you can trust the numbers: every answer is read from wiki.leagueoflegends.com when you ask, so it follows the wiki's current patch.

  • Who decides: the assistant picks the tool and the arguments; the server only reads and structures the wiki page.

Personal project, 2025. Part of Project Taric, four repos with one goal, an AI that plays Taric:

Repo

Part

What exists

Taric_Bot_Data

The author's own Taric games

Riot API collection and feature scripts

Lol_Data_MCP_Server (this repo)

Game data for the other parts

A working MCP server with 9 tools

Lol_Sim_Env

The training lane for RL

Core game classes

Taric_AI_Agent

The agent (IL + RL)

Design documents

Quick start

You need Python 3.9 or newer and Google Chrome (Selenium drives it headless for stats, abilities and patch notes).

git clone https://github.com/Estaed/Lol_Data_MCP_Server.git
cd Lol_Data_MCP_Server
python -m venv venv
venv\Scripts\activate            # Windows; on macOS/Linux: source venv/bin/activate
pip install -r requirements.txt
python -m src.mcp_server.stdio_server

The server reads one JSON-RPC message per line on stdin and answers on stdout. To check it by hand, paste this line; it answers with the 9 tools:

{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}

A tool call from the editor looks like this (sent as one line):

{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {"name": "get_champion_stats", "arguments": {"champion": "Taric", "level": 6}}
}

To use it from Cursor, add it to the MCP settings. This follows the repo's own Windows setup; put your folder in place of <path>:

{
  "mcpServers": {
    "lol-data": {
      "command": "powershell",
      "args": [
        "-Command",
        "cd '<path>\\Lol_Data_MCP_Server'; .\\venv\\Scripts\\python -m src.mcp_server.stdio_server"
      ]
    }
  }
}

Related MCP server: OP.GG MCP Server

How it works

flowchart LR
    A["AI assistant<br/>(Cursor)"] --> B["stdio server<br/>JSON-RPC lines"]
    B --> C["MCPHandler<br/>9 tools"]
    C --> D["Services<br/>champions, items, runes"]
    D --> E["Scrapers<br/>httpx, BeautifulSoup, Selenium"]
    E --> F["LoL Wiki"]
    classDef lit stroke:#C23C00,stroke-width:3px
    class E lit
  1. Connect. stdio_server.py reads one JSON message per line. MCPHandler answers initialize, tools/list and tools/call.

  2. Pick a tool. A ToolRegistry holds the 9 tools. Each tool publishes a JSON schema for its arguments in tools/list.

  3. Ask a service. Each tool calls a service for champions, items or runes (src/services/).

  4. Scrape the wiki. The scrapers fetch pages with httpx and parse them with BeautifulSoup. Champion pages that need clicks (the level dropdown, ability details, patch history) run in headless Chrome through Selenium. Page requests wait at least 1 s apart, and champion pages are cached on disk for 24 hours.

  5. Answer. The result goes back as JSON text inside the MCP response.

Tool

Required

Optional

Returns

get_champion_stats

champion

level (1 to 18)

Base stats, or stats at that level

get_champion_abilities

champion

ability_slot (Q, W, E, R, Passive)

All abilities, or one

get_champion_patch_note

champion_name

patch_version

Patch history, or one patch

get_item_data

item_name

sections

Stats, recipe, cost analysis, notes, similar items

get_item_patch_note

item_name

patch_version

Item patch history

get_rune_data

rune_name

sections

Sidebar, notes and strategy

get_rune_patch_note

rune_name

patch_version

Rune patch history

ping

message

Echo, to test the connection

server_info

Name, version and tool count

HTTP and WebSocket. src/mcp_server/server.py runs the same handler in FastAPI, for testing without an editor. It listens on localhost:8000, with GET /health and a WebSocket at /mcp:

python -m src.mcp_server.server

Tests. Tests for champion stats and abilities, items and runes are in tests/. Run them from the repo root:

pytest

Configuration. YAML files in config/ hold server, data-source and per-environment settings.

Documents.

Role in Project Taric. The server is the data source for the other parts: champion, item and rune data for the simulator (Lol_Sim_Env) and the agent (Taric_AI_Agent).


LoL Data MCP Server is not endorsed by Riot Games. League of Legends is a trademark of Riot Games, Inc.

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    C
    maintenance
    A community-developed Model Context Protocol server that integrates with the Riot Games API to provide League of Legends data, enabling AI assistants to retrieve player information, ranked stats, champion mastery, and match summaries through natural language queries.
    5
    27
    MIT
  • A
    license
    B
    quality
    C
    maintenance
    A Model Context Protocol implementation that enables AI agents to retrieve game data from OP.GG for League of Legends, Teamfight Tactics, Valorant, and esports through function calling.
    24
    104
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides real-time access to League of Legends esports data including live matches, schedules, leagues, event details, and VODs through a standardized interface.
    1
    GPL 3.0