League of Legends MCP Server

League of Legends MCP Server

MCP server exposing 30 tools for League of Legends player analysis, match review, and training-plan generation.

Category
访问服务器

README

League of Legends MCP Server

npm version CI License: MIT

MCP server exposing 30 tools for League of Legends player analysis, match review, and training-plan generation.

Installation

Via npm (recommended)

npm install -g lol-mcp-server

Via npx (no install)

npx lol-mcp-server

From source

git clone https://github.com/rexlManu/lol-mcp-server.git
cd lol-mcp-server
pnpm install
pnpm build

Setup

cp .env.example .env
# Edit .env and add your RIOT_API_KEY

Get your Riot API key at https://developer.riotgames.com/

MCP Client Configuration

Add to your MCP client config (Cursor, Claude Desktop, etc.):

{
  "mcpServers": {
    "league-of-legends": {
      "command": "lol-mcp-server",
      "env": {
        "RIOT_API_KEY": "your-api-key-here"
      }
    }
  }
}

Or if installed from source:

{
  "mcpServers": {
    "league-of-legends": {
      "command": "node",
      "args": ["/path/to/lol-mcp-server/dist/index.js"],
      "env": {
        "RIOT_API_KEY": "your-api-key-here"
      }
    }
  }
}

Stack

  • Runtime: Node.js 20+, TypeScript
  • Package manager: pnpm
  • MCP SDK: @modelcontextprotocol/sdk
  • Validation: zod
  • Scraping: cheerio (Lolalytics, League Wiki)
  • Static data: Data Dragon API
  • Testing: vitest
pnpm dev          # Run with tsx (hot reload)
pnpm build        # Compile to dist/
pnpm start        # Run compiled server
pnpm test         # Run tests
pnpm typecheck    # Type checking

MCP Client Configuration

Cursor / VS Code

{
  "mcpServers": {
    "league-of-legends": {
      "command": "node",
      "args": ["dist/index.js"],
      "env": {
        "RIOT_API_KEY": "your-api-key-here"
      }
    }
  }
}

opencode

{
  "mcpServers": {
    "league-of-legends": {
      "command": "node",
      "args": ["dist/index.js"],
      "env": {
        "RIOT_API_KEY": "your-api-key-here"
      }
    }
  }
}

Tools (30 total)

Account & Profile (4)

Tool Description
lol_get_account Get Riot account info by Riot ID
lol_get_summoner Get summoner info (level, icon) by PUUID
lol_get_ranked Get ranked stats (tier, rank, LP, win rate)
lol_get_player_profile Complete player profile in one call

Match History (3)

Tool Description
lol_get_match_history Get recent match IDs (with filters)
lol_get_match_details Get detailed match data (batch supported)
lol_get_match_timeline Get minute-by-minute match timeline

Champion & Live (4)

Tool Description
lol_get_champion_mastery Get champion mastery data
lol_get_live_game Check if player is in game
lol_get_champion_rotation Get free champion rotation
lol_get_featured_games Get featured games

League & Clash (7)

Tool Description
lol_get_league_by_id Get league info by ID
lol_get_league_entries Get league entries by summoner
lol_get_league_entries_exp Get league entries (paginated, by queue/tier/division)
lol_get_league_top Get top players (challenger/grandmaster/master)
lol_get_clash_tournaments Get active Clash tournaments
lol_get_clash_player Get Clash player info
lol_get_clash_team Get Clash team info

Challenges & Status (3)

Tool Description
lol_get_challenges Get all challenge configurations
lol_get_player_challenges Get player challenge progress
lol_get_server_status Get server status (maintenance/incidents)

Static Game Data (4)

Tool Description
lol_get_all_champions List all champions (from Data Dragon)
lol_get_champ_info Detailed champion info (Data Dragon + Wiki)
lol_get_all_items List all items with stats, cost, build path
lol_get_runes Get rune trees with keystones and descriptions

Lolalytics (1)

Tool Description
lol_get_builds_for_champion Scrape Lolalytics for builds, runes, counters, meta

AI Analysis (4)

Tool Description
lol_analyze_performance Analyze recent performance with recommendations
lol_analyze_champion Analyze performance on a specific champion
lol_get_improvement_tips Get personalized improvement tips
lol_compare_players Compare stats between two players

Region Support

User-facing regions: euw, eune, na, kr, br, lan, las, oce, ru, tr, jp, ph2, sg2, th2, tw2, vn2

Platform routing: euw1, eun1, na1, kr, jp1, br1, la1, la2, oc1, tr1, ru

Regional routing: europe, americas, asia, sea

Caching

Data Type TTL
Live game / server status 15-30s
Account / summoner / ranked 60s
Champion mastery / match history 2min
Lolalytics pages 5min
Match details / timelines 1h
Static data (champions/items/runes) 24h

Error Handling

Error Description
not found (404) Player/match not found
rate limited (429) Auto-retry with backoff
forbidden (403) Private data or restricted access
invalid key (401) Invalid Riot API key
scrape_layout_changed Lolalytics page structure changed
network failure Connection/API error
invalid region Unknown region code

Project Structure

src/
  index.ts              # Entry point, MCP server setup
  config.ts             # Environment config
  riot/
    client.ts           # Riot API HTTP client with rate limiting
    regions.ts          # Region routing maps
    types.ts            # Core Riot API types
    types-extra.ts      # Additional Riot API types
  cache/
    cache.ts            # TTL-based in-memory cache
  static-data/
    dataDragon.ts       # Data Dragon API client
    wikiScraper.ts      # League Wiki scraper (cheerio)
    types.ts            # Static data types
  lolalytics/
    scraper.ts          # Lolalytics page fetcher
    parser.ts           # HTML parser (cheerio)
    types.ts            # Lolalytics types
  tools/
    account.ts          # Account, summoner, ranked, profile, match tools
    champion.ts         # Mastery, live game, rotation, featured games
    league.ts           # League, clash, challenges, status
    staticData.ts       # Champions, items, runes
    lolalytics.ts       # Lolalytics builds
    analysis.ts         # Performance analysis, tips, comparison
  analysis/
    performance.ts      # Performance analysis engine
    championReview.ts   # Champion-specific analysis
    trainingPlan.ts     # Improvement tips generator
    compare.ts          # Player comparison
tests/
  regions.test.ts       # Region mapping tests
  cache.test.ts         # Cache tests
  lolalytics-parser.test.ts  # Parser tests
  analysis.test.ts      # Analysis engine tests

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选