Skip to main content
Glama

lol-cdp-mcp

Two MCP servers that drive the League of Legends client over the plain Chrome DevTools Protocol. No in-client plugin and no bridge: Pengu Loader opens a debugging port and the servers talk to the client page directly.

  • lol-cdp: the native client. Real mouse and keyboard input, a shadow-DOM-aware snapshot with refs, screenshots in click coordinates, the LCU API, an endpoint catalog, and a crawled map of every screen.

  • rlc: ReimaginedLC. Shell state and navigation through the dev build's window.__rlc, LCU stores, prefs, and the dev cycle (check, build into Pengu, restore the release).

Install

Needs Windows, Pengu Loader and Node.js 22 or newer.

1. Open the debugging port (once). This writes RemoteDebuggingPort=9222 to Pengu Loader's config file; run the terminal as administrator if Pengu lives in Program Files. Then restart the League client.

npx -y -p github:kyso1/lol-cdp-mcp lol-cdp-mcp --setup

2. Add the server to your MCP client. Claude Code:

claude mcp add -s user lol-cdp -- npx -y -p github:kyso1/lol-cdp-mcp lol-cdp-mcp

Cursor, Claude Desktop, VS Code and others (mcpServers JSON):

{
  "mcpServers": {
    "lol-cdp": { "command": "npx", "args": ["-y", "-p", "github:kyso1/lol-cdp-mcp", "lol-cdp-mcp"] }
  }
}

3. (ReimaginedLC developers) the rlc server. Clone ReimaginedLC, npm install in it, then:

claude mcp add -s user rlc -e RLC_DIR=C:/path/to/ReimaginedLC -- npx -y -p github:kyso1/lol-cdp-mcp rlc-mcp

RLC_DIR is required for rlc_check and rlc_build, which run npm and vite in that folder; the other tools work without it.

Check: with the client open, http://127.0.0.1:9222/json lists the client page, and the state tool answers.

Security: the debugging port has no authentication. Any program on your PC can drive the client through it, and the page URL listed by /json contains the LCU credentials. It only listens on 127.0.0.1. Remove the line from the Pengu config to close it.

Environment: LOL_CDP_PORT (default: read from the Pengu config, else 9222), PENGU_DIR, LOL_CDP_MAP_DIR (default ~/.lol-cdp-mcp/map), RLC_DIR, RLC_REPO.

From source

git clone https://github.com/kyso1/lol-cdp-mcp && cd lol-cdp-mcp && npm install
claude mcp add -s user lol-cdp -- node C:/path/to/lol-cdp-mcp/src/server.ts

Node 24 runs the TypeScript sources directly; npm run build produces dist/ for Node 22.

Related MCP server: winagent

lol-cdp tools

Tool

What it does

state

Phase, patch, Riot nav tabs, ReimaginedLC layer, open overlays, viewport.

snapshot

Visible interactive elements with refs (e.g. e12), piercing shadow roots; repeated items collapse.

query, wait_for

Inspect one element (info, text, HTML); wait for one to appear or go away.

click, hover, type, key, scroll

Real input through Input.*. Each reports what it caused: overlays opened or closed, nav change, LCU requests.

navigate

A Riot nav tab id (rcp-fe-lol-collections, ...) or a screen id from the map.

map

The crawled map: screens, paths, controls with hover text, click effect and LCU requests. Search with query.

lcu, lcu_endpoints

Call the LCU from inside the client; search the endpoint catalog of the installed client.

screenshot

One image pixel is one CSS px, so image coordinates work as click x/y.

eval, css, script

Run JavaScript, add styles, register a script that survives reloads.

reload, console, network, metrics

Phase-guarded reload, console log, LCU request log, renderer counters.

Targets accept ref, selector (use >>> to step into a shadow root), text (+exact, nth, within), or x/y.

Account safety

