Logotipo de league-client-mcp

league-client-mcp

Comunidad
rumi-chan

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

Editorrumi-chan
Repositorioleague-client-mcp
IdiomaTypeScript
Forks
4
Estrellas
21
Herramientas disponibles
0
Tipo de transportestdio
Categorías
LicenciaMIT
Enlaces
  • Conecta herramientas a flujos de trabajo con IA

    league-client-mcp ofrece funciones MCP que pueden usar los clientes y agentes de IA compatibles.

  • 0 herramientas disponibles

    Explora a continuación las acciones que se pueden invocar, con sus nombres y descripciones cuando el servidor los proporcione.

  • Configuración lista para copiar

    Usa los ejemplos de instalación para configurar este servidor en tu cliente MCP preferido.

  • Indicadores de interés de la comunidad en el repositorio

    21 estrellas y 4 forks en el repositorio enlazado.

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

Instalación

TypingMind
Requisitos:

Node.js 18+

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

Usa el MCP de league-client-mcp con varios modelos de IA

TypingMind conecta las herramientas MCP a nivel del espacio de trabajo, por lo que, una vez conectado league-client-mcp, puedes usarlo con distintos modelos de IA en TypingMind sin tener que configurarlo por separado para cada modelo. Esta integración MCP se ejecuta localmente en tu dispositivo a través del conector MCP de TypingMind.

Guía de configuración para usar el conector local

Usa esta opción si el servidor MCP necesita acceder a archivos locales, aplicaciones o recursos privados de tu ordenador.

1

Abre los ajustes de MCP

En TypingMind, ve a Ajustes, luego a Ajustes avanzados y a Model Context Protocol, y elige Configurar conector.

  1. Abre TypingMind en tu navegador.
  2. Haz clic en el icono de Ajustes.
  3. Ve a Ajustes avanzados.
  4. Abre la sección Model Context Protocol.
  5. Haz clic en Configurar conector y elige Este dispositivo.
Pantalla de configuración del conector MCP de TypingMind con «Este dispositivo» seleccionado
2

Ejecuta el comando del conector

Elige Este dispositivo, copia el comando de TypingMind y ejecútalo en Terminal. Mantén el proceso en ejecución mientras uses MCP.

  1. Copia el comando de configuración que muestra TypingMind.
  2. Abre Terminal en macOS o Windows Terminal en Windows.
  3. Pega y ejecuta el comando.
  4. Acepta la instalación del paquete si Terminal te pide confirmación para continuar.
  5. Mantén el proceso en ejecución en la ventana de Terminal mientras uses las herramientas MCP.
3

Añade league-client-mcp como servidor

Cuando el estado del conector sea «Listo», haz clic en «Editar servidores» y pega la configuración del servidor MCP.

  1. Espera hasta que el estado del conector indique «Listo».
  2. Haz clic en «Editar servidores».
  3. Pega la configuración del servidor MCP de league-client-mcp.
  4. Guarda la lista de servidores.
  5. Actualiza si quieres comprobar que el conector sigue listo.
Ajustes de MCP de TypingMind con un servidor activo y el botón «Editar servidores»
{
  "mcpServers": {
    "rumi-chan-league-client-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "league-client-mcp"
      ]
    }
  }
}
4

Usa la conexión con distintos modelos

Guarda la lista de servidores, abre Plugins, activa las herramientas MCP de league-client-mcp y selecciona cualquier modelo de IA compatible en TypingMind para usar las herramientas en el chat o asignárselas a un agente de IA.

  1. Abre la página Plugins en TypingMind.
  2. Activa las herramientas MCP de league-client-mcp.
  3. Inicia un chat y elige el modelo de IA que quieras usar.
  4. Usa las herramientas MCP en el chat o asígnalas a un agente de IA.
  5. Cambia a otro modelo de IA cuando lo necesites sin volver a conectar MCP.
Chat de TypingMind que usa herramientas MCP activadas con un modelo de IA seleccionado
¿Puedes usar league-client-mcp para ayudarme con esta tarea?
league-client-mcp
Claro. Lo he leído.
Esto es lo que he encontrado con league-client-mcp.

Preguntas frecuentes

¿Para qué sirve el servidor MCP league-client-mcp?

league-client-mcp es un servidor MCP que permite a los clientes de IA compatibles conectarse a herramientas externas y acceder a información de contexto de fuentes externas. En TypingMind, basta con añadir este servidor MCP una vez para que sus herramientas estén disponibles en tu espacio de trabajo de IA.

¿Puedo usar el servidor MCP league-client-mcp con varios modelos de IA en TypingMind?

Sí. TypingMind conecta las herramientas MCP a nivel del espacio de trabajo, por lo que puedes usar league-client-mcp con distintos modelos de IA, como Claude, ChatGPT, Gemini u otros que hayas configurado en TypingMind, sin configurar el servidor MCP por separado para cada modelo.

¿Por qué usar el servidor MCP league-client-mcp con TypingMind?

TypingMind es una de las mejores interfaces de chat con LLM porque reúne varios modelos de IA, prompts, plugins, agentes de IA, claves API y herramientas MCP en un solo espacio de trabajo. Con league-client-mcp conectado, puedes usar sus herramientas MCP con tus modelos preferidos y mantener organizado tu trabajo con los chats en TypingMind.

¿Cómo conecto el servidor MCP league-client-mcp a TypingMind?

league-client-mcp funciona a través del conector MCP local de TypingMind. Es la mejor opción cuando el servidor MCP necesita acceder a archivos locales, aplicaciones de escritorio, herramientas de línea de comandos o recursos privados de tu ordenador.

¿Qué herramientas ofrece el servidor MCP league-client-mcp en TypingMind?

league-client-mcp ofrece funciones MCP que puedes activar desde la página Plugins de TypingMind y usar en el chat o asignar a agentes de IA.

¿Tengo que compartir mis claves API con TypingMind para usar el servidor MCP league-client-mcp?

No. TypingMind prioriza el funcionamiento local y te permite mantener el control de tus proveedores de modelos, claves API, prompts y configuración MCP. Si league-client-mcp requiere autenticación, añade las cabeceras, los ajustes de OAuth o la configuración local necesarios para ese servidor MCP al crear la conexión.

Servidores MCP relacionados

Ver el directorio

Crea ya tu propio espacio de trabajo con IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