league-client-mcp logo

league-client-mcp

Community
rumi-chan

Connect Claude, Antigravity to League Client via MCP & Pengu Loader.

Publisherrumi-chan
Repositoryleague-client-mcp
LanguageTypeScript
Forks
4
Stars
21
Available tools
0
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    league-client-mcp exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    21 stars and 4 forks from the linked repository.

league-client-mcp

league-client-mcp gives an MCP client live access to the League of Legends desktop client. It is two pieces working together:

  • mcp-server/: a Node.js MCP server that exposes tools over stdio
  • lol-plugin/: a Pengu Loader plugin that runs inside the League client and executes those tool calls

With both running, an AI assistant can inspect the DOM, inject CSS or JavaScript, call the LCU API, interact with the UI, and export finished plugins back to Pengu Loader.

How it works

text
AI client
  -> MCP over stdio
  -> mcp-server/
  -> WebSocket bridge at ws://127.0.0.1:8080
  -> lol-plugin/ inside the League client
  -> DOM, CSS, JavaScript, and LCU fetch()

If League or Pengu Loader is not running, the server has nothing to talk to and the tools will fail. This repo assumes a live client.

What you can do with it

  • Snapshot the current League page and inspect selectors before changing anything
  • Inject CSS to prototype layout or visual changes
  • Run one-off JavaScript in the client
  • Inject persistent plugins that survive SPA navigation
  • Click buttons, type into inputs, and wait for pages to load
  • Call the LCU API from inside the client without handling auth yourself
  • Export an injected plugin to Pengu Loader so it loads on startup

Prerequisites

  • Node.js 18 or newer
  • pnpm for the Pengu Loader plugin
  • Pengu Loader installed
  • League of Legends running when you want to use the MCP tools

Installation

1. Clone the repo

bash
git clone https://github.com/rumi-chan/league-client-mcp.git
cd league-client-mcp

2. Build the MCP server

bash
cd mcp-server
npm install
npm run build

3. Build the Pengu Loader plugin

Set the Pengu Loader path in lol-plugin/package.json:

json
"config": {
  "penguPath": "C:\\path\\to\\your\\pengu-loader"
}

Then build the plugin:

bash
cd lol-plugin
pnpm install
pnpm build

If you are not using watch mode, copy lol-plugin/dist/index.js into a plugin folder inside Pengu Loader's plugins directory.

4. Register the MCP server in your client

Any MCP client that can launch a local stdio server should work. The command looks like this:

json
{
  "mcpServers": {
    "league-client-mcp": {
      "command": "node",
      "args": ["C:/path/to/league-client-mcp/mcp-server/dist/server.js"]
    }
  }
}

This is the same basic shape used by Claude Desktop, Cursor, Windsurf, Codex CLI, and other local MCP clients.

Normal workflow

  1. Start League of Legends with Pengu Loader active.
  2. Start the MCP server with npm start from mcp-server/.
  3. Connect from your AI client.
  4. Map the current page with get_lol_dom_snapshot.
  5. Prototype styling with inject_lol_css.
  6. Add behavior with inject_lol_plugin.
  7. Reload the injected plugin while iterating.
  8. Export the finished plugin to Pengu Loader.
  9. Reload the League client to make the exported plugin load on startup.

The shortest useful loop usually looks like this:

text
get_lol_dom_snapshot
inject_lol_css
query_lol_element
inject_lol_plugin
reload_lol_plugin
export_plugin_to_pengu
reload_lol_client

Tool list

There are 16 MCP tools in the server.

DOM inspection

  • get_lol_dom_snapshot: returns a sanitized HTML snapshot of the current page
  • query_lol_element: returns details for one element, including text, bounds, and styles
  • wait_for_lol_element: waits until a selector appears in the DOM

CSS and JavaScript

  • inject_lol_css: replaces the shared global style tag
  • execute_lol_javascript: runs one-off async JavaScript in the client

