RC

rumi-chan/league-client-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

21 stars 4 forks 质量 71 趋势 0MIT

通过MCP和企鹅加载器将反重力克劳德连接到联盟客户端。

概览

league-client-mcp 让 MCP 客户端能够实时访问《英雄联盟》桌面客户端。它是两个部分协同工作的: - mcp-server/:Node.js MCP 服务器,通过 stdio 暴露工具- lol-plugin/:运行于 League 客户端并执行工具调用的 Pengu Loader 插件 两者同时运行时,AI助手可以检查DOM,注入CSS或JavaScript,调用LCU API,与UI交互,并将完成的插件导出回Pengu Loader。 如果英雄联盟或企鹅加载器未运行,服务器就无法通信,工具将失败。该仓库假设客户端是在线的。

概述(AI 翻译)

league-client-mcp 让 MCP 客户端能够实时访问《英雄联盟》桌面客户端。 它是两部分协同工作:

  • mcp-server/:一个Node.js MCP 服务器,通过 stdio 暴露工具
  • lol-plugin/:一个运行在联盟客户端内并执行这些工具调用的Pengu Loader插件

两者同时运行时,AI助手可以检查DOM,注入CSS或JavaScript,调用 LCU API,与界面交互,并将完成的插件导出回 Pengu Loader。

它是如何运作的

如果英雄联盟或企鹅加载器不运行,服务器就没有任何可通信的对象,工具会 失败。该仓库假设客户端是活着的。

你能用它做什么

  • 在更改任何内容前,先快照当前联赛页面并检查选择器
  • 注入CSS以实现布局原型或视觉变更
  • 在客户端中运行一次性JavaScript
  • 注入能够通过SPA导航的持久插件
  • 点击按钮,输入输入,等待页面加载
  • 在客户端内部调用LCU API,无需自行处理认证
  • 将注入的插件导出到 Pengu Loader,使其启动时加载

先修条件

  • Node.js 18及以上
  • pnpm 用于 Pengu Loader 插件
  • 企鹅装载机安装

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

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

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

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

2. Build the MCP server

cd mcp-server
npm install
npm run build

3. Build the Pengu Loader plugin

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

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

Then build the plugin:

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:

{
  "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.
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

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