Guarded at the network level, by method and path, because labels change with locale and patch:

  • lcu refuses dangerous writes, and input tools arm a filter for a few seconds after each action that fails them: purchases, loot crafting/disenchanting/opening, rerolls, reports, honor, chat messages, friend and invite changes, real queue search, name changes, reward claims, logout, client quit, and any write to a remote host.

  • reload is refused in Matchmaking, ReadyCheck, ChampSelect, GameStart, InProgress and Reconnect.

The crawl map

npx -y -p github:kyso1/lol-cdp-mcp lol-cdp-crawl [--only=rcp-fe-lol-loot,shell] [--max-screens=150] [--max-controls=40] [--depth=3] [--no-hover]

Starts only in None or Lobby and stops if the phase changes. It turns the ReimaginedLC layer off and back on, then for each screen hovers and clicks every control (one sample of each repeated item), follows tabs, overlays and dropdowns, and writes ~/.lol-cdp-mcp/map/<patch>/map.json (plus screenshots in shots/). --only merges into the existing map. The map holds personal data (friend names, chat, account ids): it stays on your PC and is never part of this repo.

While crawling, every write request outside a short allowlist (create/leave lobby, custom champ select, loot refresh) is recorded and failed. Purchase, craft, report, invite and settings buttons are therefore pressed, but nothing reaches the server; the map still shows the endpoint and body they would send. The crawler never clicks inside iframes (the store pages), which the guard cannot see. A reload at the end resyncs the client.

rlc tools

rlc_state, rlc_go, rlc_open, rlc_layer, rlc_prefs, rlc_store, rlc_supports, rlc_snapshot, rlc_errors, rlc_check, rlc_build, rlc_restore_release. Everything except rlc_layer, rlc_snapshot, rlc_errors and the dev-cycle tools needs the dev build (rlc_build); put the release back with rlc_restore_release so the client keeps auto-updating.

Tests

npm test (safety rules), npm run typecheck.

Available Tools

21 tools
clickA

Real mouse click (CDP Input) on an element, scrolled into view. Reports what it caused: overlays opened/closed, nav change, LCU requests. Dangerous writes (purchases, loot crafting, reports, invites, chat, real queue, logout) are blocked at the network level.

Inputs: x, y, nth, ref, +7 more.

consoleB
Read-only

Recent console messages and uncaught exceptions from the client page.

Inputs: limit, filter.

cssA

Adds (or with remove=true removes) a in the document head under an id. Note: styles do not reach inside shadow roots; target hosts or use ::part where available.

Inputs: id (required), css, remove, persist.

evalA

Runs JavaScript in the client page and returns the JSON result. Wrap statements in an async IIFE or just write an expression; promises are awaited. rcp.get("rcp-fe-lol-<plugin>") returns Riot plugin APIs.

Inputs: code (required), timeoutMs.

hoverA

Moves the real mouse over an element and reports tooltips/flyouts that appeared.

Inputs: x, y, nth, ref, +5 more.

keyB

Presses a key or combo on the page: "Escape", "Enter", "Tab", "ArrowDown", "Ctrl+A", "Ctrl+Shift+F12" (toggles the ReimaginedLC layer).

Inputs: combo (required).

lcuA

Calls the LCU API from inside the client (auth handled). Dangerous writes (purchases, loot crafting, reports, invites, chat messages, real queue, logout, client quit) are refused.

Inputs: path (required), method (required), body, maxChars.

lcu_endpointsA
Read-only

Searches the LCU endpoint catalog of the installed client (built from /help on first use, then cached per patch). Every word must match the path or function name.

Inputs: query (required), limit, method.

mapA
Read-only

The crawled map of the native client: every screen, how to reach it, each control with its hover text, what clicking it does and which LCU requests it fires (blocked ones show the endpoint a dangerous button would call). Without arguments lists screens; screen gives one screen in full; query searches labels, hovers and endpoints.

Inputs: query, screen.

metricsB
Read-only

Renderer performance counters (JS heap, nodes, layout/style recalcs, script duration).