Plugin management

  • inject_lol_plugin: injects a named persistent plugin with optional scoped CSS
  • reload_lol_plugin: tears down and re-runs one injected plugin
  • remove_lol_plugin: removes an injected plugin and calls its cleanup function
  • export_plugin_to_pengu: writes an injected plugin to Pengu Loader's plugins folder

Client and UI interaction

  • click_lol_element: clicks an element by selector
  • type_into_lol_element: types into an input or textarea and dispatches native events
  • get_lol_client_state: returns URL, title, viewport, and injected plugin names
  • get_lol_performance_metrics: reports heap, DOM, stylesheet, and paint data
  • get_lol_screenshot: saves a screenshot of the League client window on Windows
  • reload_lol_client: reloads the whole client

LCU

  • lcu_request: sends an HTTP request to the League Client Update API from inside the client

For the longer endpoint catalog and agent-specific workflow notes, see AGENTS.md.

Writing a plugin

Persistent plugins must return a cleanup function. If they do not, reload and removal will break.

js
const el = Object.assign(document.createElement("div"), { id: "my-plugin" });
document.body.appendChild(el);

async function render() {
  const summoner = await fetch("/lol-summoner/v1/current-summoner").then((r) => r.json());
  el.textContent = `${summoner.displayName} Lv.${summoner.summonerLevel}`;
}

const interval = setInterval(render, 5000);
const observer = new MutationObserver(() => {
  clearTimeout(window.__myPluginTimer);
  window.__myPluginTimer = setTimeout(render, 350);
});

observer.observe(document.body, { childList: true, subtree: false });
render();

return () => {
  clearInterval(interval);
  observer.disconnect();
  clearTimeout(window.__myPluginTimer);
  document.getElementById("my-plugin")?.remove();
};

Some practical rules:

  • Use get_lol_dom_snapshot before guessing selectors
  • Use !important when injecting CSS into the League client
  • Debounce DOM-driven rerenders because the client is a SPA and updates asynchronously
  • Prefer inject_lol_plugin over raw CSS when you need state, timers, or LCU fetches

Development mode

For the plugin:

bash
cd lol-plugin
pnpm dev

Watch mode rebuilds on save, copies the output into the configured Pengu Loader plugin directory, and notifies the client over a local WebSocket on port 3000.

For the MCP server:

bash
cd mcp-server
npm run dev

That runs the server with tsx and skips the build step while you are iterating.

Repo layout

text
league-client-mcp/
|-- mcp-server/
|   `-- src/server.ts
|-- lol-plugin/
|   `-- src/index.ts
|-- AGENTS.md
|-- CLAUDE.md
|-- GEMINI.md
|-- .cursor/rules/
|-- .windsurf/rules/
`-- .github/copilot-instructions.md

AGENTS.md is the main instruction file for this repo. The other agent-specific files point back to it or adapt it for their own client.

Notes

  • inject_lol_css replaces the previous injected stylesheet. It is not additive.
  • export_plugin_to_pengu exports a plugin that is already injected. It does not build one from disk.
  • get_lol_screenshot is Windows-only.
  • wait_for_lol_element is the safer way to handle page changes after a click.

Contributing

Pull requests are welcome. If you are planning a larger change, open an issue first so the scope is clear before the work starts.

License

MIT

Installation

TypingMind
Prerequisites:

Node.js 18+

{
  "mcpServers": {
    "rumi-chan-league-client-mcp": {
      "command": "",
      "args": []
    }
  }
}

Use league-client-mcp MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once league-client-mcp is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add league-client-mcp as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the league-client-mcp MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "rumi-chan-league-client-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "league-client-mcp"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the league-client-mcp MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the league-client-mcp MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use league-client-mcp to help me with this task?
league-client-mcp
Sure. I read it.
Here is what I found using league-client-mcp.

Frequently asked questions

What is the league-client-mcp MCP server used for?

league-client-mcp is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use league-client-mcp MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use league-client-mcp with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use league-client-mcp MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With league-client-mcp connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect league-client-mcp MCP to TypingMind?

league-client-mcp runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does league-client-mcp MCP provide in TypingMind?

league-client-mcp exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use league-client-mcp MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If league-client-mcp requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