Cover image
Try Now
2025-04-02

英雄联盟游戏客户API MCP服务器

3 years

Works with Finder

1

Github Watches

2

Github Forks

3

Github Stars

LoL Client MCP

An MCP (Model-Controller-Processor) server for accessing League of Legends client data. This server provides a collection of tools that communicate with the League of Legends Live Client Data API to retrieve in-game data.

Overview

This project accesses real-time game data using the League of Legends game client's Live Client Data API. It utilizes the FastMCP framework to expose various endpoints as tools.

API information can be found at https://developer.riotgames.com/docs/lol.

Installation and Usage

Prerequisites

  • Python 3.8 or higher
  • uv - Fast and reliable Python package manager
    • Installation: pip install uv
  • League of Legends client installed

Project Setup

  1. Clone this repository:
git clone https://github.com/yourusername/lol-client-mcp.git
cd lol-client-mcp
  1. Install required packages using uv:
uv pip install httpx fastmcp

Running the MCP Server

To run directly:

python main.py

Integration with Claude

There are two ways to use this with Claude:

1. Claude Desktop Configuration

Add the following to your claude_desktop_config.json file:

{
    "mcpServers": {
        "lol-client-mcp": {
            "command": "uv",
            "args": [
                "--directory",
                "C:\\ABSOLUTE\\PATH\\TO\\PARENT\\FOLDER\\lol-client-mcp",
                "run",
                "main.py"
            ]
        }
    }
}

Important: Replace C:\\ABSOLUTE\\PATH\\TO\\PARENT\\FOLDER\\lol-client-mcp with the actual path to your project.

2. Using with Web Application

To connect the MCP server to the Claude web application:

  1. Run the MCP server:

    python main.py
    
  2. Configure the server connection in the Claude web interface:

    • Go to MCP settings at the bottom when starting a conversation
    • Select 'lol-client-mcp' and connect

API Tools List

Game Data

  • get_all_game_data(): The Live League of Legends Client Data API has a number of endpoints that return a subset of the data returned by the /allgamedata endpoint. This endpoint is great for testing the Live Client Data API, but unless you actually need all the data from this endpoint, use one of the endpoints listed below that return a subset of the response.
  • get_game_stats(): Basic data about the game.
  • get_event_data(): Get a list of events that have occurred in the game.

Active Player Data

  • get_active_player(): Get all data about the active player.
  • get_active_player_name(): Returns the player name.
  • get_active_player_abilities(): Get Abilities for the active player.
  • get_active_player_runes(): Retrieve the full list of runes for the active player.

Player List and Individual Player Data

  • get_player_list(): Retrieve the list of heroes in the game and their stats.
  • get_player_scores(riot_id): Retrieve the list of the current scores for the player.
  • get_player_summoner_spells(riot_id): Retrieve the list of the summoner spells for the player.
  • get_player_main_runes(riot_id): Retrieve the basic runes of any player.
  • get_player_items(riot_id): Retrieve the list of items for the player.

Troubleshooting

  • Connection Error: Check if the League of Legends client is running.
  • Timeout Error: Verify that the game has actually started. This API does not work in the game lobby.

Precautions

  • This API only works when the League of Legends client is running and a game is in progress.
  • Use in compliance with Riot Games API policies.

License

All rights belong to Riot Games.

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • Yasir Eryilmaz
  • AI scriptwriting assistant for short, engaging video content.

  • Daren White
  • A supportive coach for mastering all Spanish tenses.

  • J. DE HARO OLLE
  • Especialista en juegos de palabras en varios idiomas.

  • albert tan
  • Japanese education, creating tailored learning experiences.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • pontusab
  • 光标与风浪冲浪社区,查找规则和MCP

  • rahulc0dy
  • 测试您的MCP服务器。

  • av
  • 毫不费力地使用一个命令运行LLM后端,API,前端和服务。

  • 1Panel-dev
  • 🔥1Panel提供了直观的Web接口和MCP服务器,用于在Linux服务器上管理网站,文件,容器,数据库和LLMS。

  • GeyserMC
  • 与Minecraft客户端/服务器通信的库。

  • Mintplex-Labs
  • 带有内置抹布,AI代理,无代理构建器,MCP兼容性等的多合一桌面和Docker AI应用程序。

  • awslabs
  • AWS MCP服务器 - 将AWS最佳实践直接带入您的开发工作流程的专门MCP服务器

    Reviews

    1 (1)
    Avatar
    user_gidXIC2g
    2025-04-16

    As a dedicated user of the MCP app, I highly recommend the "first-mcp-server" by aroramrinaal. This server has significantly simplified my server management tasks with its intuitive interface and reliable performance. It’s a game-changer for anyone looking to streamline their operations. You can check it out here: https://mcp.so/server/first-mcp-server/aroramrinaal. Trust me, you won’t be disappointed!