Inputs: no named parameters.

networkB
Read-only

Recent LCU requests made by the client page (assets excluded), newest last, including requests the safety guard blocked.

Inputs: limit, filter.

queryC
Read-only

Details of one element: label, selector, box, state, and optionally its text or HTML (shadow root included).

Inputs: x, y, all, nth, +6 more.

reloadA

Reloads the client page (like Pengu's reload). Refused during Matchmaking, ReadyCheck, ChampSelect, GameStart, InProgress and Reconnect. Waits until the Riot UI is back.

Inputs: no named parameters.

screenshotA
Read-only

Screenshot of the client (or one element). At the default scale one image pixel = one CSS px, so image coordinates can be passed to click/hover as x/y.

Inputs: ref, save, text, scale, +3 more.

scriptA

Registers JavaScript that runs now and on every page load (reload) while this server is connected: a live plugin prototype. remove=true unregisters it (effects already applied stay until a reload). list=true shows ids.

Inputs: id, code, list, remove.

scrollA

Scrolls with the real mouse wheel over an element (deltaY > 0 scrolls down).

Inputs: deltaY (required), x, y, nth, +6 more.

snapshotA
Read-only

Lists the visible interactive elements (buttons, tabs, inputs, cards, nav items), piercing shadow DOM, each with a ref usable by click/hover/type/query. Repeated items (grids, lists) collapse after a few. Take a new snapshot after the screen changes: refs go stale.

Inputs: max, within, collapse, selectors.

stateA
Read-only

Where the client is right now: gameflow phase, patch, active Riot nav tab and all tabs, ReimaginedLC layer, open overlays (modals, flyouts, tooltips), viewport. Start here.

Inputs: no named parameters.

typeB

Types text into an input (focuses it first when a target is given).

Inputs: value (required), x, y, nth, +7 more.

wait_forB
Read-only

Waits until an element appears (or disappears with gone=true).

Inputs: x, y, nth, ref, +6 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 21 tools

    Disambiguation4/5

    Most tools have clearly distinct roles, with a sensible layering of observe (state, snapshot, query, screenshot), act (click, hover, type, key, scroll, navigate), and extend (eval, script, css). A few pairs could be confused at a glance — snapshot vs query (list vs detail), eval vs script (one-shot vs persistent injection), state vs map (live vs crawled) — but the descriptions draw the boundaries explicitly.

    Naming Consistency4/5

    All names are single lowercase snake_case tokens (wait_for, lcu_endpoints), with no camelCase mixing. The set mixes nouns for read-only inspectors (console, network, metrics, map) with verbs for actions (click, hover, type, navigate), which is a defensible and readable pattern rather than a chaotic one.

    Tool Count4/5

    21 tools is on the heavy side, but each covers a genuinely separate capability of client automation (input, DOM inspection, navigation, LCU access, JS injection, diagnostics). Nothing looks like a redundant duplicate of another tool, so the count is justified by scope even if it sits near the upper bound.

    Completeness4/5

    The surface covers the full loop: inspect state, take snapshots, act with real input, wait, verify via console/network/metrics, and extend via eval/script/css plus direct LCU calls and an endpoint catalog. Minor gaps exist — no drag/double-click or multi-step form fill, no console/network clearing or filtering — but these are workaroundable via eval or repeated calls.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables MCP-compatible AI platforms to see the screen and operate any desktop software through real mouse clicks, text input, key presses, and scripted scenario execution.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI clients on Windows to control the local mouse, keyboard, and screen understanding via MCP stdio, allowing automated workflows like viewing the screen, locating elements, clicking, typing, and verifying results.
      1
      Apache 2.0
    • A
      license
      B
      quality
      B
      maintenance
      Enables AI agents to observe and control local browsers and desktop applications over MCP, including reading UI elements and differences, capturing images, and performing permitted clicks, typing, selections, scrolling, and multi-window operations.
      16
      2
      MIT